Showing 662 of 662 total issues
Avoid using static access to class '\GoIntegro\Hateoas\Util\ArrayHelper' in method 'prepareData'. Open
Open
$json = Util\ArrayHelper::toObject($data);
- 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 unused parameters such as '$request'. Open
Open
public function parse(Request $request, Params $params)
- 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
Only one argument is allowed per line in a multi-line function call Open
Open
$relationship->type, EntityResource::getStringId($entity)
- Exclude checks
Only one argument is allowed per line in a multi-line function call Open
Open
$resource, $relationship
- Exclude checks
Only one argument is allowed per line in a multi-line function call Open
Open
$params->primaryClass, $fields, $relationships, $metadata
- Exclude checks
Only one argument is allowed per line in a multi-line function call Open
Open
$class->getConstructor(), $fields, $relationships, $metadata
- Exclude checks
Only one argument is allowed per line in a multi-line function call Open
Open
self::ERROR_MALFORMED_SCHEMA, $params->primaryType
- Exclude checks
Only one argument is allowed per line in a multi-line function call Open
Open
(string) $entity->getId(), $params->relationshipIds
- Exclude checks
Only one argument is allowed per line in a multi-line function call Open
Open
' ', '', ucwords(str_replace('-', ' ', $word))
- Exclude checks
Only one argument is allowed per line in a multi-line function call Open
Open
$type, $subtype, $resourceClass, $fields, $relationships, $pageSize
- Exclude checks
Only one argument is allowed per line in a multi-line function call Open
Open
$champion[$key], $links, $compare
- Exclude checks
Only one argument is allowed per line in a multi-line function call Open
Open
$entity, $relationshipName
- Exclude checks
Only one argument is allowed per line in a multi-line function call Open
Open
self::ERROR_UNKOWN_RELATIONSHIP, $relationshipName
- Exclude checks
Only one argument is allowed per line in a multi-line function call Open
Open
$field, $this->resource, $message
- Exclude checks
Only one argument is allowed per line in a multi-line function call Open
Open
$type, $subtype, $resourceClass, $fields, $relationships, $pageSize
- Exclude checks
Only one argument is allowed per line in a multi-line function call Open
Open
$relationship, $entity, $resourcesSerialization
- Exclude checks
Only one argument is allowed per line in a multi-line function call Open
Open
$relationship, $entity, $resourcesSerialization
- Exclude checks
Only one argument is allowed per line in a multi-line function call Open
Open
self::ERROR_UNKOWN_RELATIONSHIP, $relationshipName
- Exclude checks
Only one argument is allowed per line in a multi-line function call Open
Open
$resource, $this->securityContext, $fields
- Exclude checks
Only one argument is allowed per line in a multi-line function call Open
Open
$this->metadataCache, $this->resourceClassPath, $oreClass
- Exclude checks