njuhel/php-swagger-to-md

View on GitHub
src/SwaggerValidator/Override.php

Summary

Maintainability
A
0 mins
Test Coverage

The class Override has a coupling between objects value of 27. Consider to reduce the number of dependencies under 13.
Open

class Override
{

    public static function override()
    {
Severity: Minor
Found in src/SwaggerValidator/Override.php by phpmd

CouplingBetweenObjects

Since: 1.1.0

A class with too many dependencies has negative impacts on several quality aspects of a class. This includes quality criteria like stability, maintainability and understandability

Example

class Foo {
    /**
     * @var \foo\bar\X
     */
    private $x = null;

    /**
     * @var \foo\bar\Y
     */
    private $y = null;

    /**
     * @var \foo\bar\Z
     */
    private $z = null;

    public function setFoo(\Foo $foo) {}
    public function setBar(\Bar $bar) {}
    public function setBaz(\Baz $baz) {}

    /**
     * @return \SplObjectStorage
     * @throws \OutOfRangeException
     * @throws \InvalidArgumentException
     * @throws \ErrorException
     */
    public function process(\Iterator $it) {}

    // ...
}

Source https://phpmd.org/rules/design.html#couplingbetweenobjects

Missing class import via use statement (line '53', column '121').
Open

        \SwaggerValidator\Common\Factory::getInstance()->set(\SwaggerValidator\Common\CollectionType::ResponseItem, new \Swagger2md\SwaggerValidator\Object\ResponseItem());
Severity: Minor
Found in src/SwaggerValidator/Override.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 '123').
Open

        \SwaggerValidator\Common\Factory::getInstance()->set(\SwaggerValidator\Common\CollectionType::TypeArrayItems, new \Swagger2md\SwaggerValidator\DataType\TypeArrayItems());
Severity: Minor
Found in src/SwaggerValidator/Override.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 '120').
Open

        \SwaggerValidator\Common\Factory::getInstance()->set(\SwaggerValidator\Common\CollectionType::TypeInteger, new \Swagger2md\SwaggerValidator\DataType\TypeInteger());
Severity: Minor
Found in src/SwaggerValidator/Override.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 '37', column '118').
Open

        \SwaggerValidator\Common\Factory::getInstance()->set(\SwaggerValidator\Common\CollectionType::TypeArray, new \Swagger2md\SwaggerValidator\DataType\TypeArray());
Severity: Minor
Found in src/SwaggerValidator/Override.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 '60', column '116').
Open

        \SwaggerValidator\Common\Factory::getInstance()->set(\SwaggerValidator\Common\CollectionType::Contact, new \Swagger2md\SwaggerValidator\Object\Contact());
Severity: Minor
Found in src/SwaggerValidator/Override.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 '42', column '119').
Open

        \SwaggerValidator\Common\Factory::getInstance()->set(\SwaggerValidator\Common\CollectionType::TypeNumber, new \Swagger2md\SwaggerValidator\DataType\TypeNumber());
Severity: Minor
Found in src/SwaggerValidator/Override.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 '43', column '117').
Open

        \SwaggerValidator\Common\Factory::getInstance()->set(\SwaggerValidator\Common\CollectionType::TypeFile, new \Swagger2md\SwaggerValidator\DataType\TypeFile());
Severity: Minor
Found in src/SwaggerValidator/Override.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 '49', column '122').
Open

        \SwaggerValidator\Common\Factory::getInstance()->set(\SwaggerValidator\Common\CollectionType::ParameterBody, new \Swagger2md\SwaggerValidator\Object\ParameterBody());
Severity: Minor
Found in src/SwaggerValidator/Override.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 '46', column '119').
Open

        \SwaggerValidator\Common\Factory::getInstance()->set(\SwaggerValidator\Common\CollectionType::Parameters, new \Swagger2md\SwaggerValidator\Object\Parameters());
Severity: Minor
Found in src/SwaggerValidator/Override.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 '50', column '116').
Open

        \SwaggerValidator\Common\Factory::getInstance()->set(\SwaggerValidator\Common\CollectionType::Swagger, new \Swagger2md\SwaggerValidator\Object\Swagger());
Severity: Minor
Found in src/SwaggerValidator/Override.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 '40', column '119').
Open

        \SwaggerValidator\Common\Factory::getInstance()->set(\SwaggerValidator\Common\CollectionType::TypeObject, new \Swagger2md\SwaggerValidator\DataType\TypeObject());
