The method setType has a boolean flag argument $reset, which is a certain sign of a Single Responsibility Principle violation. Open
bool $reset = 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
The method getType has a boolean flag argument $outputType, which is a certain sign of a Single Responsibility Principle violation. Open
public function getType(bool $outputType = false): ?PropertyType;
- 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
The method setDefaultValue has a boolean flag argument $raw, which is a certain sign of a Single Responsibility Principle violation. Open
public function setDefaultValue(mixed $defaultValue, bool $raw = false): PropertyInterface;
- 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
The method getAttribute has a boolean flag argument $variableName, which is a certain sign of a Single Responsibility Principle violation. Open
public function getAttribute(bool $variableName = false): string;
- 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
The method getTypeHint has a boolean flag argument $outputType, which is a certain sign of a Single Responsibility Principle violation. Open
public function getTypeHint(bool $outputType = false, array $skipDecorators = []): string;
- 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
syntax error, unexpected ')', expecting variable (T_VARIABLE)
Open
): PropertyInterface;
- Exclude checks
Arguments with default values must be at the end of the argument list Open
bool $reset = false,
- Exclude checks