bwinkers/nugget

View on GitHub

Showing 134 of 134 total issues

Avoid using undefined variables such as '$resolved' which will lead to PHP notices.
Open

    $property = array_merge($property, $resolved);
Severity: Minor
Found in src/bin/readPropertiesFromGoogle.php by phpmd

UndefinedVariable

Since: 2.8.0

Detects when a variable is used that has not been defined before.

Example

class Foo
{
    private function bar()
    {
        // $message is undefined
        echo $message;
    }
}

Source https://phpmd.org/rules/cleancode.html#undefinedvariable

Avoid using undefined variables such as '$resolved' which will lead to PHP notices.
Open

    $resolved['oneOf'] = $resolvedTypes;
Severity: Minor
Found in src/bin/readPropertiesFromGoogle.php by phpmd

UndefinedVariable

Since: 2.8.0

Detects when a variable is used that has not been defined before.

Example

class Foo
{
    private function bar()
    {
        // $message is undefined
        echo $message;
    }
}

Source https://phpmd.org/rules/cleancode.html#undefinedvariable

Avoid using undefined variables such as '$types' which will lead to PHP notices.
Open

            $this->types = $types;
Severity: Minor
Found in src/OpenAPI.php by phpmd

UndefinedVariable

Since: 2.8.0

Detects when a variable is used that has not been defined before.

Example

class Foo
{
    private function bar()
    {
        // $message is undefined
        echo $message;
    }
}

Source https://phpmd.org/rules/cleancode.html#undefinedvariable

A file should declare new symbols (classes, functions, constants, etc.) and cause no other side effects, or it should execute logic with side effects, but should not do both. The first symbol is defined on line 34 and the first side effect is on line 2.
Open

<?php
Severity: Minor
Found in src/bin/schemaFromObject.php by phpcodesniffer

A file should declare new symbols (classes, functions, constants, etc.) and cause no other side effects, or it should execute logic with side effects, but should not do both. The first symbol is defined on line 19 and the first side effect is on line 3.
Open

<?php

Blank line found at start of control structure
Open

        } catch (NuggetException $ex) {
Severity: Minor
Found in src/SClient.php by phpcodesniffer

PHP keywords must be lowercase; expected "and" but found "AND"
Open

    if (isset($parentDef->extends) AND is_string($parentDef->extends)) {
Severity: Minor
Found in src/bin/schemaFromObject.php by phpcodesniffer

PHP keywords must be lowercase; expected "and" but found "AND"
Open

    if (isset($schemaDef->extends) AND is_string($schemaDef->extends)) {
Severity: Minor
Found in src/bin/schemaFromObject.php by phpcodesniffer

Missing class import via use statement (line '24', column '29').
Open

        $this->schema = new \Activerules\Nugget\Schema();
Severity: Minor
Found in src/Nugget.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 '28', column '36').
Open

        $this->schemaBuilder = new \Activerules\Nugget\SchemaBuilder();
Severity: Minor
Found in src/Nugget.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 '26', column '30').
Open

        $this->openAPI = new \Activerules\Nugget\OpenAPI();
Severity: Minor
Found in src/Nugget.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 '35', column '22').
Open

        $files = new \DirectoryIterator($schemaDir);
Severity: Minor
Found in src/SchemaBuilder.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 '275', column '19').
Open

    $nugget = new \Activerules\Nugget\Nugget();
Severity: Minor
Found in src/bin/schemaFromObject.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 '38', column '18').
Open

    $files = new \DirectoryIterator($objectDir);
Severity: Minor
Found in src/bin/schemaFromObject.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 '36', column '19').
Open

    $nugget = new \Activerules\Nugget\Nugget();
Severity: Minor
Found in src/bin/schemaFromObject.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 '17', column '30').
Open

        $this->filesys = new \Activerules\Nugget\Filesys();
Severity: Minor
Found in src/JSON.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 '194', column '19').
Open

    $nugget = new \Activerules\Nugget\Nugget();
Severity: Minor
Found in src/bin/schemaFromObject.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 '150', column '19').
Open

    $nugget = new \Activerules\Nugget\Nugget();
Severity: Minor
Found in src/bin/readPropertiesFromGoogle.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 '25', column '26').
Open

        $validator = new \Activerules\JsonGuard\Validator($data, $schema);
Severity: Minor
Found in src/Schema.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 '22', column '23').
Open

            throw new \Activerules\Nugget\Exception\NuggetException('Invalid type, it must be a string.');
Severity: Minor
Found in src/OpenAPI.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