skqr/hateoas

View on GitHub

Showing 662 of 662 total issues

The closing parenthesis and the opening brace of a multi-line function declaration must be on the same line
Open

    {

TRUE, FALSE and NULL must be lowercase; expected "null" but found "NULL"
Open

        $sortedByRelationship = NULL;
Severity: Minor
Found in JsonApi/Request/Params.php by phpcodesniffer

The extends keyword must be on the same line as the interface name
Open

    extends DocumentResource, Countable, Traversable, ArrayAccess

There must be one USE keyword per declaration
Open

use GoIntegro\Hateoas\JsonApi\Request\Params,
Severity: Minor
Found in Entity/Mutator.php by phpcodesniffer

The implements keyword must be on the same line as the class name
Open

    implements PersistenceExceptionInterface

The extends keyword must be on the same line as the class name
Open

    extends ConflictException

The closing parenthesis and the opening brace of a multi-line function declaration must be on the same line
Open

    {

The closing parenthesis and the opening brace of a multi-line function declaration must be on the same line
Open

    {

The closing parenthesis and the opening brace of a multi-line function declaration must be on the same line
Open

    {

Multi-line function declarations must define one parameter per line
Open

        Request $request, Params $params, RequestAction $action

Function create has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public function create()
    {
        $include = NULL;
        $fields = NULL;

Severity: Minor
Found in JsonApi/SerializerFactory.php - About 35 mins to fix

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

The closing parenthesis and the opening brace of a multi-line function declaration must be on the same line
Open

    {

Multi-line function declarations must define one parameter per line
Open

        MetadataCache $metadataCache, $resourceClassPath

Multi-line function declarations must define one parameter per line
Open

        $class, $type, $subtype, $kind, $name, $mappingField

Multi-line function declarations must define one parameter per line
Open

        $class, $type, $subtype, $kind, $name, $mappingField

There must be one USE keyword per declaration
Open

use IteratorAggregate, ArrayIterator, Countable;

There must be one USE keyword per declaration
Open

use Doctrine\ORM\EntityManagerInterface,
Severity: Minor
Found in Entity/DefaultMutator.php by phpcodesniffer

TRUE, FALSE and NULL must be lowercase; expected "null" but found "NULL"
Open

        $fields = NULL;
Severity: Minor
Found in JsonApi/DocumentFactory.php by phpcodesniffer

The closing parenthesis and the opening brace of a multi-line function declaration must be on the same line
Open

    {

Multi-line function declarations must define one parameter per line
Open

        Request $request, Params $params
Severity
Category
Status
Source
Language