Embed Instructions

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

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

Analysis of Coding Conventions for phpMyAdmin

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 phpMyAdmin

Back to top

View project specific report

Project
Consistency

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 44.05%
yes - Most popular method yes 55.95%

Based on 454 array definitions

Historical
  • 01 Feb 2016: there was a 7.78% swing from no to yes
  • 01 Aug 2018: there was a 29.89% swing from no to yes

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
1 - Most popular method 1 58.13%
newline newline 41.87%

Based on 13,578 concat operators

Historical

Spacing after cast statement

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

Current
Key Method Use
0 0 35.82%
1 - Most popular method 1 64.18%

Based on 402 cast statements

Historical
  • 01 Nov 2015: there was a 6.06% swing from 1 to 0
  • 01 Jun 2018: there was a 21.65% swing from 0 to 1

Private method prefixed with underscore

Are private methods prefixed with an underscore?

Current
Key Method Use
no no 32.05%
yes - Most popular method yes 67.95%

Based on 468 private methods

Historical
  • 01 Feb 2018: there was a 5.82% swing from yes to no
  • 01 Mar 2018: there was a 18.95% 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 71.79%
yes yes 28.21%

Based on 521 files

Historical
  • 01 Aug 2015: there was a 7.32% swing from yes to no
  • 01 Nov 2015: there was a 3.33% swing from yes to no
  • 01 Mar 2016: there was a 4.62% swing from no to yes
  • 01 Oct 2017: there was a 12.44% swing from yes to no

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 74.55%
yes yes 25.45%

Based on 3,356 assignment blocks

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.03%
/* ... */ /* ... */ 16.73%
// ... - Most popular method // ... 83.24%

Based on 6,755 inline comments

Historical
  • 01 Feb 2016: there was a 8.52% swing from /* ... */ to // ...

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 86.54%
same line same line 13.46%

Based on 2,972 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
0 0 0.06%
1 - Most popular method 1 91.82%
newline newline 8.12%

Based on 6,933 operators

Historical

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 6.95%
yes - Most popular method yes 93.05%

Based on 374 classes

Historical
  • 01 Aug 2015: there was a 14.7% swing from no to yes
  • 01 Nov 2015: there was a 34.02% swing from no to yes

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 6.61%
yes - Most popular method yes 93.39%

Based on 2,827 methods

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 94.63%
yes yes 5.37%

Based on 521 files

Historical
  • 01 Aug 2015: there was a 7.3% swing from yes to no
  • 01 Nov 2015: there was a 16.25% swing from yes to no
  • 01 Dec 2015: there was a 26.72% swing from yes to no
  • 01 Oct 2017: there was a 6.48% swing from yes to no

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 97.29%
81-120 81-120 2.64%
121-150 121-150 0.04%
151 or more 151 or more 0.02%

Based on 153,692 lines

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 98.41%
newline newline 1.59%

Based on 13,578 concat operators

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.5%
newline newline 0.5%

Based on 19,139 object operators

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.62%
yes yes 0.38%

Based on 521 files

Historical
  • 01 Apr 2015: there was a 16.66% swing from yes to no
  • 01 Aug 2015: there was a 66.16% 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.34%
elseif - Most popular method elseif 99.66%

Based on 590 elseif statements

Historical
  • 01 Aug 2015: there was a 4.15% swing from else if to elseif
  • 01 Mar 2016: there was a 3.13% swing from elseif to else if
  • 01 Jan 2018: there was a 15.82% swing from else if to elseif

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.68%
Other other 0.32%

Based on 34,227 operators

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.8%
yes yes 0.2%

Based on 1,504 echo statements

Historical

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

Based on 3,499 array definitions

Historical
  • 01 Jun 2018: there was a 94.34% swing from no to yes

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

Based on 3,028 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 17,667 open tags

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

Based on 34,873 statements

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,379 PHP types

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

Based on 8,445 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 100%
1 1 0%

Based on 9,764 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 100%

Based on 9,730 control structures

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

Based on 374 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%
yes - Most popular method yes 100%

Based on 374 classes

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,445 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 147 non-class files

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

Based on 488 files

Historical
  • 01 Aug 2015: there was a 13.34% swing away from 0
    • there was a 16.1% swing towards 2
  • 01 Aug 2017: there was a 5.93% swing towards 1
    • there was a 4.39% swing away from 2
  • 01 Jun 2018: there was a 3.66% swing towards 1
    • there was a 3.46% swing away from 2

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 19,139 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 100%

Based on 3 array definitions

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 30 closures

Historical
  • 01 Feb 2016: there was a 7.69% swing from same line to new line
  • 01 Jun 2017: there was a 3.22% swing from new line to same line
  • 01 Jun 2018: there was a 3.33% swing from new line to same line

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 34,080 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 374 class 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 100%
1 1 0%

Based on 9,768 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 0%
yes - Most popular method yes 100%

Based on 374 classes

Historical
  • 01 Oct 2017: there was a 7.44% swing from yes to no
  • 01 Jun 2018: there was a 6.9% swing from no to yes

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

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
no no 0%
yes - Most popular method yes 100%

Based on 374 classes

Historical
  • 01 Aug 2015: there was a 23.9% swing from no to yes
  • 01 Sep 2015: there was a 3.24% swing from no to yes
  • 01 Nov 2015: there was a 70.26% swing from no to yes

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

Based on 521 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 4,073 PHP constants

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 129,436 indented lines

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

Based on 521 files

Historical