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

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

Summary

Maintainability
A
2 hrs
Test Coverage
A
100%

Method getCheck has 47 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function getCheck(): string
    {
        /**
         * Add a method to the schema to gather values from a nested object which are modified.
         * This is required to adopt filter changes to the values which are passed into a merged property
Severity: Minor
Found in src/Model/Validator/ComposedPropertyValidator.php - About 1 hr to fix

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

            GeneratorConfiguration $generatorConfiguration,
            PropertyInterface $property,
            array $composedProperties,
            string $compositionProcessor,
            array $validatorVariables,
    Severity: Minor
    Found in src/Model/Validator/ComposedPropertyValidator.php - About 35 mins to fix

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

          ) {

      Line exceeds 120 characters; contains 145 characters
      Open

                                          && ($modifiedValue = $nestedCompositionObject->$accessor()) !== ($originalModelData[$key] ?? !$modifiedValue)

      Opening parenthesis of a multi-line function call must be the last content on the line
      Open

                          return sprintf('

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

                      '\\',

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

                      DIRECTORY_SEPARATOR,

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

                  ) . '\\' . str_replace(

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

                      dirname(str_replace('\\', DIRECTORY_SEPARATOR, InvalidComposedValueException::class)),

      There are no issues that match your filters.

      Category
      Status