Embed Instructions

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

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

Analysis of Coding Conventions for Zikula

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 Zikula

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 55.44%
yes yes 44.56%

Based on 12,436 array definitions

Historical
  • 01 May 2016: there was a 30.06% swing from no to yes
  • 01 Aug 2016: there was a 6.26% 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 29.24%
yes - Most popular method yes 70.76%

Based on 1,050 classes

Historical
  • 01 Aug 2016: there was a 6.54% swing from yes to no

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 72.29%
yes yes 27.71%

Based on 166 array definitions

Historical
  • 01 Feb 2015: there was a 3.92% swing from no to yes
  • 01 Mar 2015: there was a 3.15% swing from yes to no
  • 01 Apr 2016: there was a 3.56% swing from no to yes
  • 01 May 2016: there was a 11.51% swing from yes to no
  • 01 Aug 2016: there was a 3.45% swing from yes to no

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 25.24%
1 - Most popular method 1 73.87%
2 2 0.05%
newline newline 0.84%

Based on 3,704 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 24.6%
1 - Most popular method 1 74.38%
2 2 0.05%
newline newline 0.97%

Based on 3,704 concat operators

Historical
  • 01 Mar 2015: there was a 3.52% swing away from 0
    • there was a 3.14% swing towards 1

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
no no 21.14%
yes - Most popular method yes 78.86%

Based on 1,050 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 17.49%
yes - Most popular method yes 82.51%

Based on 6,642 functions

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
/* ... */ /* ... */ 17.04%
// ... - Most popular method // ... 82.96%

Based on 7,020 inline comments

Historical
  • 01 Aug 2016: there was a 14.9% swing from // ... to /* ... */

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 16.95%
yes - Most popular method yes 83.05%

Based on 1,050 classes

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 83.2%
yes yes 16.8%

Based on 1,256 files

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 84.93%
yes yes 15.07%

Based on 3,066 assignment blocks

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 85.88%
1 1 14.12%

Based on 510 cast statements

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 89.34%
81-120 81-120 8.77%
121-150 121-150 1.34%
151 or more 151 or more 0.54%

Based on 169,617 lines

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 91.03%
yes yes 8.97%

Based on 312 private methods

Historical
  • 01 Feb 2015: there was a 3.46% 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 5.59%
yes - Most popular method yes 94.41%

Based on 6,012 methods

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 96.12%
newline newline 3.88%

Based on 32,664 object operators

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 0.24%
1 - Most popular method 1 99.05%
4 4 0%
newline newline 0.71%

Based on 7,502 operators

Historical
  • 01 Sep 2016: there was a 5.7% swing towards 1

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.08%
same line same line 0.92%

Based on 6,385 functions

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.77%
elseif - Most popular method elseif 99.23%

Based on 389 elseif statements

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 0.4%
1 - Most popular method 1 99.52%
2 2 0.08%

Based on 1,255 files

Historical
  • 01 Jan 2016: there was a 15.31% swing away from 0
    • there was a 17.78% swing towards 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 99.6%
yes yes 0.4%

Based on 1,256 files

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 99.71%
same line same line 0.29%

Based on 1,050 classes

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 0.29%
yes - Most popular method yes 99.71%

Based on 1,050 classes

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
mixed mixed 0.26%
upper - Most popular method upper 99.74%

Based on 378 constants

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.76%
yes yes 0.24%

Based on 1,256 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.8%
yes yes 0.2%

Based on 9,935 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
1 - Most popular method 1 99.83%
Other other 0.17%

Based on 43,021 operators

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 0.16%
yes - Most popular method yes 99.84%

Based on 1,256 files

Historical
  • 01 May 2016: there was a 7.15% swing from no to yes

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

Based on 39,516 statements

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 99.97%
1 1 0.03%

Based on 10,183 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 99.99%
newline newline 0.01%

Based on 8,944 control structures

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 99.99%
1 1 0.01%

Based on 10,169 control structures

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 889 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 209 non-class files

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 140,021 indented lines

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 57,777 keywords

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 1,047 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 5,763 PHP constants

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 1,373 open tags

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 32,664 object operators

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

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 8,944 control structures

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

Based on 39 closures

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 6,895 array definitions

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 1,256 files

Historical