vindi/vindi-woocommerce

View on GitHub
src/includes/admin/ProductStatus.php

Summary

Maintainability
A
0 mins
Test Coverage

Showing 22 of 22 total issues

The property $vindi_settings is not named in camelCase.
Open

class VindiProductStatus
{
 
/**
* @var VindiSettings
Severity: Minor
Found in src/includes/admin/ProductStatus.php by phpmd

A file should declare new symbols (classes, functions, constants, etc.) and cause no other side effects, or it should execute logic with side effects, but should not do both. The first symbol is defined on line 9 and the first side effect is on line 6.
Open

<?php

Visibility must be declared on method "__construct"
Open

function __construct(VindiSettings $vindi_settings)

Expected 0 spaces before closing bracket; 1 found
Open

if ( ! defined( 'ABSPATH' ) ) {

Inline control structures are not allowed
Open

if(empty(get_transient('vindi_product_message')))

Spaces must be used to indent lines; tabs are not allowed
Open

exit; // Exit if accessed directly

Line indented incorrectly; expected 4 spaces, found 2
Open

}

Line indented incorrectly; expected at least 8 spaces, found 4
Open

include_once VINDI_SRC . 'views/product-status.php';

Line indented incorrectly; expected 4 spaces, found 2
Open

}

Line indented incorrectly; expected at least 8 spaces, found 4
Open

add_action('admin_notices', array(&$this, 'product_status_notifier'));

Line indented incorrectly; expected at least 4 spaces, found 2
Open

{

Expected 1 space after IF keyword; 0 found
Open

if(empty(get_transient('vindi_product_message')))

Expected 0 spaces after opening bracket; 1 found
Open

if ( ! defined( 'ABSPATH' ) ) {

Line indented incorrectly; expected 4 spaces, found 2
Open

private $vindi_settings;

Line indented incorrectly; expected at least 8 spaces, found 4
Open

if(empty(get_transient('vindi_product_message')))

Line indented incorrectly; expected at least 4 spaces, found 2
Open

{

Line indented incorrectly; expected at least 8 spaces, found 4
Open

$this->vindi_settings = $vindi_settings;

Expected 0 spaces before closing bracket; 1 found
Open

if ( ! defined( 'ABSPATH' ) ) {

Line indented incorrectly; expected at least 8 spaces, found 6
Open

return;

Space after opening parenthesis of function call prohibited
Open

if ( ! defined( 'ABSPATH' ) ) {

Line indented incorrectly; expected 4 spaces, found 2
Open

function __construct(VindiSettings $vindi_settings)

Line indented incorrectly; expected 4 spaces, found 2
Open

public function product_status_notifier()

There are no issues that match your filters.

Category
Status