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

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

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

        ResourceEntityInterface $entity, array $translations
Severity: Minor
Found in Entity/DefaultMutator.php by phpcodesniffer

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

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

                    throw new TranslationException($message, NULL, $e);
Severity: Minor
Found in Entity/DefaultMutator.php by phpcodesniffer

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 implements keyword must be on the same line as the class name
Open

    implements EntityConflictExceptionInterface

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

    implements ResourceCollectionInterface

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

        $i18n = FALSE
Severity: Minor
Found in JsonApi/Document.php by phpcodesniffer

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

    public function serialize(Document $document)
    {
        $json = [];
        $pagination = $document->pagination;

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

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

            $type = NULL;

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

        DocumentResource $resource = NULL, $key = NULL
Severity: Minor
Found in JsonApi/Document.php by phpcodesniffer

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

            if (NULL === $value || ('code' == $field && 0 == $value)) continue;
Severity: Minor
Found in JsonApi/ErrorSerializer.php by phpcodesniffer

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

                $method = 'get' . Inflector::camelize($property, TRUE);

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

    {

Expected 1 space after FUNCTION keyword; 0 found
Open

                $compare = function(array $linkA, array $linkB) {
Severity: Minor
Found in JsonApi/Merge/Blender.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

        $query, Result $result, array $facets, array $entities
Severity: Minor
Found in Search/SolrSearchResult.php by phpcodesniffer

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

    {
Severity: Minor
Found in Util/RepositoryHelper.php by phpcodesniffer

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

    {
Severity
Category
Status
Source
Language