SergioMadness/pwf-helpers

View on GitHub
src/HttpHelper.php

Summary

Maintainability
A
0 mins
Test Coverage

Missing class import via use statement (line '84', column '31').
Open

            $soapClient = new \SoapClient($wsdlURL, $options);
Severity: Minor
Found in src/HttpHelper.php by phpmd

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

Source http://phpmd.org/rules/cleancode.html#MissingImport

The method sendPost has a boolean flag argument $_return_header, which is a certain sign of a Single Responsibility Principle violation.
Open

                                    $_return_header = true)
Severity: Minor
Found in src/HttpHelper.php by phpmd

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 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 $_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

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

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 $_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 $_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 $_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

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

    public static function invokeSoap($wsdlURL, $method,
Severity: Minor
Found in src/HttpHelper.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

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

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

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

                                      array $options = array())
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 sendPost($_url, $_data, $_headers = [],
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 invokeSoap($wsdlURL, $method,
Severity: Minor
Found in src/HttpHelper.php by phpcodesniffer

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

                                    $_return_header = true)
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

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 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

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

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

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

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

Expected 1 newline at end of file; 0 found
Open

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

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

        return self::sendCurl($_url,
Severity: Minor
Found in src/HttpHelper.php by phpcodesniffer

The variable $Curl 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

CamelCaseVariableName

Since: 0.2

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

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $_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

CamelCaseVariableName

Since: 0.2

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

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $_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

CamelCaseVariableName

Since: 0.2

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

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $_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

CamelCaseVariableName

Since: 0.2

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

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $_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

CamelCaseVariableName

Since: 0.2

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

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $_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

CamelCaseVariableName

Since: 0.2

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

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $_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

CamelCaseVariableName

Since: 0.2

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

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $CurlOutput 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

CamelCaseVariableName

Since: 0.2

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

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $_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

CamelCaseVariableName

Since: 0.2

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

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $Curl 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

CamelCaseVariableName

Since: 0.2

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

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $Curl 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

CamelCaseVariableName

Since: 0.2

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

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $CurlOutput 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

CamelCaseVariableName

Since: 0.2

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

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $Curl 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

CamelCaseVariableName

Since: 0.2

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

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $Curl 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

CamelCaseVariableName

Since: 0.2

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

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $_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

CamelCaseVariableName

Since: 0.2

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

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $Curl 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

CamelCaseVariableName

Since: 0.2

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

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

There are no issues that match your filters.

Category
Status