Embed Instructions

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

  • Image URL
    https://squizlabs.github.io/PHP_CodeSniffer/analysis/ezsystems/ezpublish-kernel/grade.svg
  • Markdown
    [![Code consistency](https://squizlabs.github.io/PHP_CodeSniffer/analysis/ezsystems/ezpublish-kernel/grade.svg)](https://squizlabs.github.io/PHP_CodeSniffer/analysis/ezsystems/ezpublish-kernel)
Aconsistency

Analysis of Coding Conventions for eZ Publish 5.x Kernel

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 eZ Publish 5.x Kernel

Back to top

View project specific report

Project
Consistency

Short array syntax used

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

Current
Key Method Use
no - Most popular method no 75.83%
yes yes 24.17%

Based on 3,790 array definitions

Historical
  • 01 Dec 2017: there was a 3.08% swing from no to yes

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 20.89%
yes - Most popular method yes 79.11%

Based on 2,154 classes

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 14.38%
yes - Most popular method yes 85.62%

Based on 8,391 functions

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
1 - Most popular method 1 90.22%
newline newline 9.78%

Based on 1,186 concat operators

Historical
  • 01 Aug 2015: there was a 4.55% swing away from newline
    • there was a 4.48% swing towards 1

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 90.48%
81-120 81-120 8.41%
121-150 121-150 0.96%
151 or more 151 or more 0.15%

Based on 196,235 lines

Historical

Spacing after cast statement

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

This project is using the popular method for this convention

Current
Key Method Use
0 - Most popular method 0 93%
1 1 7%

Based on 443 cast 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 93.27%
yes yes 6.73%

Based on 1,574 assignment blocks

Historical
  • 01 Aug 2015: there was a 5.15% swing from yes to no

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 96.19%
newline newline 3.81%

Based on 44,564 object operators

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 96.73%
same line same line 3.27%

Based on 7,176 functions

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
1 - Most popular method 1 96.89%
newline newline 3.11%

Based on 3,693 operators

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
/* ... */ /* ... */ 2.94%
// ... - Most popular method // ... 97.06%

Based on 1,904 inline comments

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 1.49%
yes - Most popular method yes 98.51%

Based on 7,532 methods

Historical

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 0%
1 - Most popular method 1 98.9%
newline newline 1.1%

Based on 1,186 concat operators

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.03%
newline newline 0.97%

Based on 19,181 operators

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 99.22%
1 1 0%
newline newline 0.78%

Based on 6,442 control structures

Historical
  • 01 Aug 2015: there was a 99.02% swing towards 0
    • there was a 98.83% swing away from 1

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 0.51%
yes - Most popular method yes 99.49%

Based on 2,156 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 0.5%
elseif - Most popular method elseif 99.5%

Based on 200 elseif statements

Historical
  • 01 Aug 2015: there was a 100% swing from else if to elseif

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 99.91%
yes yes 0.09%

Based on 2,156 files

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.92%
yes yes 0.08%

Based on 5,978 control structures

Historical
  • 01 Aug 2015: there was a 11.51% swing from yes to no

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.95%
yes yes 0.05%

Based on 2,156 files

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

Based on 6,442 control structures

Historical
  • 01 Aug 2015: there was a 97.96% swing towards 0
    • there was a 97.79% swing away from 1

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 39,143 statements

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 8 echo 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 2,156 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 1,816 PHP types

Historical

Line indent

Are lines indented using spaces or tabs?

This project is using the popular method for this convention

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

Based on 158,411 indented lines

Historical

Class defined in namespace

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

This project is using the popular method for this convention

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

Based on 2,154 classes

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 2,154 class files

Historical

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%

Based on 264 private methods

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

Based on 7,297 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 63,080 keywords

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 2,154 classes

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 2,156 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 44,564 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
1 - Most popular method 1 100%
2 2 0%

Based on 2,156 files

Historical
  • 01 Aug 2015: there was a 8.2% swing from 2 to 1

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 184 array definitions

Historical
  • 01 Aug 2015: there was a 31.03% swing from no to yes

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 2,874 array definitions

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

Historical

PascalCase class name

Are class names defined using PascalCase?

This project is using the popular method for this convention

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

Based on 2,154 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 100%

Based on 7,299 control structures

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

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%
same line - Most popular method same line 100%

Based on 118 closures

Historical
  • 01 Aug 2015: there was a 98.26% swing from new line to same line

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%

Based on 2,154 classes

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 3,780 PHP constants

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

Based on 2,156 files

Historical