indenting coding style

Discussion forum about Anuko Time Tracker

indenting coding style

Postby dalescott » Thu Oct 12, 2017 11:11 pm

Hi, what is the indenting style? Tabs or spaces, and if tabs, how many spaces is a tab?

I would like to add an "all time" selection for the reporting time period on the Reports page (fwiw, the Charts page provides an "all time" selection in the Interval drop-down). This would be more convenient for my workflow than specifying specific start and end dates. I was looking at the class Period { } declaration in Period.class.php, and the style seems to change from spaces to tabs after the "TODO: refactoring ongoing..." comment. I could attempt to infer the preferred style from other files, but I would prefer to get the right answer directly (I didn't find any specific direction for coding style searching on the website or in the forum).

If adding "all time" to the Reports page is desirable in general, I will send a pull request when done.

Cheers,
Dale
dalescott
 
Posts: 19
Joined: Fri Apr 21, 2017 2:53 pm
Location: Calgary, Alberta, Canada

Re: indenting coding style

Postby Nik » Sat Oct 14, 2017 8:24 pm

dalescott wrote:Hi, what is the indenting style? Tabs or spaces, and if tabs, how many spaces is a tab?

2 spaces.

dalescott wrote:
I would like to add an "all time" selection for the reporting time period on the Reports page (fwiw, the Charts page provides an "all time" selection in the Interval drop-down). This would be more convenient for my workflow than specifying specific start and end dates. I was looking at the class Period { } declaration in Period.class.php, and the style seems to change from spaces to tabs after the "TODO: refactoring ongoing..." comment. I could attempt to infer the preferred style from other files, but I would prefer to get the right answer directly (I didn't find any specific direction for coding style searching on the website or in the forum).

If adding "all time" to the Reports page is desirable in general, I will send a pull request when done.


Perhaps, add "this year" and "last year" in addition to "all time".
Nik
 
Posts: 338
Joined: Wed May 26, 2010 5:55 pm


Return to Time Tracker

Who is online

Users browsing this forum: No registered users and 2 guests

cron