wol-soft/php-json-schema-model-generator

View on GitHub
src/Model/Property/PropertyInterface.php

Summary

Maintainability
A
0 mins
Test Coverage
F
0%

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

    public function getType(bool $outputType = false): ?PropertyType;

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 method getAttribute has a boolean flag argument $variableName, which is a certain sign of a Single Responsibility Principle violation.
Open

    public function getAttribute(bool $variableName = false): string;

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 method setType has a boolean flag argument $reset, which is a certain sign of a Single Responsibility Principle violation.
Open

        bool $reset = false,

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 method getTypeHint has a boolean flag argument $outputType, which is a certain sign of a Single Responsibility Principle violation.
Open

    public function getTypeHint(bool $outputType = false, array $skipDecorators = []): string;

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 method setDefaultValue has a boolean flag argument $raw, which is a certain sign of a Single Responsibility Principle violation.
Open

    public function setDefaultValue($defaultValue, bool $raw = false): PropertyInterface;

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

syntax error, unexpected ')', expecting variable (T_VARIABLE)
Open

    ): PropertyInterface;
Severity: Critical
Found in src/Model/Property/PropertyInterface.php by phan

Arguments with default values must be at the end of the argument list
Open

        bool $reset = false,

There are no issues that match your filters.

Category
Status