indenting coding style

Discussion forum about Anuko Time Tracker
Post Reply
dalescott
Posts: 58
Joined: Fri Apr 21, 2017 2:53 pm
Location: Calgary, Alberta, Canada
Contact:

indenting coding style

Post by 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

Nik
Posts: 440
Joined: Wed May 26, 2010 5:55 pm

Re: indenting coding style

Post by 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".

Post Reply