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

View on GitHub
src/Model/Validator/ExtractedMethodValidator.php

Summary

Maintainability
A
45 mins
Test Coverage
A
100%

Method __construct has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

        private GeneratorConfiguration $generatorConfiguration,
        PropertyInterface $property,
        string $template,
        array $templateValues,
        string $exceptionClass,
Severity: Minor
Found in src/Model/Validator/ExtractedMethodValidator.php - About 45 mins to fix

    Avoid unused parameters such as '$validator'.
    Open

                    private ExtractedMethodValidator $validator,

    UnusedFormalParameter

    Since: 0.2

    Avoid passing parameters to methods or constructors and then not using those parameters.

    Example

    class Foo
    {
        private function bar($howdy)
        {
            // $howdy is not used
        }
    }

    Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter

    Avoid unused parameters such as '$generatorConfiguration'.
    Open

                    private GeneratorConfiguration $generatorConfiguration,

    UnusedFormalParameter

    Since: 0.2

    Avoid passing parameters to methods or constructors and then not using those parameters.

    Example

    class Foo
    {
        private function bar($howdy)
        {
            // $howdy is not used
        }
    }

    Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter

    syntax error, unexpected 'string' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST)
    Open

        private string $extractedMethodName;

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

            array $exceptionParams = [],

    Line indented incorrectly; expected 12 spaces, found 16
    Open

                    private GeneratorConfiguration $generatorConfiguration,

    Line indented incorrectly; expected 4 spaces, found 8
    Open

            private GeneratorConfiguration $generatorConfiguration,

    Closing brace must be on a line by itself
    Open

                ) {}

    Line indented incorrectly; expected 12 spaces, found 16
    Open

                    private ExtractedMethodValidator $validator,

    There are no issues that match your filters.

    Category
    Status