Severity: Minor
Found in src/SwaggerValidator/Override.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 '57', column '116').
Open

        \SwaggerValidator\Common\Factory::getInstance()->set(\SwaggerValidator\Common\CollectionType::License, new \Swagger2md\SwaggerValidator\Object\License());
Severity: Minor
Found in src/SwaggerValidator/Override.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 '39', column '120').
Open

        \SwaggerValidator\Common\Factory::getInstance()->set(\SwaggerValidator\Common\CollectionType::TypeBoolean, new \Swagger2md\SwaggerValidator\DataType\TypeBoolean());
Severity: Minor
Found in src/SwaggerValidator/Override.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 '47', column '118').
Open

        \SwaggerValidator\Common\Factory::getInstance()->set(\SwaggerValidator\Common\CollectionType::Responses, new \Swagger2md\SwaggerValidator\Object\Responses());
Severity: Minor
Found in src/SwaggerValidator/Override.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 '56', column '117').
Open

        \SwaggerValidator\Common\Factory::getInstance()->set(\SwaggerValidator\Common\CollectionType::PathItem, new \Swagger2md\SwaggerValidator\Object\PathItem());
Severity: Minor
Found in src/SwaggerValidator/Override.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 '114').
Open

        \SwaggerValidator\Common\Factory::getInstance()->set(\SwaggerValidator\Common\CollectionType::Paths, new \Swagger2md\SwaggerValidator\Object\Paths());
Severity: Minor
Found in src/SwaggerValidator/Override.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 '59', column '118').
Open

        \SwaggerValidator\Common\Factory::getInstance()->set(\SwaggerValidator\Common\CollectionType::Reference, new \Swagger2md\SwaggerValidator\Object\Reference());
Severity: Minor
Found in src/SwaggerValidator/Override.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 '48', column '116').
Open

        \SwaggerValidator\Common\Factory::getInstance()->set(\SwaggerValidator\Common\CollectionType::Headers, new \Swagger2md\SwaggerValidator\Object\Headers());
Severity: Minor
Found in src/SwaggerValidator/Override.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 '51', column '119').
Open

        \SwaggerValidator\Common\Factory::getInstance()->set(\SwaggerValidator\Common\CollectionType::HeaderItem, new \Swagger2md\SwaggerValidator\Object\HeaderItem());
Severity: Minor
Found in src/SwaggerValidator/Override.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 '54', column '121').
Open

        \SwaggerValidator\Common\Factory::getInstance()->set(\SwaggerValidator\Common\CollectionType::ExternalDocs, new \Swagger2md\SwaggerValidator\Object\ExternalDocs());
Severity: Minor
Found in src/SwaggerValidator/Override.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 '55', column '113').
Open

        \SwaggerValidator\Common\Factory::getInstance()->set(\SwaggerValidator\Common\CollectionType::Info, new \Swagger2md\SwaggerValidator\Object\Info());
Severity: Minor
Found in src/SwaggerValidator/Override.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 '52', column '118').
Open

        \SwaggerValidator\Common\Factory::getInstance()->set(\SwaggerValidator\Common\CollectionType::Operation, new \Swagger2md\SwaggerValidator\Object\Operation());
Severity: Minor
Found in src/SwaggerValidator/Override.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 '119').
Open

        \SwaggerValidator\Common\Factory::getInstance()->set(\SwaggerValidator\Common\CollectionType::TypeString, new \Swagger2md\SwaggerValidator\DataType\TypeString());
Severity: Minor
Found in src/SwaggerValidator/Override.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 '41', column '121').
Open

        \SwaggerValidator\Common\Factory::getInstance()->set(\SwaggerValidator\Common\CollectionType::TypeCombined, new \Swagger2md\SwaggerValidator\DataType\TypeCombined());
Severity: Minor
Found in src/SwaggerValidator/Override.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

Avoid using static access to class '\SwaggerValidator\Swagger' in method 'override'.
Open

        \SwaggerValidator\Swagger::cleanInstances();
Severity: Minor
Found in src/SwaggerValidator/Override.php by phpmd

StaticAccess

Since: 1.4.0

Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

Example

class Foo
{
    public function bar()
    {
        Bar::baz();
    }
}

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

There are no issues that match your filters.

Category
Status