alexandermarston / vnstat-dashboard

A responsive web UI to view network traffic statistics provided by vnStat (with support for version 2.x)
https://alexandermarston.github.io/vnstat-dashboard/
142 stars 60 forks source link

Some refactoring #19

Closed lonesta closed 5 years ago

lonesta commented 5 years ago

Added a function to print a table Auto reformat code with PSR

alexandermarston commented 5 years ago

@lonesta

It looks like the standards here aren't consistent. In some functions the curly brace is on the same line as the function, in others it's on the line below.

function print_options()
{

vs

function print_options() {
lonesta commented 5 years ago

@alexandermarston

Oh, my IDE does not know how to reformat in the HTML sections. I'll fix it now.

alexandermarston commented 5 years ago

@lonesta I still think this is missing some consistency here.

For functions, you are adding the curly brace below the line but for if statements they are on the same line - we should stick with one approach.

lonesta commented 5 years ago

@alexandermarston

I adhere to the standards PSR-1 and PSR-2