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

View on GitHub

Showing 397 of 397 total issues

Line indented incorrectly; expected 8 spaces, found 12
Open

            static function (array $matches): string {
Severity: Minor
Found in src/Utils/NormalizedName.php by phpcodesniffer

Multi-line function call not indented correctly; expected 12 spaces but found 16
Open

                '\\',

Line indented incorrectly; expected 8 spaces, found 12
Open

            },

Line indented incorrectly; expected 16 spaces, found 24
Open

                        static function (int $validatorIndex): string {

Multi-line function call not indented correctly; expected 20 spaces but found 24
Open

                        $property->getName(),

Line indented incorrectly; expected 8 spaces, found 12
Open

            static function (string $directory): string {

Line indented incorrectly; expected 8 spaces, found 12
Open

            },

Line indented incorrectly; expected 24 spaces, found 36
Open

                                    },

Line indented incorrectly; expected 12 spaces, found 16
Open

                if ($validator->getPriority() == $comparedValidator->getPriority()) {

Line indented incorrectly; expected 8 spaces, found 12
Open

            },
Severity: Minor
Found in src/Model/Schema.php by phpcodesniffer

Expected 0 spaces after opening bracket; newline found
Open

        if (

Line indented incorrectly; expected 8 spaces, found 20
Open

                    },

Closing brace must be on a line by itself
Open

                case 'integer': return 'int';

Closing brace must be on a line by itself
Open

                case 'number': return 'float';

Line indented incorrectly; expected 8 spaces, found 20
Open

                    static function (string $allowedType) use ($property) : string {

Closing brace must be on a line by itself
Open

                default: return $jsonSchemaType;

Closing brace must be on a line by itself
Open

                case 'boolean': return 'bool';

The variable $_ is not named in camelCase.
Open

    public static function hash(array $array, array $relevantFields = []): string
    {
        if ($relevantFields) {
            foreach ($array as $key => $_) {
                if (!in_array($key, $relevantFields)) {
Severity: Minor
Found in src/Utils/ArrayHash.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The method array_multiksort is not named in camelCase.
Open

    private static function array_multiksort(array &$array): void
    {
        foreach ($array as &$value) {
            if (is_array($value)) {
                self::array_multiksort($value);
Severity: Minor
Found in src/Utils/ArrayHash.php by phpmd

CamelCaseMethodName

Since: 0.2

It is considered best practice to use the camelCase notation to name methods.

Example

class ClassName {
    public function get_name() {
    }
}

Source

syntax error, unexpected ')'
Open

        );
Severity: Critical
Found in src/ModelGenerator.php by phan
Severity
Category
Status
Source
Language