Embed Instructions

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

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

Analysis of Coding Conventions for Revive Adserver

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 Revive Adserver

Back to top

View project specific report

Project
Consistency

Spacing before string concat

How many spaces precede the string concatenation operator?

Current
Key Method Use
0 - Most popular method 0 47.75%
1 1 46.28%
2 2 2.84%
newline newline 3.13%

Based on 15,516 concat operators

Historical

PascalCase class name

Are class names defined using PascalCase?

Current
Key Method Use
no - Most popular method no 51.7%
yes yes 48.3%

Based on 176 classes

Historical

Spacing after string concat

How many spaces follow the string concatenation operator?

Current
Key Method Use
0 - Most popular method 0 52.83%
1 1 45.97%
newline newline 1.06%
Other other 0.15%

Based on 15,516 concat operators

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.)?

Current
Key Method Use
no no 47.1%
yes - Most popular method yes 52.9%

Based on 586 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 39.01%
1 - Most popular method 1 58.87%
2 2 1.6%
Other other 0.53%

Based on 564 files

Historical

Lowercase filename

Are PHP filenames lowercase?

Current
Key Method Use
no no 40.1%
yes - Most popular method yes 59.9%

Based on 586 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.15%
/* ... */ /* ... */ 33.57%
// ... - Most popular method // ... 66.27%

Based on 5,263 inline comments

Historical

Function has doc comment

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

Current
Key Method Use
no - Most popular method no 77.28%
yes yes 22.72%

Based on 4,472 functions

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 79.89%
yes yes 20.11%

Based on 522 array definitions

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 85.19%
yes yes 14.81%

Based on 5,287 assignment blocks

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 14.68%
elseif - Most popular method elseif 85.32%

Based on 1,683 elseif statements

Historical

PHP closing tag at EOF

Is there a PHP closing tag at the end of the file?

Current
Key Method Use
no no 13.82%
yes - Most popular method yes 86.18%

Based on 586 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
lower lower 2.32%
mixed mixed 8.12%
upper - Most popular method upper 89.57%

Based on 345 constants

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 89.89%
same line same line 10.11%

Based on 4,469 functions

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

Based on 176 classes

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.27%
81-120 81-120 6.18%
121-150 121-150 0.98%
151 or more 151 or more 0.56%

Based on 143,354 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 92.79%
1 1 7.21%

Based on 763 cast statements

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 5.96%
1 - Most popular method 1 93.13%
Other other 0.92%

Based on 12,539 operators

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 1.84%
spaces - Most popular method spaces 93.22%
tabs tabs 4.94%

Based on 43,302 indented lines

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 95.4%
yes yes 4.6%

Based on 18,499 control structures

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 95.93%
1 1 4.05%
2 2 0.01%

Based on 17,660 control structures

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

Based on 1,803 methods

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 1.32%
1 - Most popular method 1 98.33%
Other other 0.35%

Based on 54,204 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 1.54%
yes - Most popular method yes 98.46%

Based on 586 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 98.86%
same line same line 1.14%

Based on 176 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 1.14%
yes - Most popular method yes 98.86%

Based on 176 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.97%
1 1 1.03%
2 2 0.01%

Based on 17,636 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.05%
1 1 0.72%
2 2 0.08%
newline newline 0.15%

Based on 15,327 control structures

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

Based on 51,007 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.25%
yes yes 0.75%

Based on 5,631 array definitions

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.63%
1 1 0.36%
2 2 0.01%

Based on 15,327 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 99.66%
yes yes 0.34%

Based on 1,750 echo statements

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.91%
upper upper 0.09%

Based on 50,742 keywords

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 99.94%
upper upper 0.06%

Based on 7,709 PHP constants

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.94%
newline newline 0.06%

Based on 8,815 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 412 non-class files

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

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

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

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 2,563 global functions

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 5,589 array definitions

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,726 open tags

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 176 classes

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 8,815 object operators

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 9 private methods

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 586 files

Historical