core/ICrud.php
Method update
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
array $criteria,
array $inputs,
array $fieldsValues,
$limit = 0,
$extraDefinedInputs = [],
Method getAll
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function getAll(array $criteria = [], array $fromColumns = [], $order = null, $start = 0, $limit = 0);
The method update has a boolean flag argument $batchAction, which is a certain sign of a Single Responsibility Principle violation. Open
Open
$batchAction = 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 update has a boolean flag argument $excludeArchived, which is a certain sign of a Single Responsibility Principle violation. Open
Open
$excludeArchived = true,
- 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) {
}
}