Embed Instructions

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

  • Image URL
    https://squizlabs.github.io/PHP_CodeSniffer/analysis/pyrocms/pyrocms/grade.svg
  • Markdown
    [![Code consistency](https://squizlabs.github.io/PHP_CodeSniffer/analysis/pyrocms/pyrocms/grade.svg)](https://squizlabs.github.io/PHP_CodeSniffer/analysis/pyrocms/pyrocms)
B+consistency

Analysis of Coding Conventions for PyroCMS

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 PyroCMS

Back to top

View project specific report

Project
Consistency

Private method prefixed with underscore

Are private methods prefixed with an underscore?

Current
Key Method Use
no no 49.07%
yes - Most popular method yes 50.93%

Based on 108 private methods

Historical

PascalCase class name

Are class names defined using PascalCase?

Current
Key Method Use
no - Most popular method no 56.04%
yes yes 43.96%

Based on 439 classes

Historical

Class has doc comment

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

This project is using the popular method for this convention

Current
Key Method Use
no no 43.05%
yes - Most popular method yes 56.95%

Based on 439 classes

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 41.67%
yes - Most popular method yes 58.33%

Based on 120 array definitions

Historical

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
# ... # ... 28.93%
/* ... */ /* ... */ 10.51%
// ... - Most popular method // ... 60.56%

Based on 12,626 inline comments

Historical

Spacing after string concat

How many spaces follow the string concatenation operator?

Current
Key Method Use
0 - Most popular method 0 68.1%
1 1 30.7%
newline newline 1.2%

Based on 3,166 concat operators

Historical

Spacing before string concat

How many spaces precede the string concatenation operator?

Current
Key Method Use
0 - Most popular method 0 68.19%
1 1 31.05%
newline newline 0.76%

Based on 3,166 concat operators

Historical

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 69.02%
yes yes 30.98%

Based on 439 classes

Historical

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.47%
spaces - Most popular method spaces 77.3%
tabs tabs 22.23%

Based on 65,118 indented lines

Historical

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 22.43%
yes - Most popular method yes 77.57%

Based on 2,399 functions

Historical

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 21.32%
yes - Most popular method yes 78.68%

Based on 2,214 methods

Historical

Spacing after cast statement

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

Current
Key Method Use
0 0 18.38%
1 - Most popular method 1 81.62%

Based on 136 cast statements

Historical

Lowercase filename

Are PHP filenames lowercase?

Current
Key Method Use
no no 13.72%
yes - Most popular method yes 86.28%

Based on 2,347 files

Historical

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 87.85%
1 1 12.05%
newline newline 0.09%

Based on 4,215 control structures

Historical

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 88%
81-120 81-120 8.62%
121-150 121-150 1.6%
151 or more 151 or more 1.78%

Based on 120,074 lines

Historical

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.84%
yes yes 9.16%

Based on 2,347 files

Historical

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 91.67%
1 1 8.25%
2 2 0.04%
3 3 0.04%

Based on 4,584 control structures

Historical

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 92.2%
yes yes 7.8%

Based on 7,192 assignment blocks

Historical

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 6.08%
1 - Most popular method 1 92.4%
3 3 0.1%
newline newline 1.42%

Based on 3,092 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 6.87%
1 - Most popular method 1 93.13%

Based on 2,182 files

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 94.78%
newline newline 5.22%

Based on 18,224 object operators

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 94.86%
yes yes 5.14%

Based on 4,786 control structures

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 96.42%
upper upper 3.58%

Based on 3,523 PHP constants

Historical

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 96.58%
same line same line 3.42%

Based on 439 classes

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 96.66%
mixed mixed 0.02%
upper upper 3.32%

Based on 28,833 keywords

Historical

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 97.42%
1 1 2.55%
2 2 0.02%

Based on 4,582 control structures

Historical

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 97.83%
yes yes 2.17%

Based on 2,347 files

Historical

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 98.49%
same line same line 1.51%

Based on 2,389 functions

Historical

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 1.37%
yes - Most popular method yes 98.63%

Based on 439 classes

Historical

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 1.17%
elseif - Most popular method elseif 98.83%

Based on 171 elseif statements

Historical

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
new line new line 0.98%
same line - Most popular method same line 99.02%

Based on 102 closures

Historical

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.06%
yes yes 0.94%

Based on 2,347 files

Historical

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 99.18%
Other other 0.82%

Based on 54,836 operators

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 99.26%
1 1 0.74%

Based on 4,215 control structures

Historical

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.36%
\r\n \r\n 0.64%

Based on 2,347 files

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 99.89%
yes yes 0.11%

Based on 1,764 echo statements

Historical

Short array syntax used

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

Current
Key Method Use
no - Most popular method no 99.97%
yes yes 0.03%

Based on 3,611 array definitions

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.97%
yes yes 0.03%

Based on 52,548 statements

Historical

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 36 global functions

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 12,923 open tags

Historical

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 185 PHP types

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 1,914 non-class files

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 136 constants

Historical

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 18,224 object operators

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 433 class files

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%

Based on 3,610 array definitions

Historical