skqr/hateoas-bundle

View on GitHub
Util/HttpClientUtil.php

Summary

Maintainability
A
35 mins
Test Coverage

Method buildHttpClient has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

        $url = NULL,
        $username = NULL,
        $password = NULL,
        $contentType = self::CONTENT_JSON_API,
        $language = self::HEADER_LOCALE
Severity: Minor
Found in Util/HttpClientUtil.php - About 35 mins to fix

    Missing class import via use statement (line '56', column '21').
    Open

            $date = new \DateTime();
    Severity: Minor
    Found in Util/HttpClientUtil.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

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

            $url = NULL,
    Severity: Minor
    Found in Util/HttpClientUtil.php by phpcodesniffer

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

            $username = NULL,
    Severity: Minor
    Found in Util/HttpClientUtil.php by phpcodesniffer

    There must be one blank line after the namespace declaration
    Open

    namespace GoIntegro\Bundle\HateoasBundle\Util;
    Severity: Minor
    Found in Util/HttpClientUtil.php by phpcodesniffer

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

            $password = NULL,
    Severity: Minor
    Found in Util/HttpClientUtil.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 Util/HttpClientUtil.php by phpcodesniffer

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

                TRUE
    Severity: Minor
    Found in Util/HttpClientUtil.php by phpcodesniffer

    Line exceeds 120 characters; contains 130 characters
    Open

              WSSE_CREDENTIALS_PATTERN = "X-WSSE: UsernameToken Username=\"%s\", PasswordDigest=\"%s\", Nonce=\"%s\", Created=\"%s\"";
    Severity: Minor
    Found in Util/HttpClientUtil.php by phpcodesniffer

    Expected 1 newline at end of file; 0 found
    Open

    }
    Severity: Minor
    Found in Util/HttpClientUtil.php by phpcodesniffer

    There are no issues that match your filters.

    Category
    Status