SergioMadness/pwf-helpers

View on GitHub

Showing 119 of 119 total issues

The first parameter of a multi-line function declaration must be on the line after the opening bracket
Open

    public static function validateLength($paramName, array $data,
Severity: Minor
Found in src/Validator.php by phpcodesniffer

The first parameter of a multi-line function declaration must be on the line after the opening bracket
Open

    public static function recursiveArraySearch($needleKey, $needleValue,
Severity: Minor
Found in src/ArrayHelper.php by phpcodesniffer

Multi-line function declaration not indented correctly; expected 8 spaces but found 38
Open

                                      array $params = array(),
Severity: Minor
Found in src/HttpHelper.php by phpcodesniffer

The closing parenthesis of a multi-line function declaration must be on a new line
Open

                                               array &$haystack)
Severity: Minor
Found in src/ArrayHelper.php by phpcodesniffer

The closing parenthesis and the opening brace of a multi-line function declaration must be on the same line
Open

    {
Severity: Minor
Found in src/HttpHelper.php by phpcodesniffer

The first parameter of a multi-line function declaration must be on the line after the opening bracket
Open

    public static function functionDI(\Closure $function,
Severity: Minor
Found in src/SystemHelpers.php by phpcodesniffer

The closing parenthesis and the opening brace of a multi-line function declaration must be on the same line
Open

    {
Severity: Minor
Found in src/SystemHelpers.php by phpcodesniffer

Multi-line function declaration not indented correctly; expected 8 spaces but found 44
Open

                                            array $params = [])
Severity: Minor
Found in src/Validator.php by phpcodesniffer

Multi-line function declaration not indented correctly; expected 8 spaces but found 42
Open

                                          array $params = [])
Severity: Minor
Found in src/Validator.php by phpcodesniffer

The closing parenthesis and the opening brace of a multi-line function declaration must be on the same line
Open

    {
Severity: Minor
Found in src/Validator.php by phpcodesniffer

TRUE, FALSE and NULL must be lowercase; expected "true" but found "TRUE"
Open

            $result = json_decode($json, TRUE);
Severity: Minor
Found in src/ConvertHelper.php by phpcodesniffer

The first parameter of a multi-line function declaration must be on the line after the opening bracket
Open

    public static function constructObject($className,
Severity: Minor
Found in src/SystemHelpers.php by phpcodesniffer

The closing parenthesis of a multi-line function declaration must be on a new line
Open

                                           array $constructorArguments = [])
Severity: Minor
Found in src/SystemHelpers.php by phpcodesniffer

Function array2XML has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public static function array2XML($haystack, $rootElementName = '')
    {
        $args   = func_get_args();
        $isRoot = !isset($args[2]);
        $root   = isset($args[3]) ? $args[3] : new \DOMDocument('1.0', 'utf-8');
Severity: Minor
Found in src/ConvertHelper.php - About 35 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Multi-line function declaration not indented correctly; expected 8 spaces but found 47
Open

                                               array &$haystack)
Severity: Minor
Found in src/ArrayHelper.php by phpcodesniffer

Multi-line function declaration not indented correctly; expected 8 spaces but found 38
Open

                                      array $options = array())
Severity: Minor
Found in src/HttpHelper.php by phpcodesniffer

The closing parenthesis and the opening brace of a multi-line function declaration must be on the same line
Open

    {
Severity: Minor
Found in src/HttpHelper.php by phpcodesniffer

Function methodDI has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public static function methodDI(array $objectInfo, \Closure $callback = null)
    {
        $reflection     = new \ReflectionObject($objectInfo[0]);
        $methods        = $reflection->getMethods();
        $inputParams    = [];
Severity: Minor
Found in src/SystemHelpers.php - About 35 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

The closing parenthesis and the opening brace of a multi-line function declaration must be on the same line
Open

    {
Severity: Minor
Found in src/ArrayHelper.php by phpcodesniffer

The first parameter of a multi-line function declaration must be on the line after the opening bracket
Open

    public static function sendPost($_url, $_data, $_headers = [],
Severity: Minor
Found in src/HttpHelper.php by phpcodesniffer
Severity
Category
Status
Source
Language