src/State/ExecutionLog/OutputFormat/StringLog.php
Avoid too many return
statements within this method. Open
Open
default: return "{$this->indentation} - " . $info->getInfo();
Avoid using static access to class '\PHPWorkflow\State\ExecutionLog\ExecutionLog' in method 'format'. Open
Open
ExecutionLog::mapStage($stage)
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
syntax error, unexpected 'string' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST)
Open
Open
private string $indentation = '';
- Exclude checks
The DEFAULT body must start on the line following the statement Open
Open
default: return "{$this->indentation} - " . $info->getInfo();
- Exclude checks
Terminating statement must be on a line by itself Open
Open
default: return "{$this->indentation} - " . $info->getInfo();
- Exclude checks
Closing brace must be on a line by itself Open
Open
default: return "{$this->indentation} - " . $info->getInfo();
- Exclude checks