src/Model/Validator/ComposedPropertyValidator.php
Method getCheck
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
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
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
GeneratorConfiguration $generatorConfiguration,
PropertyInterface $property,
array $composedProperties,
string $compositionProcessor,
array $validatorVariables,
Avoid unused parameters such as '$modifiedValuesMethod'. Open
Open
private string $modifiedValuesMethod
- Read upRead up
- Exclude checks
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 '$compositionProperties'. Open
Open
private array $compositionProperties,
- Read upRead up
- Exclude checks
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
Open
private string $modifiedValuesMethod;
- Exclude checks
The first parameter of a multi-line function declaration must be on the line after the opening bracket Open
Open
private array $compositionProperties,
- Exclude checks
Line exceeds 120 characters; contains 170 characters Open
Open
$composedProperty->filterValidators(static fn(Validator $validator): bool => !is_a($validator->getValidator(), AbstractComposedPropertyValidator::class));
- Exclude checks
Line exceeds 120 characters; contains 145 characters Open
Open
&& ($modifiedValue = $nestedCompositionObject->$accessor()) !== ($originalModelData[$key] ?? !$modifiedValue)
- Exclude checks
Line indented incorrectly; expected 16 spaces, found 20 Open
Open
private string $modifiedValuesMethod
- Exclude checks
Multi-line function call not indented correctly; expected 12 spaces but found 16 Open
Open
DIRECTORY_SEPARATOR,
- Exclude checks
Multi-line function call not indented correctly; expected 12 spaces but found 16 Open
Open
'\\',
- Exclude checks
Line indented incorrectly; expected 16 spaces, found 20 Open
Open
private array $compositionProperties,
- Exclude checks
Closing brace must be on a line by itself Open
Open
) {}
- Exclude checks
Opening parenthesis of a multi-line function call must be the last content on the line Open
Open
return sprintf('
- Exclude checks
Multi-line function call not indented correctly; expected 12 spaces but found 16 Open
Open
dirname(str_replace('\\', DIRECTORY_SEPARATOR, InvalidComposedValueException::class)),
- Exclude checks
Multi-line function call not indented correctly; expected 8 spaces but found 12 Open
Open
) . '\\' . str_replace(
- Exclude checks