Showing 864 of 1,073 total issues
Function assertJsonValidationErrors
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
public function assertJsonValidationErrors($errors, $responseKey = 'errors')
{
$errors = Arr::wrap($errors);
PHPUnit::withResponse($this)->assertNotEmpty($errors, 'No validation errors were provided.');
- 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 originalIsEquivalent
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
public function originalIsEquivalent($key)
{
if (! array_key_exists($key, $this->original)) {
return false;
}
- 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 resolveForRoute
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
public static function resolveForRoute($container, $route)
{
$parameters = $route->parameters();
$route = static::resolveBackedEnumsForRoute($route, $parameters);
- 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
File Factory.php
has 259 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace Illuminate\View;
use Illuminate\Contracts\Container\Container;
Method ofMany
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function ofMany($column = 'id', $aggregate = 'MAX', $relation = null)
{
$this->isOneOfMany = true;
$this->relationName = $relation ?: $this->getDefaultOneOfManyJoinAlias(
FileViewFinder
has 21 functions (exceeds 20 allowed). Consider refactoring. Open
class FileViewFinder implements ViewFinderInterface
{
/**
* The filesystem instance.
*
AssertableJsonString
has 21 functions (exceeds 20 allowed). Consider refactoring. Open
class AssertableJsonString implements ArrayAccess, Countable
{
/**
* The original encoded json.
*
Logger
has 21 functions (exceeds 20 allowed). Consider refactoring. Open
class Logger implements LoggerInterface
{
use Conditionable;
/**
DynamoBatchRepository
has 21 functions (exceeds 20 allowed). Consider refactoring. Open
class DynamoBatchRepository implements BatchRepository
{
/**
* The batch factory instance.
*
Message
has 21 functions (exceeds 20 allowed). Consider refactoring. Open
class Message
{
use ForwardsCalls;
/**
DatabaseBatchRepository
has 21 functions (exceeds 20 allowed). Consider refactoring. Open
class DatabaseBatchRepository implements PrunableBatchRepository
{
/**
* The batch factory instance.
*
Request
has 21 functions (exceeds 20 allowed). Consider refactoring. Open
class Request implements ArrayAccess
{
use Macroable;
/**
DynamoDbStore
has 21 functions (exceeds 20 allowed). Consider refactoring. Open
class DynamoDbStore implements LockProvider, Store
{
use InteractsWithTime;
/**
Wormhole
has 21 functions (exceeds 20 allowed). Consider refactoring. Open
class Wormhole
{
/**
* The amount of time to travel.
*
RouteListCommand
has 21 functions (exceeds 20 allowed). Consider refactoring. Open
#[AsCommand(name: 'route:list')]
class RouteListCommand extends Command
{
/**
* The console command name.
DatabaseQueue
has 21 functions (exceeds 20 allowed). Consider refactoring. Open
class DatabaseQueue extends Queue implements QueueContract, ClearableQueue
{
/**
* The database connection instance.
*
Method withAggregate
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function withAggregate($relations, $column, $function = null)
{
if (empty($relations)) {
return $this;
}
File SqlServerGrammar.php
has 255 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace Illuminate\Database\Query\Grammars;
use Illuminate\Database\Query\Builder;
File QueueFake.php
has 254 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace Illuminate\Support\Testing\Fakes;
use BadMethodCallException;
Function getSqlSrvDsn
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
protected function getSqlSrvDsn(array $config)
{
$arguments = [
'Server' => $this->buildHostString($config, ','),
];
- 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"