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

View on GitHub

Showing 397 of 397 total issues

Possible parse error: class missing opening or closing brace
Open

class ConstProcessor extends AbstractPropertyProcessor

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

                    ) use ($schemaProperties, $validator): array {

The implements keyword must be on the same line as the class name
Open

    implements ComposedPropertiesInterface, MergedComposedPropertiesInterface

The extends keyword must be on the same line as the class name
Open

    extends AbstractComposedValueProcessor

Possible parse error: class missing opening or closing brace
Open

class ConstProcessor extends AbstractPropertyProcessor

Space found after opening bracket of FOREACH loop
Open

                    foreach (

Method name "ArrayHash::array_multiksort" is not in camel caps format
Open

    private static function array_multiksort(array &$array): void
Severity: Minor
Found in src/Utils/ArrayHash.php by phpcodesniffer

Space found before closing bracket of FOREACH loop
Open

                    foreach (

Terminating statement must be on a line by itself
Open

                case 'boolean': return 'bool';

There must be one USE keyword per declaration
Open

use PHPModelGenerator\SchemaProcessor\PostProcessor\Internal\ {
Severity: Minor
Found in src/ModelGenerator.php by phpcodesniffer

The CASE body must start on the line following the statement
Open

                case 'boolean': return 'bool';

Terminating statement must be on a line by itself
Open

                case 'number': return 'float';

The CASE body must start on the line following the statement
Open

                case 'integer': return 'int';

Terminating statement must be on a line by itself
Open

                default: return $jsonSchemaType;

The CASE body must start on the line following the statement
Open

                case 'number': return 'float';

The DEFAULT body must start on the line following the statement
Open

                default: return $jsonSchemaType;

Terminating statement must be on a line by itself
Open

                case 'integer': return 'int';

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
Severity: Minor
Found in src/Model/Property/Property.php by phpmd

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
Severity: Minor
Found in src/Model/Property/Property.php by phpmd

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 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
Severity: Minor
Found in src/Model/Property/PropertyProxy.php by phpmd

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

Severity
Category
Status
Source
Language