Embed Instructions

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

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

Analysis of Coding Conventions for PHPExcel

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 PHPExcel

Back to top

View project specific report

Project
Consistency

Spacing before string concat

How many spaces precede the string concatenation operator?

This project is using the popular method for this convention

Current
Key Method Use
0 0 43.87%
1 - Most popular method 1 48.6%
2 2 0.19%
newline newline 7.34%

Based on 2,111 concat operators

Historical

Spacing after string concat

How many spaces follow the string concatenation operator?

This project is using the popular method for this convention

Current
Key Method Use
0 0 43.68%
1 - Most popular method 1 53.81%
2 2 0.14%
newline newline 2.37%

Based on 2,111 concat operators

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 54.96%
mixed mixed 6.83%
upper upper 38.21%

Based on 2,693 PHP constants

Historical

Array end comma

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

Current
Key Method Use
no - Most popular method no 59.57%
yes yes 40.43%

Based on 47 array definitions

Historical

Function opening brace placement

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

Current
Key Method Use
new line new line 37.4%
same line - Most popular method same line 62.6%

Based on 2,853 functions

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 75.61%
same line same line 24.39%

Based on 205 classes

Historical

Line indent

Are lines indented using spaces or tabs?

Current
Key Method Use
mixed mixed 1.17%
spaces spaces 23.18%
tabs - Most popular method tabs 75.64%

Based on 82,650 indented 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 78.74%
yes yes 21.26%

Based on 207 files

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 20.9%
elseif - Most popular method elseif 79.1%

Based on 469 elseif statements

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 79.47%
yes yes 20.53%

Based on 2,440 assignment blocks

Historical

Spacing after cast statement

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

Current
Key Method Use
0 0 20.09%
1 - Most popular method 1 79.91%

Based on 697 cast statements

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 17.99%
yes - Most popular method yes 82.01%

Based on 2,691 methods

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
lower lower 1.11%
mixed mixed 12.56%
upper - Most popular method upper 86.33%

Based on 812 constants

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 8.18%
1 - Most popular method 1 89.42%
newline newline 1.05%
Other other 1.35%

Based on 10,122 operators

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 92%
81-120 81-120 7.14%
121-150 121-150 0.61%
151 or more 151 or more 0.25%

Based on 91,030 lines

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 5.31%
1 - Most popular method 1 92.27%
2 2 2.42%

Based on 207 files

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 7.1%
yes - Most popular method yes 92.9%

Based on 2,873 functions

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 93.24%
\r\n \r\n 6.76%

Based on 207 files

Historical

File has doc comment

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

This project is using the popular method for this convention

Current
Key Method Use
no no 4.83%
yes - Most popular method yes 95.17%

Based on 207 files

Historical

Private method prefixed with underscore

Are private methods prefixed with an underscore?

Current
Key Method Use
no no 3.94%
yes - Most popular method yes 96.06%

Based on 482 private methods

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 96.18%
yes yes 3.82%

Based on 26,380 statements

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 96.75%
yes yes 3.25%

Based on 7,632 control structures

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
0 0 2.53%
1 - Most popular method 1 96.93%
Other other 0.54%

Based on 30,589 operators

Historical

PascalCase class name

Are class names defined using PascalCase?

Current
Key Method Use
no - Most popular method no 97.56%
yes yes 2.44%

Based on 205 classes

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 97.79%
1 1 2.19%
2 2 0.01%

Based on 7,436 control structures

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 1.46%
yes - Most popular method yes 98.54%

Based on 205 classes

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 98.91%
1 1 1.08%
2 2 0.01%

Based on 7,416 control structures

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 98.97%
1 1 0.57%
3 3 0.42%
newline newline 0.04%

Based on 6,695 control structures

Historical

Lowercase filename

Are PHP filenames lowercase?

This project is using the popular method for this convention

Current
Key Method Use
no - Most popular method no 99.03%
yes yes 0.97%

Based on 207 files

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
# ... # ... 0.02%
/* ... */ /* ... */ 0.8%
// ... - Most popular method // ... 99.18%

Based on 9,643 inline comments

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.25%
1 1 0.75%

Based on 6,695 control structures

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 99.77%
newline newline 0.23%

Based on 23,364 object operators

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 99.81%
mixed mixed 0.19%

Based on 2,093 array definitions

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

Based on 31,184 keywords

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 207 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 700 PHP types

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

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 100%

Based on 207 files

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 23,364 object operators

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 2 non-class files

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 100%

Based on 205 classes

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%

Based on 5 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 100%

Based on 2,093 array definitions

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 8 global 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
yes - Most popular method yes 100%

Based on 205 classes

Historical