uruba/FinanCalc

View on GitHub
src/Utils/Helpers.php

Summary

Maintainability
A
0 mins
Test Coverage

The class Helpers has 11 public methods. Consider refactoring Helpers to keep number of public methods under 10.
Open

    class Helpers
    {
        /**
         * @param $checkedVariable
         * @param $nameOfTheExpectedClass
Severity: Minor
Found in src/Utils/Helpers.php by phpmd

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

    }
Severity: Minor
Found in src/Utils/Helpers.php by phpcodesniffer

Line exceeds 120 characters; contains 124 characters
Open

        public static function checkIfLeftOperandGreaterOrThrowAnException($leftOperand, $rightOperand, $messageOnException)
Severity: Minor
Found in src/Utils/Helpers.php by phpcodesniffer

Opening parenthesis of a multi-line function call must be the last content on the line
Open

            throw new InvalidArgumentException(ErrorMessages::getIncompatibleTypesMessage($nameOfTheExpectedClass,
Severity: Minor
Found in src/Utils/Helpers.php by phpcodesniffer

Multi-line function call not indented correctly; expected 12 spaces but found 16
Open

                get_class($checkedVariable)));
Severity: Minor
Found in src/Utils/Helpers.php by phpcodesniffer

Closing parenthesis of a multi-line function call must be on a line by itself
Open

                get_class($checkedVariable)));
Severity: Minor
Found in src/Utils/Helpers.php by phpcodesniffer

There are no issues that match your filters.

Category
Status