src/services/Logger.php
The property $is_active is not named in camelCase. Open
Open
class VindiLogger
{
/**
* identifier to WC_Logger
* @var string
- Read upRead up
- Exclude checks
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
Open
class VindiLogger
{
/**
* identifier to WC_Logger
* @var string
- Read upRead up
- Exclude checks
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
Open
private $is_active;
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
Open
}
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
Open
private $identifier;
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
Open
$this->main_logger = new WC_Logger();
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
Open
public function __construct($identifier, $is_active)
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
Open
$this->is_active = $is_active;
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
Open
private $main_logger;
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
Open
$this->identifier = $identifier;
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
Open
{
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 6 Open
Open
return true;
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 6 Open
Open
$this->main_logger->add($this->identifier, $message);
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
Open
}
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
Open
return false;
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
Open
public function log($message)
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
Open
if ($this->is_active) {
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
Open
}
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
Open
{
- Exclude checks