SergioMadness/pwf-helpers

View on GitHub

Showing 119 of 119 total issues

The parameter $_url is not named in camelCase.
Open

    public static function sendPost($_url, $_data, $_headers = [],
                                    $_return_header = true)
    {
        return self::sendCurl($_url,
                array(
Severity: Minor
Found in src/HttpHelper.php by phpmd

CamelCaseParameterName

Since: 0.2

It is considered best practice to use the camelCase notation to name parameters.

Example

class ClassName {
    public function doSomething($user_name) {
    }
}

Source

The parameter $_data is not named in camelCase.
Open

    public static function sendPost($_url, $_data, $_headers = [],
                                    $_return_header = true)
    {
        return self::sendCurl($_url,
                array(
Severity: Minor
Found in src/HttpHelper.php by phpmd

CamelCaseParameterName

Since: 0.2

It is considered best practice to use the camelCase notation to name parameters.

Example

class ClassName {
    public function doSomething($user_name) {
    }
}

Source

The parameter $_headers is not named in camelCase.
Open

    public static function sendPost($_url, $_data, $_headers = [],
                                    $_return_header = true)
    {
        return self::sendCurl($_url,
                array(
Severity: Minor
Found in src/HttpHelper.php by phpmd

CamelCaseParameterName

Since: 0.2

It is considered best practice to use the camelCase notation to name parameters.

Example

class ClassName {
    public function doSomething($user_name) {
    }
}

Source

The parameter $_params is not named in camelCase.
Open

    public static function sendCurl($_url, $_params)
    {
        $Curl                 = curl_init();
        $_params[CURLOPT_URL] = $_url;
        curl_setopt_array($Curl, $_params);
Severity: Minor
Found in src/HttpHelper.php by phpmd

CamelCaseParameterName

Since: 0.2

It is considered best practice to use the camelCase notation to name parameters.

Example

class ClassName {
    public function doSomething($user_name) {
    }
}

Source

Avoid variables with short names like $id. Configured minimum length is 3.
Open

            $id = $data[$groupField];
Severity: Minor
Found in src/ArrayHelper.php by phpmd

ShortVariable

Since: 0.2

Detects when a field, local, or parameter has a very short name.

Example

class Something {
    private $q = 15; // VIOLATION - Field
    public static function main( array $as ) { // VIOLATION - Formal
        $r = 20 + $this->q; // VIOLATION - Local
        for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
            $r += $this->q;
        }
    }
}

Source https://phpmd.org/rules/naming.html#shortvariable

Avoid variables with short names like $o. Configured minimum length is 3.
Open

    public static function toArray($o)
Severity: Minor
Found in src/ArrayHelper.php by phpmd

ShortVariable

Since: 0.2

Detects when a field, local, or parameter has a very short name.

Example

class Something {
    private $q = 15; // VIOLATION - Field
    public static function main( array $as ) { // VIOLATION - Formal
        $r = 20 + $this->q; // VIOLATION - Local
        for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
            $r += $this->q;
        }
    }
}

Source https://phpmd.org/rules/naming.html#shortvariable

The parameter $_path is not named in camelCase.
Open

    public static function isAbsoluteUrl($_path)
    {
        $url = parse_url($_path);

        return $url !== false && isset($url['scheme']) && $url['scheme'] != '';
Severity: Minor
Found in src/HttpHelper.php by phpmd

CamelCaseParameterName

Since: 0.2

It is considered best practice to use the camelCase notation to name parameters.

Example

class ClassName {
    public function doSomething($user_name) {
    }
}

Source

The parameter $_return_header is not named in camelCase.
Open

    public static function sendPost($_url, $_data, $_headers = [],
                                    $_return_header = true)
    {
        return self::sendCurl($_url,
                array(
Severity: Minor
Found in src/HttpHelper.php by phpmd

CamelCaseParameterName

Since: 0.2

It is considered best practice to use the camelCase notation to name parameters.

Example

class ClassName {
    public function doSomething($user_name) {
    }
}

Source

The parameter $_url is not named in camelCase.
Open

    public static function sendCurl($_url, $_params)
    {
        $Curl                 = curl_init();
        $_params[CURLOPT_URL] = $_url;
        curl_setopt_array($Curl, $_params);
Severity: Minor
Found in src/HttpHelper.php by phpmd

CamelCaseParameterName

Since: 0.2

It is considered best practice to use the camelCase notation to name parameters.

Example

class ClassName {
    public function doSomething($user_name) {
    }
}

Source

Multi-line function declarations must define one parameter per line
Open

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

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

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

Multi-line function declarations must define one parameter per line
Open

    public static function sendPost($_url, $_data, $_headers = [],
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

                                      \Closure $callback = null)
Severity: Minor
Found in src/SystemHelpers.php by phpcodesniffer

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

                                           array $constructorArguments = [])
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 $params = [])
Severity: Minor
Found in src/Validator.php by phpcodesniffer

Multi-line function declarations must define one parameter per line
Open

    public static function validateEquality($paramName, array $data,
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

Multi-line function declarations must define one parameter per line
Open

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

Multi-line function declarations must define one parameter per line
Open

    public static function sendPost($_url, $_data, $_headers = [],
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

                                    $_return_header = true)
Severity: Minor
Found in src/HttpHelper.php by phpcodesniffer
Severity
Category
Status
Source
Language