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

    {

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

    {

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

    public function parse(Request $request, Params $params, array $body)
    {
        $entity = $params->entities->primary->first();
        $ids = NULL;

Severity: Minor
Found in JsonApi/Request/LinkBodyParser.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

    {

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

    {
Severity: Minor
Found in Entity/DefaultMutator.php by phpcodesniffer

There must be one USE keyword per declaration
Open

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

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

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

Expected 1 space before "as"; 16 found
Open

        foreach (

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

    {

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

    {
Severity: Minor
Found in JsonApi/Merge/Blender.php by phpcodesniffer

The closing brace for the class must go on the next line after the body
Open

}

There must be one USE keyword per declaration
Open

use GoIntegro\Hateoas\JsonApi\Document,

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

        MetadataCache $metadataCache, $resourceClassPath

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

        $urlTemplate = NULL;
Severity
Category
Status
Source
Language