src/Utils/Helpers.php
The class Helpers has 11 public methods. Consider refactoring Helpers to keep number of public methods under 10. Open
Open
class Helpers
{
/**
* @param $checkedVariable
* @param $nameOfTheExpectedClass
- Read upRead up
- Exclude checks
TooManyPublicMethods
Since: 0.1
A class with too many public methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.
By default it ignores methods starting with 'get' or 'set'.
Example
Source https://phpmd.org/rules/codesize.html#toomanypublicmethods
The closing brace for the class must go on the next line after the body Open
Open
}
- Exclude checks
Line exceeds 120 characters; contains 124 characters Open
Open
public static function checkIfLeftOperandGreaterOrThrowAnException($leftOperand, $rightOperand, $messageOnException)
- Exclude checks
Opening parenthesis of a multi-line function call must be the last content on the line Open
Open
throw new InvalidArgumentException(ErrorMessages::getIncompatibleTypesMessage($nameOfTheExpectedClass,
- Exclude checks
Multi-line function call not indented correctly; expected 12 spaces but found 16 Open
Open
get_class($checkedVariable)));
- Exclude checks
Closing parenthesis of a multi-line function call must be on a line by itself Open
Open
get_class($checkedVariable)));
- Exclude checks