Method page
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function page() {
?>
<div class="wrap">
<h2><?php printf( __( 'Last %s commits', 'gitium' ), GITIUM_LAST_COMMITS ); ?></h2>
<table class="wp-list-table widefat plugins">
Avoid using undefined variables such as '$committer_email' which will lead to PHP notices. Open
$committers_avatar = '<div style="position:absolute; left:30px; border: 1px solid white; background:white; height:17px; top:30px; border-radius:2px">' . get_avatar( $committer_email, 16 ) . '</div>';
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$author_date' which will lead to PHP notices. Open
<span title="<?php echo esc_attr( $author_email ); ?>"><?php echo esc_html( $author_name ) . ' ' . sprintf( __( 'authored %s ago', 'gitium' ), human_time_diff( strtotime( $author_date ) ) ); ?></span><?php echo $committer; ?></div>
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$committer_name' which will lead to PHP notices. Open
unset( $committer_name );
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$committer_email' which will lead to PHP notices. Open
$committer = "<span title='$committer_email'> -> $committer_name " . sprintf( __( 'committed %s ago', 'gitium' ), human_time_diff( strtotime( $committer_date ) ) ) . '</span>';
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$author_email' which will lead to PHP notices. Open
<span title="<?php echo esc_attr( $author_email ); ?>"><?php echo esc_html( $author_name ) . ' ' . sprintf( __( 'authored %s ago', 'gitium' ), human_time_diff( strtotime( $author_date ) ) ); ?></span><?php echo $committer; ?></div>
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$subject' which will lead to PHP notices. Open
<div style="float:left; width:auto; height:auto;"><strong><?php echo esc_html( $subject ); ?></strong><br />
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$author_name' which will lead to PHP notices. Open
<span title="<?php echo esc_attr( $author_email ); ?>"><?php echo esc_html( $author_name ) . ' ' . sprintf( __( 'authored %s ago', 'gitium' ), human_time_diff( strtotime( $author_date ) ) ); ?></span><?php echo $committer; ?></div>
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$committer_date' which will lead to PHP notices. Open
$committer = "<span title='$committer_email'> -> $committer_name " . sprintf( __( 'committed %s ago', 'gitium' ), human_time_diff( strtotime( $committer_date ) ) ) . '</span>';
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$committer_name' which will lead to PHP notices. Open
$committer = "<span title='$committer_email'> -> $committer_name " . sprintf( __( 'committed %s ago', 'gitium' ), human_time_diff( strtotime( $committer_date ) ) ) . '</span>';
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$author_email' which will lead to PHP notices. Open
<div style="float:left; width:auto; height:auto; padding-left:2px; padding-right:5px; padding-top:2px; margin-right:5px; border-radius:2px"><?php echo get_avatar( $author_email, 32 ); ?></div>
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$committer_name' which will lead to PHP notices. Open
if ( isset( $committer_name ) ) {
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Missing class import via use statement (line '34', column '7'). Open
new Gitium_Help( $submenu_hook, 'commits' );
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
The method page uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$committer = '';
$committers_avatar = '';
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
Avoid unused local variables such as '$author_date'. Open
<span title="<?php echo esc_attr( $author_email ); ?>"><?php echo esc_html( $author_name ) . ' ' . sprintf( __( 'authored %s ago', 'gitium' ), human_time_diff( strtotime( $author_date ) ) ); ?></span><?php echo $committer; ?></div>
- Read upRead up
- Exclude checks
UnusedLocalVariable
Since: 0.2
Detects when a local variable is declared and/or assigned, but not used.
Example
class Foo {
public function doSomething()
{
$i = 5; // Unused
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable
Avoid unused local variables such as '$author_name'. Open
<span title="<?php echo esc_attr( $author_email ); ?>"><?php echo esc_html( $author_name ) . ' ' . sprintf( __( 'authored %s ago', 'gitium' ), human_time_diff( strtotime( $author_date ) ) ); ?></span><?php echo $committer; ?></div>
- Read upRead up
- Exclude checks
UnusedLocalVariable
Since: 0.2
Detects when a local variable is declared and/or assigned, but not used.
Example
class Foo {
public function doSomething()
{
$i = 5; // Unused
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable
Avoid unused local variables such as '$committer_date'. Open
$committer = "<span title='$committer_email'> -> $committer_name " . sprintf( __( 'committed %s ago', 'gitium' ), human_time_diff( strtotime( $committer_date ) ) ) . '</span>';
- Read upRead up
- Exclude checks
UnusedLocalVariable
Since: 0.2
Detects when a local variable is declared and/or assigned, but not used.
Example
class Foo {
public function doSomething()
{
$i = 5; // Unused
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable
Avoid unused local variables such as '$subject'. Open
<div style="float:left; width:auto; height:auto;"><strong><?php echo esc_html( $subject ); ?></strong><br />
- Read upRead up
- Exclude checks
UnusedLocalVariable
Since: 0.2
Detects when a local variable is declared and/or assigned, but not used.
Example
class Foo {
public function doSomething()
{
$i = 5; // Unused
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable
Each class must be in a namespace of at least one level (a top-level vendor name) Open
class Gitium_Submenu_Commits extends Gitium_Menu {
- Exclude checks
The class Gitium_Submenu_Commits is not named in CamelCase. Open
class Gitium_Submenu_Commits extends Gitium_Menu {
public function __construct() {
parent::__construct( $this->gitium_menu_slug, $this->commits_menu_slug );
add_action( GITIUM_ADMIN_MENU_ACTION, array( $this, 'admin_menu' ) );
- Read upRead up
- Exclude checks
CamelCaseClassName
Since: 0.2
It is considered best practice to use the CamelCase notation to name classes.
Example
class class_name {
}
Source
Space found before closing bracket of FOREACH loop Open
foreach ( $this->git->get_last_commits( GITIUM_LAST_COMMITS ) as $commit_id => $data ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
foreach ( $this->git->get_last_commits( GITIUM_LAST_COMMITS ) as $commit_id => $data ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( isset( $committer_name ) ) {
- Exclude checks
Opening brace of a class must be on the line after the definition Open
class Gitium_Submenu_Commits extends Gitium_Menu {
- Exclude checks
Method name "Gitium_Submenu_Commits::admin_menu" is not in camel caps format Open
public function admin_menu() {
- Exclude checks
Method name "Gitium_Submenu_Commits::table_start_row" is not in camel caps format Open
public function table_start_row() {
- Exclude checks
Space found after opening bracket of FOREACH loop Open
foreach ( $this->git->get_last_commits( GITIUM_LAST_COMMITS ) as $commit_id => $data ) {
- Exclude checks
Method name "Gitium_Submenu_Commits::table_head" is not in camel caps format Open
public function table_head() {
- Exclude checks
Method name "Gitium_Submenu_Commits::table_end_row" is not in camel caps format Open
public function table_end_row() {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
add_action( GITIUM_ADMIN_MENU_ACTION, array( $this, 'admin_menu' ) );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
<table class="wp-list-table widefat plugins">
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
GITIUM_MANAGE_OPTIONS_CAPABILITY,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
?>
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
<div style="float:left; width:auto; height:auto;"><strong><?php echo esc_html( $subject ); ?></strong><br />
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->menu_slug,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$counter++;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
<h2><?php printf( __( 'Last %s commits', 'gitium' ), GITIUM_LAST_COMMITS ); ?></h2>
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
<thead>
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function page() {
- Exclude checks
Line exceeds 120 characters; contains 200 characters Open
$committer = "<span title='$committer_email'> -> $committer_name " . sprintf( __( 'committed %s ago', 'gitium' ), human_time_diff( strtotime( $committer_date ) ) ) . '</span>';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
</tbody>
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
static $counter = 0;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$committers_avatar = '';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
</div>
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function table_head() {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
<th scope="col"><?php _e( 'Commits', 'gitium' ); ?></th>
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
extract( $data );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$committer = "<span title='$committer_email'> -> $committer_name " . sprintf( __( 'committed %s ago', 'gitium' ), human_time_diff( strtotime( $committer_date ) ) ) . '</span>';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function __construct() {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
</td>
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->table_end_row();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function admin_menu() {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
__( 'Commits', 'gitium' ),
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
<?php $this->table_head(); ?>
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$committer = '';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo '</tr>';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
<tr>
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
foreach ( $this->git->get_last_commits( GITIUM_LAST_COMMITS ) as $commit_id => $data ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
echo ( 0 != $counter % 2 ) ? '<tr class="active">' : '<tr class="inactive">';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
} else {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->table_start_row();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
?>
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
<?php
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
__( 'Git Commits', 'gitium' ),
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
</thead>
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
<td style="position:relative">
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
<?php echo $committers_avatar; ?>
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
<td><p style="padding-top:8px"><?php echo $commit_id; ?></p></td>
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
<?php
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$submenu_hook = add_submenu_page(
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
array( $this, 'page' )
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
new Gitium_Help( $submenu_hook, 'commits' );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
<th scope="col"></th>
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
unset( $committer_name );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
?>
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->submenu_slug,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function table_start_row() {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
<div class="wrap">
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
<tbody>
- Exclude checks
Line exceeds 120 characters; contains 215 characters Open
$committers_avatar = '<div style="position:absolute; left:30px; border: 1px solid white; background:white; height:17px; top:30px; border-radius:2px">' . get_avatar( $committer_email, 16 ) . '</div>';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Line exceeds 120 characters; contains 124 characters Open
<div style="float:left; width:auto; height:auto;"><strong><?php echo esc_html( $subject ); ?></strong><br />
- Exclude checks
Line exceeds 120 characters; contains 247 characters Open
<span title="<?php echo esc_attr( $author_email ); ?>"><?php echo esc_html( $author_name ) . ' ' . sprintf( __( 'authored %s ago', 'gitium' ), human_time_diff( strtotime( $author_date ) ) ); ?></span><?php echo $committer; ?></div>
- Exclude checks
Line exceeds 120 characters; contains 208 characters Open
<div style="float:left; width:auto; height:auto; padding-left:2px; padding-right:5px; padding-top:2px; margin-right:5px; border-radius:2px"><?php echo get_avatar( $author_email, 32 ); ?></div>
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
<span title="<?php echo esc_attr( $author_email ); ?>"><?php echo esc_html( $author_name ) . ' ' . sprintf( __( 'authored %s ago', 'gitium' ), human_time_diff( strtotime( $author_date ) ) ); ?></span><?php echo $committer; ?></div>
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
</table>
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
parent::__construct( $this->gitium_menu_slug, $this->commits_menu_slug );
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
?>
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
<?php
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
<?php
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ( isset( $committer_name ) ) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
</tr>
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function table_end_row() {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$committers_avatar = '<div style="position:absolute; left:30px; border: 1px solid white; background:white; height:17px; top:30px; border-radius:2px">' . get_avatar( $committer_email, 16 ) . '</div>';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
<div style="float:left; width:auto; height:auto; padding-left:2px; padding-right:5px; padding-top:2px; margin-right:5px; border-radius:2px"><?php echo get_avatar( $author_email, 32 ); ?></div>
- Exclude checks
Class name "Gitium_Submenu_Commits" is not in camel caps format Open
class Gitium_Submenu_Commits extends Gitium_Menu {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
__( 'Commits', 'gitium' ),
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
if ( isset( $committer_name ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$committer = "<span title='$committer_email'> -> $committer_name " . sprintf( __( 'committed %s ago', 'gitium' ), human_time_diff( strtotime( $committer_date ) ) ) . '</span>';
- Exclude checks
Opening brace should be on a new line Open
public function table_head() {
- Exclude checks
Opening brace should be on a new line Open
public function table_start_row() {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
<h2><?php printf( __( 'Last %s commits', 'gitium' ), GITIUM_LAST_COMMITS ); ?></h2>
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$committer = "<span title='$committer_email'> -> $committer_name " . sprintf( __( 'committed %s ago', 'gitium' ), human_time_diff( strtotime( $committer_date ) ) ) . '</span>';
- Exclude checks
Space after opening parenthesis of function call prohibited Open
<span title="<?php echo esc_attr( $author_email ); ?>"><?php echo esc_html( $author_name ) . ' ' . sprintf( __( 'authored %s ago', 'gitium' ), human_time_diff( strtotime( $author_date ) ) ); ?></span><?php echo $committer; ?></div>
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
<span title="<?php echo esc_attr( $author_email ); ?>"><?php echo esc_html( $author_name ) . ' ' . sprintf( __( 'authored %s ago', 'gitium' ), human_time_diff( strtotime( $author_date ) ) ); ?></span><?php echo $committer; ?></div>
- Exclude checks
Opening brace should be on a new line Open
public function admin_menu() {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$committer = "<span title='$committer_email'> -> $committer_name " . sprintf( __( 'committed %s ago', 'gitium' ), human_time_diff( strtotime( $committer_date ) ) ) . '</span>';
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
__( 'Commits', 'gitium' ),
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
<th scope="col"><?php _e( 'Commits', 'gitium' ); ?></th>
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
parent::__construct( $this->gitium_menu_slug, $this->commits_menu_slug );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
__( 'Git Commits', 'gitium' ),
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
<h2><?php printf( __( 'Last %s commits', 'gitium' ), GITIUM_LAST_COMMITS ); ?></h2>
- Exclude checks
Space after opening parenthesis of function call prohibited Open
foreach ( $this->git->get_last_commits( GITIUM_LAST_COMMITS ) as $commit_id => $data ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
unset( $committer_name );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
<span title="<?php echo esc_attr( $author_email ); ?>"><?php echo esc_html( $author_name ) . ' ' . sprintf( __( 'authored %s ago', 'gitium' ), human_time_diff( strtotime( $author_date ) ) ); ?></span><?php echo $committer; ?></div>
- Exclude checks
Opening brace should be on a new line Open
public function __construct() {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
__( 'Git Commits', 'gitium' ),
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
foreach ( $this->git->get_last_commits( GITIUM_LAST_COMMITS ) as $commit_id => $data ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
<span title="<?php echo esc_attr( $author_email ); ?>"><?php echo esc_html( $author_name ) . ' ' . sprintf( __( 'authored %s ago', 'gitium' ), human_time_diff( strtotime( $author_date ) ) ); ?></span><?php echo $committer; ?></div>
- Exclude checks
Space after opening parenthesis of function call prohibited Open
<div style="float:left; width:auto; height:auto;"><strong><?php echo esc_html( $subject ); ?></strong><br />
- Exclude checks
Space after opening parenthesis of function call prohibited Open
<th scope="col"><?php _e( 'Commits', 'gitium' ); ?></th>
- Exclude checks
Opening brace should be on a new line Open
public function page() {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
<span title="<?php echo esc_attr( $author_email ); ?>"><?php echo esc_html( $author_name ) . ' ' . sprintf( __( 'authored %s ago', 'gitium' ), human_time_diff( strtotime( $author_date ) ) ); ?></span><?php echo $committer; ?></div>
- Exclude checks
Space after opening parenthesis of function call prohibited Open
new Gitium_Help( $submenu_hook, 'commits' );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
add_action( GITIUM_ADMIN_MENU_ACTION, array( $this, 'admin_menu' ) );
- Exclude checks
Opening brace should be on a new line Open
public function table_end_row() {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
<h2><?php printf( __( 'Last %s commits', 'gitium' ), GITIUM_LAST_COMMITS ); ?></h2>
- Exclude checks
Space after opening parenthesis of function call prohibited Open
<h2><?php printf( __( 'Last %s commits', 'gitium' ), GITIUM_LAST_COMMITS ); ?></h2>
- Exclude checks
Space after opening parenthesis of function call prohibited Open
if ( isset( $committer_name ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$committers_avatar = '<div style="position:absolute; left:30px; border: 1px solid white; background:white; height:17px; top:30px; border-radius:2px">' . get_avatar( $committer_email, 16 ) . '</div>';
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$committer = "<span title='$committer_email'> -> $committer_name " . sprintf( __( 'committed %s ago', 'gitium' ), human_time_diff( strtotime( $committer_date ) ) ) . '</span>';
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
<div style="float:left; width:auto; height:auto; padding-left:2px; padding-right:5px; padding-top:2px; margin-right:5px; border-radius:2px"><?php echo get_avatar( $author_email, 32 ); ?></div>
- Exclude checks
Space after opening parenthesis of function call prohibited Open
<span title="<?php echo esc_attr( $author_email ); ?>"><?php echo esc_html( $author_name ) . ' ' . sprintf( __( 'authored %s ago', 'gitium' ), human_time_diff( strtotime( $author_date ) ) ); ?></span><?php echo $committer; ?></div>
- Exclude checks
Space after opening parenthesis of function call prohibited Open
parent::__construct( $this->gitium_menu_slug, $this->commits_menu_slug );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
add_action( GITIUM_ADMIN_MENU_ACTION, array( $this, 'admin_menu' ) );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
extract( $data );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$committer = "<span title='$committer_email'> -> $committer_name " . sprintf( __( 'committed %s ago', 'gitium' ), human_time_diff( strtotime( $committer_date ) ) ) . '</span>';
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$committers_avatar = '<div style="position:absolute; left:30px; border: 1px solid white; background:white; height:17px; top:30px; border-radius:2px">' . get_avatar( $committer_email, 16 ) . '</div>';
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
new Gitium_Help( $submenu_hook, 'commits' );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$committer = "<span title='$committer_email'> -> $committer_name " . sprintf( __( 'committed %s ago', 'gitium' ), human_time_diff( strtotime( $committer_date ) ) ) . '</span>';
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$committer = "<span title='$committer_email'> -> $committer_name " . sprintf( __( 'committed %s ago', 'gitium' ), human_time_diff( strtotime( $committer_date ) ) ) . '</span>';
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
<div style="float:left; width:auto; height:auto;"><strong><?php echo esc_html( $subject ); ?></strong><br />
- Exclude checks
Space after opening parenthesis of function call prohibited Open
<span title="<?php echo esc_attr( $author_email ); ?>"><?php echo esc_html( $author_name ) . ' ' . sprintf( __( 'authored %s ago', 'gitium' ), human_time_diff( strtotime( $author_date ) ) ); ?></span><?php echo $committer; ?></div>
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
unset( $committer_name );
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$committer = "<span title='$committer_email'> -> $committer_name " . sprintf( __( 'committed %s ago', 'gitium' ), human_time_diff( strtotime( $committer_date ) ) ) . '</span>';
- Exclude checks
Space after opening parenthesis of function call prohibited Open
<div style="float:left; width:auto; height:auto; padding-left:2px; padding-right:5px; padding-top:2px; margin-right:5px; border-radius:2px"><?php echo get_avatar( $author_email, 32 ); ?></div>
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
if ( isset( $committer_name ) ) {
- Exclude checks
Space after opening parenthesis of function call prohibited Open
<span title="<?php echo esc_attr( $author_email ); ?>"><?php echo esc_html( $author_name ) . ' ' . sprintf( __( 'authored %s ago', 'gitium' ), human_time_diff( strtotime( $author_date ) ) ); ?></span><?php echo $committer; ?></div>
- Exclude checks
Space after opening parenthesis of function call prohibited Open
<span title="<?php echo esc_attr( $author_email ); ?>"><?php echo esc_html( $author_name ) . ' ' . sprintf( __( 'authored %s ago', 'gitium' ), human_time_diff( strtotime( $author_date ) ) ); ?></span><?php echo $committer; ?></div>
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
<span title="<?php echo esc_attr( $author_email ); ?>"><?php echo esc_html( $author_name ) . ' ' . sprintf( __( 'authored %s ago', 'gitium' ), human_time_diff( strtotime( $author_date ) ) ); ?></span><?php echo $committer; ?></div>
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
<span title="<?php echo esc_attr( $author_email ); ?>"><?php echo esc_html( $author_name ) . ' ' . sprintf( __( 'authored %s ago', 'gitium' ), human_time_diff( strtotime( $author_date ) ) ); ?></span><?php echo $committer; ?></div>
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
<span title="<?php echo esc_attr( $author_email ); ?>"><?php echo esc_html( $author_name ) . ' ' . sprintf( __( 'authored %s ago', 'gitium' ), human_time_diff( strtotime( $author_date ) ) ); ?></span><?php echo $committer; ?></div>
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
foreach ( $this->git->get_last_commits( GITIUM_LAST_COMMITS ) as $commit_id => $data ) {
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
extract( $data );
- Exclude checks
The variable $submenu_hook is not named in camelCase. Open
public function admin_menu() {
$submenu_hook = add_submenu_page(
$this->menu_slug,
__( 'Git Commits', 'gitium' ),
__( 'Commits', 'gitium' ),
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $author_email is not named in camelCase. Open
public function page() {
?>
<div class="wrap">
<h2><?php printf( __( 'Last %s commits', 'gitium' ), GITIUM_LAST_COMMITS ); ?></h2>
<table class="wp-list-table widefat plugins">
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $committers_avatar is not named in camelCase. Open
public function page() {
?>
<div class="wrap">
<h2><?php printf( __( 'Last %s commits', 'gitium' ), GITIUM_LAST_COMMITS ); ?></h2>
<table class="wp-list-table widefat plugins">
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $author_date is not named in camelCase. Open
public function page() {
?>
<div class="wrap">
<h2><?php printf( __( 'Last %s commits', 'gitium' ), GITIUM_LAST_COMMITS ); ?></h2>
<table class="wp-list-table widefat plugins">
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $committer_name is not named in camelCase. Open
public function page() {
?>
<div class="wrap">
<h2><?php printf( __( 'Last %s commits', 'gitium' ), GITIUM_LAST_COMMITS ); ?></h2>
<table class="wp-list-table widefat plugins">
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $committer_date is not named in camelCase. Open
public function page() {
?>
<div class="wrap">
<h2><?php printf( __( 'Last %s commits', 'gitium' ), GITIUM_LAST_COMMITS ); ?></h2>
<table class="wp-list-table widefat plugins">
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $committers_avatar is not named in camelCase. Open
public function page() {
?>
<div class="wrap">
<h2><?php printf( __( 'Last %s commits', 'gitium' ), GITIUM_LAST_COMMITS ); ?></h2>
<table class="wp-list-table widefat plugins">
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $committers_avatar is not named in camelCase. Open
public function page() {
?>
<div class="wrap">
<h2><?php printf( __( 'Last %s commits', 'gitium' ), GITIUM_LAST_COMMITS ); ?></h2>
<table class="wp-list-table widefat plugins">
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $committer_email is not named in camelCase. Open
public function page() {
?>
<div class="wrap">
<h2><?php printf( __( 'Last %s commits', 'gitium' ), GITIUM_LAST_COMMITS ); ?></h2>
<table class="wp-list-table widefat plugins">
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $committer_email is not named in camelCase. Open
public function page() {
?>
<div class="wrap">
<h2><?php printf( __( 'Last %s commits', 'gitium' ), GITIUM_LAST_COMMITS ); ?></h2>
<table class="wp-list-table widefat plugins">
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $commit_id is not named in camelCase. Open
public function page() {
?>
<div class="wrap">
<h2><?php printf( __( 'Last %s commits', 'gitium' ), GITIUM_LAST_COMMITS ); ?></h2>
<table class="wp-list-table widefat plugins">
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $committer_name is not named in camelCase. Open
public function page() {
?>
<div class="wrap">
<h2><?php printf( __( 'Last %s commits', 'gitium' ), GITIUM_LAST_COMMITS ); ?></h2>
<table class="wp-list-table widefat plugins">
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $author_email is not named in camelCase. Open
public function page() {
?>
<div class="wrap">
<h2><?php printf( __( 'Last %s commits', 'gitium' ), GITIUM_LAST_COMMITS ); ?></h2>
<table class="wp-list-table widefat plugins">
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $committer_name is not named in camelCase. Open
public function page() {
?>
<div class="wrap">
<h2><?php printf( __( 'Last %s commits', 'gitium' ), GITIUM_LAST_COMMITS ); ?></h2>
<table class="wp-list-table widefat plugins">
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $commit_id is not named in camelCase. Open
public function page() {
?>
<div class="wrap">
<h2><?php printf( __( 'Last %s commits', 'gitium' ), GITIUM_LAST_COMMITS ); ?></h2>
<table class="wp-list-table widefat plugins">
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $submenu_hook is not named in camelCase. Open
public function admin_menu() {
$submenu_hook = add_submenu_page(
$this->menu_slug,
__( 'Git Commits', 'gitium' ),
__( 'Commits', 'gitium' ),
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $author_name is not named in camelCase. Open
public function page() {
?>
<div class="wrap">
<h2><?php printf( __( 'Last %s commits', 'gitium' ), GITIUM_LAST_COMMITS ); ?></h2>
<table class="wp-list-table widefat plugins">
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The method table_head is not named in camelCase. Open
public function table_head() {
?>
<thead>
<tr>
<th scope="col"><?php _e( 'Commits', 'gitium' ); ?></th>
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method table_end_row is not named in camelCase. Open
public function table_end_row() {
echo '</tr>';
}
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method admin_menu is not named in camelCase. Open
public function admin_menu() {
$submenu_hook = add_submenu_page(
$this->menu_slug,
__( 'Git Commits', 'gitium' ),
__( 'Commits', 'gitium' ),
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method table_start_row is not named in camelCase. Open
public function table_start_row() {
static $counter = 0;
$counter++;
echo ( 0 != $counter % 2 ) ? '<tr class="active">' : '<tr class="inactive">';
}
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}