tests/GanttTest.php
The method _fileCheck has a boolean flag argument $debug, which is a certain sign of a Single Responsibility Principle violation. Open
Open
private function _fileCheck($filename, &$ownFixtures = [], $debug = false)
- Read upRead up
- Exclude checks
BooleanArgumentFlag
Since: 1.4.0
A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.
Example
class Foo {
public function bar($flag = true) {
}
}
Source https://phpmd.org/rules/cleancode.html#booleanargumentflag
Each class must be in a namespace of at least one level (a top-level vendor name) Open
Open
class GanttTest extends \Codeception\Test\Unit
- Exclude checks
Method name "_fileCheck" should not be prefixed with an underscore to indicate visibility Open
Open
private function _fileCheck($filename, &$ownFixtures = [], $debug = false)
- Exclude checks
Method name "_before" should not be prefixed with an underscore to indicate visibility Open
Open
protected function _before()
- Exclude checks
Method name "_after" should not be prefixed with an underscore to indicate visibility Open
Open
protected function _after()
- Exclude checks
Whitespace found at end of line Open
Open
*
- Exclude checks