Showing 125 of 125 total issues

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

        RamlDoc $ramlDoc, array $item, $itemKey = NULL
Severity: Minor
Found in DocExpander.php by phpcodesniffer

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

        return FALSE;
Severity: Minor
Found in Root/Map.php by phpcodesniffer

Expected 1 space after FUNCTION keyword; 0 found
Open

                    $callback = function($part) { return '/' . $part; };
Severity: Minor
Found in DocNavigator.php by phpcodesniffer

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

        return FALSE;
Severity: Minor
Found in Root/MapCollection.php by phpcodesniffer

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

    protected function dereferenceIncludes(array &$map, $fileDir = __DIR__)
    {
        foreach ($map as &$value) {
            if (is_string($value)) {
                if (RamlDoc::isInclude($value)) {
Severity: Minor
Found in MapCollectionParser.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

Each PHP statement must be on a line by itself
Open

        $callback = function($param) { return '<<' . $param . '>>'; };
Severity: Minor
Found in Root/ResourceType.php by phpcodesniffer

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

        $this->usage = !empty($source['usage']) ? $source['usage'] : NULL;
Severity: Minor
Found in Root/RamlTrait.php by phpcodesniffer

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

        $method, $resourceUri, $mediaType = RamlSpec::MEDIA_TYPE_JSON
Severity: Minor
Found in DocNavigator.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 DocExpander.php by phpcodesniffer

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

            if ($key === $name) return TRUE;
Severity: Minor
Found in Root/Map.php by phpcodesniffer

Each PHP statement must be on a line by itself
Open

        $callback = function($param) { return '<<' . $param . '>>'; };
Severity: Minor
Found in Root/RamlTrait.php by phpcodesniffer

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

        $this->usage = !empty($source['usage']) ? $source['usage'] : NULL;
Severity: Minor
Found in Root/ResourceType.php by phpcodesniffer

Missing class import via use statement (line '40', column '23').
Open

            throw new \ErrorException(
Severity: Minor
Found in DereferencesIncludes.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

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

                    throw new \ErrorException($message);
Severity: Minor
Found in Root/RamlTrait.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

Missing class import via use statement (line '58', column '27').
Open

                throw new \ErrorException(self::ERROR_ROOT_SCHEMA_VALUE);
Severity: Minor
Found in MapCollectionParser.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

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

                    throw new \ErrorException(
Severity: Minor
Found in MapCollectionParser.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

Missing class import via use statement (line '32', column '23').
Open

            throw new \ErrorException(
Severity: Minor
Found in DereferencesIncludes.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

Missing class import via use statement (line '65', column '23').
Open

            throw new \UnexpectedValueException($mediaType);
Severity: Minor
Found in DocNavigator.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

Missing class import via use statement (line '128', column '27').
Open

                throw new \ErrorException(self::ERROR_INVALID_KEY);
Severity: Minor
Found in DocNavigator.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

Missing class import via use statement (line '120', column '27').
Open

                throw new \ErrorException($message);
Severity: Minor
Found in DocExpander.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

Severity
Category
Status
Source
Language