Method __construct
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
string $layout,
string $className,
array $fields,
array $embeddables,
array $oneToMany,
Avoid using static access to class '\Assert\Assertion' in method 'getInterfaceName'. Open
Assertion::notNull($this->interfaceName);
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\Assert\Assertion' in method 'getRecordId'. Open
Assertion::notNull($this->recordId);
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\Assert\Assertion' in method 'validateArray'. Open
Assertion::count(array_filter($array, function ($metadata) use ($expectedClassName) : bool {
return !$metadata instanceof $expectedClassName;
}), 0, sprintf('At least one element in array is not an instance of %s', $expectedClassName));
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}