vindi/vindi-woocommerce

View on GitHub
src/services/Logger.php

Summary

Maintainability
A
0 mins
Test Coverage

The property $is_active is not named in camelCase.
Open

class VindiLogger
{
  /**
   * identifier to WC_Logger
   * @var string
Severity: Minor
Found in src/services/Logger.php by phpmd

CamelCasePropertyName

Since: 0.2

It is considered best practice to use the camelCase notation to name attributes.

Example

class ClassName {
    protected $property_name;
}

Source

The property $main_logger is not named in camelCase.
Open

class VindiLogger
{
  /**
   * identifier to WC_Logger
   * @var string
Severity: Minor
Found in src/services/Logger.php by phpmd

CamelCasePropertyName

Since: 0.2

It is considered best practice to use the camelCase notation to name attributes.

Example

class ClassName {
    protected $property_name;
}

Source

Line indented incorrectly; expected 4 spaces, found 2
Open

  private $is_active;
Severity: Minor
Found in src/services/Logger.php by phpcodesniffer

Line indented incorrectly; expected 4 spaces, found 2
Open

  }
Severity: Minor
Found in src/services/Logger.php by phpcodesniffer

Line indented incorrectly; expected 4 spaces, found 2
Open

  private $identifier;
Severity: Minor
Found in src/services/Logger.php by phpcodesniffer

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

    $this->main_logger = new WC_Logger();
Severity: Minor
Found in src/services/Logger.php by phpcodesniffer

Line indented incorrectly; expected 4 spaces, found 2
Open

  public function __construct($identifier, $is_active)
Severity: Minor
Found in src/services/Logger.php by phpcodesniffer

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

    $this->is_active   = $is_active;
Severity: Minor
Found in src/services/Logger.php by phpcodesniffer

Line indented incorrectly; expected 4 spaces, found 2
Open

  private $main_logger;
Severity: Minor
Found in src/services/Logger.php by phpcodesniffer

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

    $this->identifier  = $identifier;
Severity: Minor
Found in src/services/Logger.php by phpcodesniffer

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

  {
Severity: Minor
Found in src/services/Logger.php by phpcodesniffer

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

      return true;
Severity: Minor
Found in src/services/Logger.php by phpcodesniffer

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

      $this->main_logger->add($this->identifier, $message);
Severity: Minor
Found in src/services/Logger.php by phpcodesniffer

Line indented incorrectly; expected 8 spaces, found 4
Open

    }
Severity: Minor
Found in src/services/Logger.php by phpcodesniffer

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

    return false;
Severity: Minor
Found in src/services/Logger.php by phpcodesniffer

Line indented incorrectly; expected 4 spaces, found 2
Open

  public function log($message)
Severity: Minor
Found in src/services/Logger.php by phpcodesniffer

Line indented incorrectly; expected 8 spaces, found 4
Open

    if ($this->is_active) {
Severity: Minor
Found in src/services/Logger.php by phpcodesniffer

Line indented incorrectly; expected 4 spaces, found 2
Open

  }
Severity: Minor
Found in src/services/Logger.php by phpcodesniffer

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

  {
Severity: Minor
Found in src/services/Logger.php by phpcodesniffer

There are no issues that match your filters.

Category
Status