Showing 662 of 662 total issues
There must be one USE keyword per declaration Open
Open
use GoIntegro\Hateoas\JsonApi\JsonApiSpec,
- Exclude checks
The closing parenthesis and the opening brace of a multi-line function declaration must be on the same line Open
Open
{
- Exclude checks
TRUE, FALSE and NULL must be lowercase; expected "null" but found "NULL" Open
Open
public function getSortOrder($field, $relationship = NULL)
- Exclude checks
Space found before closing bracket of FOREACH loop Open
Open
foreach (
- Exclude checks
The closing parenthesis and the opening brace of a multi-line function declaration must be on the same line Open
Open
{
- Exclude checks
The closing parenthesis and the opening brace of a multi-line function declaration must be on the same line Open
Open
{
- Exclude checks
The closing parenthesis and the opening brace of a multi-line function declaration must be on the same line Open
Open
{
- Exclude checks
TRUE, FALSE and NULL must be lowercase; expected "true" but found "TRUE" Open
Open
$camelized = Inflector::camelize($field, TRUE);
- Exclude checks
Multi-line function declarations must define one parameter per line Open
Open
Params $params, RequestAction $action
- Exclude checks
TRUE, FALSE and NULL must be lowercase; expected "null" but found "NULL" Open
Open
$ids = NULL;
- Exclude checks
Expected 1 space after FUNCTION keyword; 0 found Open
Open
$callback = function($entity) {
- Exclude checks
There must be one USE keyword per declaration Open
Open
use Symfony\Component\HttpFoundation\Request,
- Exclude checks
Expected 1 space after FUNCTION keyword; 0 found Open
Open
$callback = function($pair) {
- Exclude checks
Function parse
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
Open
public function parse(Request $request, Params $params)
{
$filters = [];
if (empty($params->primaryClass)) return $filters;
- Read upRead up
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
Open
{
- Exclude checks
The closing parenthesis and the opening brace of a multi-line function declaration must be on the same line Open
Open
{
- Exclude checks
The implements keyword must be on the same line as the class name Open
Open
implements Paginated
- Exclude checks
TRUE, FALSE and NULL must be lowercase; expected "null" but found "NULL" Open
Open
) ? EntityResource::getStringId($entity) : NULL;
- Exclude checks
Expected 1 space after FUNCTION keyword; 0 found Open
Open
$walk = function($relationship) use (&$json, $resource) {
- Exclude checks
Multi-line function declarations must define one parameter per line Open
Open
$query, Result $result, array $facets, array $entities
- Exclude checks