Embed Instructions

97.26% of the project's source code conforms to the same coding conventions

  • Image URL
    https://squizlabs.github.io/PHP_CodeSniffer/analysis/ladybirdweb/agorainvoicing/grade.svg
  • Markdown
    [![Code consistency](https://squizlabs.github.io/PHP_CodeSniffer/analysis/ladybirdweb/agorainvoicing/grade.svg)](https://squizlabs.github.io/PHP_CodeSniffer/analysis/ladybirdweb/agorainvoicing)
Aconsistency

Analysis of Coding Conventions for Agora Invoicing

PHP_CodeSniffer, using a custom coding standard and report, was used to record various coding conventions across 197 PHP projects.

Conventions

Analysis of Coding Conventions for Agora Invoicing

Back to top

View project specific report

Project
Consistency

Inline comment style

What comment style is used for non docblock comments?

This project is using the popular method for this convention

Current
Key Method Use
/* ... */ /* ... */ 44.34%
// ... - Most popular method // ... 55.66%

Based on 3,836 inline comments

Historical
  • 01 May 2016: there was a 4.61% swing away from /* ... */
    • there was a 3.97% swing towards // ...
  • 01 Jun 2016: there was a 3.3% swing towards /* ... */
  • 01 Jul 2016: there was a 19.06% swing from // ... to /* ... */
  • 01 Jul 2018: there was a 6.41% swing from /* ... */ to // ...
  • 01 Aug 2018: there was a 5.97% swing from // ... to /* ... */

Function has doc comment

Does each function have a docblock comment to describe its purpose?

This project is using the popular method for this convention

Current
Key Method Use
no no 39.15%
yes - Most popular method yes 60.85%

Based on 2,603 functions

Historical
  • 01 May 2016: there was a 4.02% swing from yes to no
  • 01 Jul 2016: there was a 7.84% swing from no to yes
  • 01 Jul 2018: there was a 3.52% swing from no to yes

Class defined in namespace

Is each class defined in a namespace of at least 1 level?

Current
Key Method Use
no - Most popular method no 61.32%
yes yes 38.68%

Based on 455 classes

Historical
  • 01 Jul 2016: there was a 33.79% swing from yes to no

CamelCase method name

Are class method names defined using CamelCase?

This project is using the popular method for this convention

Current
Key Method Use
no no 37.97%
yes - Most popular method yes 62.03%

Based on 2,378 methods

Historical
  • 01 May 2016: there was a 7.29% swing from no to yes
  • 01 Jul 2016: there was a 37.22% swing from yes to no
  • 01 Jul 2018: there was a 3.52% swing from no to yes

Lowercase filename

Are PHP filenames lowercase?

Current
Key Method Use
no no 36.19%
yes - Most popular method yes 63.81%

Based on 572 files

Historical
  • 01 Jul 2016: there was a 17.04% swing from no to yes
  • 01 Jul 2018: there was a 3.42% swing from no to yes

One class per file

Is each class defined in a file by itself?

This project is using the popular method for this convention

Current
Key Method Use
no no 30.33%
yes - Most popular method yes 69.67%

Based on 455 classes

Historical
  • 01 Jul 2016: there was a 31.73% swing from yes to no

Class has doc comment

Does each class have a docblock comment to describe its purpose?

Current
Key Method Use
no - Most popular method no 71.65%
yes yes 28.35%

Based on 455 classes

Historical
  • 01 May 2016: there was a 3.58% swing from no to yes
  • 01 Jul 2016: there was a 26.73% swing from no to yes

File has doc comment

Does each PHP file have a docblock comment to describe its purpose?

Current
Key Method Use
no - Most popular method no 76.22%
yes yes 23.78%

Based on 572 files

Historical
  • 01 Jul 2016: there was a 10.53% swing from no to yes
  • 01 Jul 2018: there was a 10.14% swing from no to yes

Adjacent assignments aligned

For a block of assignments, are the assignment operators (equals, plus-equals etc.) aligned?

This project is using the popular method for this convention

Current
Key Method Use
no - Most popular method no 86.78%
yes yes 13.22%

Based on 1,626 assignment blocks

Historical
  • 01 Aug 2017: there was a 3.59% swing from no to yes

Spacing after string concat

How many spaces follow the string concatenation operator?

Current
Key Method Use
0 - Most popular method 0 89.42%
1 1 1.87%
newline newline 8.72%

Based on 3,590 concat operators

Historical
  • 01 May 2016: there was a 37.82% swing away from 0
    • there was a 38.42% swing towards 1
  • 01 Jun 2016: there was a 41.4% swing towards 0
    • there was a 41.17% swing away from 1
  • 01 Jul 2016: there was a 5.9% swing away from 0
    • there was a 4.14% swing towards newline
  • 01 Aug 2016: there was a 3.4% swing away from 0
    • there was a 3.29% swing towards 1
  • 01 Aug 2017: there was a 16.06% swing towards 0
    • there was a 16% swing away from 1

Space before operator

How many spaces precede comparison, arithmetic and assignment operators?

This project is using the popular method for this convention

Current
Key Method Use
0 0 9.58%
1 - Most popular method 1 90.32%
newline newline 0.1%

Based on 2,035 operators

Historical
  • 01 Jun 2016: there was a 26.39% swing from 0 to 1
  • 01 Jul 2016: there was a 68.02% swing from 1 to 0
  • 01 Aug 2017: there was a 55.47% swing from 0 to 1
  • 01 Dec 2017: there was a 10.05% swing from 0 to 1

Declarations and side effects mixed

Do files both declare symbols (classes, functions, constants, etc.) and cause side-effects (e.g. generate output, change .ini settings, etc.)?

This project is using the popular method for this convention

Current
Key Method Use
no - Most popular method no 90.38%
yes yes 9.62%

Based on 572 files

Historical
  • 01 Jul 2016: there was a 12.64% swing from no to yes

Line length

Including whitespace and comments, how many characters are in non-empty code lines?

This project is using the popular method for this convention

Current
Key Method Use
80 or less - Most popular method 80 or less 91.63%
81-120 81-120 6.78%
121-150 121-150 0.92%
151 or more 151 or more 0.68%

Based on 73,579 lines

Historical

Spacing before string concat

How many spaces precede the string concatenation operator?

Current
Key Method Use
0 - Most popular method 0 97.02%
1 1 1.92%
newline newline 1.06%

Based on 3,590 concat operators

Historical
  • 01 May 2016: there was a 39.87% swing away from 0
    • there was a 39.52% swing towards 1
  • 01 Jun 2016: there was a 42.05% swing towards 0
    • there was a 42.21% swing away from 1
  • 01 Aug 2016: there was a 3.35% swing from 0 to 1
  • 01 Aug 2017: there was a 15.83% swing from 1 to 0

Short array syntax used

Are arrays defined using the PHP 5.4+ short array syntax?

This project is using the popular method for this convention

Current
Key Method Use
no no 2.79%
yes - Most popular method yes 97.21%

Based on 1,723 array definitions

Historical
  • 01 May 2016: there was a 7.86% swing from yes to no
  • 01 Jun 2016: there was a 7.81% swing from no to yes
  • 01 Jul 2016: there was a 36.41% swing from yes to no
  • 01 Aug 2017: there was a 38.33% swing from no to yes

PascalCase class name

Are class names defined using PascalCase?

This project is using the popular method for this convention

Current
Key Method Use
no no 2.64%
yes - Most popular method yes 97.36%

Based on 455 classes

Historical

Spacing before object operator

How many spaces precede the object operator (->)?

This project is using the popular method for this convention

Current
Key Method Use
0 - Most popular method 0 97.43%
newline newline 2.57%

Based on 14,582 object operators

Historical

Number of newlines at EOF

How many newline characters appear at the end of the file?

This project is using the popular method for this convention

Current
Key Method Use
0 0 1.56%
1 - Most popular method 1 98.44%

Based on 514 files

Historical
  • 01 Jul 2016: there was a 23.9% swing towards 0
    • there was a 24.06% swing away from 1
  • 01 Aug 2017: there was a 24.39% swing away from 0
    • there was a 24.72% swing towards 1

Space after operator

How many spaces follow comparison, arithmetic and assignment operators?

This project is using the popular method for this convention

Current
Key Method Use
1 - Most popular method 1 98.79%
Other other 1.21%

Based on 19,525 operators

Historical
  • 01 Jul 2016: there was a 16.32% swing towards 0
    • there was a 16.36% swing away from 1
  • 01 Aug 2017: there was a 14.53% swing away from 0
    • there was a 14.86% swing towards 1

EOL char

What character is used for line breaks?

This project is using the popular method for this convention

Current
Key Method Use
\n - Most popular method \n 99.3%
\r\n \r\n 0.7%

Based on 572 files

Historical
  • 01 Jul 2016: there was a 29.9% swing from \n to \r\n
  • 01 Aug 2017: there was a 29.31% swing from \r\n to \n

Blank lines at start of control structure

How many blank lines precede the body of a control structure?

This project is using the popular method for this convention

Current
Key Method Use
0 - Most popular method 0 99.44%
1 1 0.54%
2 2 0.02%

Based on 4,261 control structures

Historical
  • 01 Jun 2016: there was a 3.26% swing from 1 to 0

PHP closing tag at EOF

Is there a PHP closing tag at the end of the file?

This project is using the popular method for this convention

Current
Key Method Use
no - Most popular method no 99.48%
yes yes 0.52%

Based on 572 files

Historical
  • 01 Jul 2016: there was a 25.69% swing from no to yes
  • 01 Aug 2017: there was a 25.21% swing from yes to no

Function opening brace placement

Is the opening brace of a function on the same line as the function keyword or the next line?

This project is using the popular method for this convention

Current
Key Method Use
new line - Most popular method new line 99.61%
same line same line 0.39%

Based on 2,561 functions

Historical
  • 01 May 2016: there was a 26.8% swing from new line to same line
  • 01 Jun 2016: there was a 36.29% swing from same line to new line
  • 01 Jul 2016: there was a 65.01% swing from new line to same line
  • 01 Aug 2016: there was a 4.82% swing from new line to same line
  • 01 Aug 2017: there was a 73.89% swing from same line to new line

Blank lines at end of control structure

How many blank lines follow the body of a control structure?

This project is using the popular method for this convention

Current
Key Method Use
0 - Most popular method 0 99.72%
1 1 0.23%
2 2 0.05%

Based on 4,261 control structures

Historical

Control structure defined inline

Are control structures defined inline (without braces)?

This project is using the popular method for this convention

Current
Key Method Use
no - Most popular method no 99.83%
yes yes 0.17%

Based on 3,570 control structures

Historical
  • 01 Jul 2016: there was a 36.88% swing from no to yes
  • 01 Aug 2017: there was a 36.7% swing from yes to no

Line indent

Are lines indented using spaces or tabs?

This project is using the popular method for this convention

Current
Key Method Use
mixed mixed 0.02%
spaces - Most popular method spaces 99.88%
tabs tabs 0.11%

Based on 64,646 indented lines

Historical
  • 01 Jul 2016: there was a 35.73% swing away from spaces
    • there was a 35.38% swing towards tabs
  • 01 Aug 2017: there was a 35.36% swing towards spaces
    • there was a 35.01% swing away from tabs

Spaces after control structure open parenthesis

How many spaces follow the opening parenthesis of a control structure?

This project is using the popular method for this convention

Current
Key Method Use
0 - Most popular method 0 99.97%
newline newline 0.03%

Based on 3,370 control structures

Historical

Multiple statements on same line

Are multiple statements defined on the same line of code?

This project is using the popular method for this convention

Current
Key Method Use
no - Most popular method no 99.98%
yes yes 0.02%

Based on 16,918 statements

Historical

PHP short open tag used

Is the PHP short open tag syntax used?

This project is using the popular method for this convention

Current
Key Method Use
no - Most popular method no 100%

Based on 25,705 open tags

Historical

Constant name case

What case are user-defined constants defined in?

This project is using the popular method for this convention

Current
Key Method Use
upper - Most popular method upper 100%

Based on 49 constants

Historical

File extension for class files

For files that contain classes, what extension does the file use?

This project is using the popular method for this convention

Current
Key Method Use
.php - Most popular method .php 100%

Based on 317 class files

Historical

PHP constant case

What case are PHP constants (true, false, null) written in?

This project is using the popular method for this convention

Current
Key Method Use
lower - Most popular method lower 100%

Based on 1,539 PHP constants

Historical

Brackets around echoed strings

Are parenthesis placed around echo'd strings?

This project is using the popular method for this convention

Current
Key Method Use
no - Most popular method no 100%
yes yes 0%

Based on 326 echo statements

Historical
  • 01 Jul 2016: there was a 5.75% swing from no to yes
  • 01 Aug 2017: there was a 5.98% swing from yes to no

Use of ELSE IF or ELSEIF

Are elseif statements defined using elseif or else if?

This project is using the popular method for this convention

Current
Key Method Use
else if else if 0%
elseif - Most popular method elseif 100%

Based on 72 elseif statements

Historical
  • 01 Jul 2016: there was a 80.77% swing from elseif to else if
  • 01 Aug 2017: there was a 80.77% swing from else if to elseif

Closure opening brace placement

Is the opening brace of a closure on the same line as the function keyword or the next line?

This project is using the popular method for this convention

Current
Key Method Use
same line - Most popular method same line 100%

Based on 258 closures

Historical

Spaces before control structure close parenthesis

How many spaces precede the closing parenthesis of a control structure?

This project is using the popular method for this convention

Current
Key Method Use
0 - Most popular method 0 100%

Based on 3,370 control structures

Historical

PHP keyword case

What case are PHP keywords (function, echo, foreach etc.) written in?

This project is using the popular method for this convention

Current
Key Method Use
lower - Most popular method lower 100%

Based on 18,294 keywords

Historical

Array end comma

Does the last item end with a comma in a multi-line array definition?

This project is using the popular method for this convention

Current
Key Method Use
no no 0%
yes - Most popular method yes 100%

Based on 66 array definitions

Historical
  • 01 May 2016: there was a 25.64% swing from yes to no
  • 01 Jun 2016: there was a 33.33% swing from no to yes
  • 01 Dec 2017: there was a 5.56% swing from yes to no
  • 01 Mar 2018: there was a 5.56% swing from no to yes

PHP type case

What case are PHP types (int, bool, string) written in?

This project is using the popular method for this convention

Current
Key Method Use
lower - Most popular method lower 100%

Based on 71 PHP types

Historical

Array keyword case

When defining an array, how is the array keyword written?

This project is using the popular method for this convention

Current
Key Method Use
lower - Most popular method lower 100%
mixed mixed 0%

Based on 48 array definitions

Historical
  • 01 Jul 2016: there was a 6.92% swing from lower to mixed
  • 01 Aug 2017: there was a 6.84% swing from mixed to lower

Private method prefixed with underscore

Are private methods prefixed with an underscore?

This project is using the popular method for this convention

Current
Key Method Use
no - Most popular method no 100%
yes yes 0%

Based on 79 private methods

Historical
  • 01 Apr 2018: there was a 6.52% swing from no to yes
  • 01 Jul 2018: there was a 6.52% swing from yes to no

Spacing after object operator

How many spaces follow the object operator (->)?

This project is using the popular method for this convention

Current
Key Method Use
0 - Most popular method 0 100%

Based on 14,582 object operators

Historical

Spacing after cast statement

How many spaces are there between a cast statement and the variable?

Current
Key Method Use
0 0 0%
1 - Most popular method 1 100%

Based on 37 cast statements

Historical
  • 01 May 2016: there was a 55.56% swing from 1 to 0
  • 01 Jun 2016: there was a 55.56% swing from 0 to 1
  • 01 Jul 2016: there was a 14.29% swing from 1 to 0
  • 01 Aug 2017: there was a 14.29% swing from 0 to 1

Class opening brace placement

Is the opening brace of a class on the same line as the class keyword or the next line?

This project is using the popular method for this convention

Current
Key Method Use
new line - Most popular method new line 100%
same line same line 0%

Based on 455 classes

Historical
  • 01 May 2016: there was a 6.65% swing from new line to same line
  • 01 Jun 2016: there was a 9.99% swing from same line to new line
  • 01 Jul 2016: there was a 48.11% swing from new line to same line
  • 01 Aug 2017: there was a 50.14% swing from same line to new line

CamelCase function name

Are global function names defined using CamelCase?

This project is using the popular method for this convention

Current
Key Method Use
no - Most popular method no 100%

Based on 39 global functions

Historical

File extension for non-class files

For files that do not contain classes, what extension does the file use?

This project is using the popular method for this convention

Current
Key Method Use
.php - Most popular method .php 100%

Based on 255 non-class files

Historical