Showing 387 of 387 total issues
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
GeneratorConfiguration $generatorConfiguration,
FilterInterface $filter,
PropertyInterface $property,
array $filterOptions = [],
?TransformingFilterInterface $transformingFilter = null,
Method generateModel
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
string $classPath,
string $className,
JsonSchema $jsonSchema,
SchemaDefinitionDictionary $dictionary,
bool $initialClass,
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
PropertyInterface $property,
string $template,
array $templateValues,
string $exceptionClass,
array $exceptionParams = [],
Method create
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
PropertyMetaDataCollection $propertyMetaDataCollection,
SchemaProcessor $schemaProcessor,
Schema $schema,
string $propertyName,
JsonSchema $propertySchema,
Method processSchema
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
JsonSchema $jsonSchema,
string $classPath,
string $className,
SchemaDefinitionDictionary $dictionary,
bool $initialClass = false,
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
PropertyProcessorFactory $propertyProcessorFactory,
array $types,
PropertyMetaDataCollection $propertyMetaDataCollection,
SchemaProcessor $schemaProcessor,
Schema $schema,
Method renderEnum
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
GeneratorConfiguration $generatorConfiguration,
JsonSchema $jsonSchema,
string $name,
array $values,
?array $map,
Function transferValidators
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
Open
protected function transferValidators(PropertyInterface $source, PropertyInterface $destination)
{
foreach ($source->getValidators() as $validatorContainer) {
$validator = $validatorContainer->getValidator();
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function process
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
Open
public function process(Schema $schema, GeneratorConfiguration $generatorConfiguration): void
{
$json = $schema->getJsonSchema()->getJson();
if (!isset($json['patternProperties'])) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Space found after opening bracket of FOREACH loop Open
Open
foreach (
- Exclude checks
Multi-line use declarations must define one parameter per line Open
Open
) use ($schemaProperties, $validator): array {
- Exclude checks
Each PHP statement must be on a line by itself Open
Open
case ['string']: $backedType = 'string'; break;
- Exclude checks
The implements keyword must be on the same line as the class name Open
Open
implements ComposedPropertiesInterface, MergedComposedPropertiesInterface
- Exclude checks
The extends keyword must be on the same line as the class name Open
Open
extends AbstractComposedValueProcessor
- Exclude checks
The CASE body must start on the line following the statement Open
Open
case 'boolean': return 'bool';
- Exclude checks
The CASE body must start on the line following the statement Open
Open
case 'integer': return 'int';
- Exclude checks
The CASE body must start on the line following the statement Open
Open
case ['string']: $backedType = 'string'; break;
- Exclude checks
Terminating statement must be on a line by itself Open
Open
case ['string']: $backedType = 'string'; break;
- Exclude checks
The CASE body must start on the line following the statement Open
Open
case 'number': return 'float';
- Exclude checks
The extends keyword must be on the same line as the class name Open
Open
extends AbstractComposedValueProcessor
- Exclude checks