nilportugues / php-json-api

JSON API transformer outputting valid (PSR-7) API Responses.
http://nilportugues.com
MIT License
71 stars 35 forks source link

[Insight] Unused method, property, variable or parameter - in src/Server/Query/QueryObject.php, line 120 #56

Closed nilportugues closed 8 years ago

nilportugues commented 8 years ago

in src/Server/Query/QueryObject.php, line 120

This errorBag local variable is declared but never used. You should remove it.

            }

            if (is_array($data)) {
                foreach ($data as $subResource) {
                    if (null == $transformer->getMappingByAlias($subResource)) {
                        $errorBag[] = new InvalidParameterError($subResource, strtolower($paramName));
                    }
                }
            }
        }
    }

Posted from SensioLabsInsight

nilportugues commented 8 years ago

https://github.com/nilportugues/php-json-api/commit/7155818c5fe26dc50c33b68e50bd3c701892ee2a