Showing 662 of 662 total issues
There must be one USE keyword per declaration Open
use Symfony\Component\HttpFoundation\Request,
- Exclude checks
Space found after opening bracket of FOREACH loop Open
foreach (
- Exclude checks
TRUE, FALSE and NULL must be lowercase; expected "null" but found "NULL" Open
$collection = NULL;
- Exclude checks
Function serialize
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function serialize(Document $document)
{
$json = [];
if (!empty($document->pagination)) {
- 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
Function parseDeleteAction
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
protected function parseDeleteAction(Params $params, $relation)
{
$ids = NULL;
if (!empty($params->relationshipIds)) {
- 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
TRUE, FALSE and NULL must be lowercase; expected "null" but found "NULL" Open
\Exception $previous = NULL
- Exclude checks
Function mineMetadata
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private function mineMetadata(array $entities)
{
$metadata = NULL;
if (0 < count($entities)) {
- 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
There must be one USE keyword per declaration Open
use GoIntegro\Hateoas\JsonApi\ResourceEntityInterface,
- Exclude checks
Multi-line function declarations must define one parameter per line Open
EntityResource $resource, $relationshipName
- Exclude checks
TRUE, FALSE and NULL must be lowercase; expected "null" but found "NULL" Open
return $page <= $this->getLast($document) ? $page : NULL;
- Exclude checks
Multi-line function declarations must define one parameter per line Open
EntityResource $resource, array $resourceObject
- Exclude checks
The closing parenthesis and the opening brace of a multi-line function declaration must be on the same line Open
{
- Exclude checks
Blank line found at start of control structure Open
if (!empty($docTranslations)) {
- Exclude checks
TRUE, FALSE and NULL must be lowercase; expected "null" but found "NULL" Open
: NULL;
- Exclude checks
The closing parenthesis and the opening brace of a multi-line function declaration must be on the same line Open
{
- Exclude checks
Function clean
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function clean(array $blacklist, $linkOnly)
{
$blacklist = array_flip($blacklist);
// Se usa "kind" y no "type" para no confundir con sus otros usos.
- 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
TRUE, FALSE and NULL must be lowercase; expected "false" but found "FALSE" Open
return json_decode(json_encode($array), FALSE);
- Exclude checks
Multi-line function declarations must define one parameter per line Open
EntityResource $resource, ResourceRelationship $relationship
- Exclude checks
The closing parenthesis and the opening brace of a multi-line function declaration must be on the same line Open
{
- Exclude checks
TRUE, FALSE and NULL must be lowercase; expected "null" but found "NULL" Open
return 0 < $page ? $page : NULL;
- Exclude checks