Showing 864 of 1,073 total issues
File Arr.php
has 472 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
namespace Illuminate\Support;
use ArgumentCountError;
Factory
has 50 functions (exceeds 20 allowed). Consider refactoring. Open
Open
abstract class Factory
{
use Conditionable, ForwardsCalls, Macroable {
__call as macroCall;
}
Function data_set
has a Cognitive Complexity of 45 (exceeds 5 allowed). Consider refactoring. Open
Open
function data_set(&$target, $key, $value, $overwrite = true)
{
$segments = is_array($key) ? $key : explode('.', $key);
if (($segment = array_shift($segments)) === '*') {
- 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
Handler
has 49 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class Handler implements ExceptionHandlerContract
{
use ReflectsClosures;
/**
File Factory.php
has 445 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
namespace Illuminate\Database\Eloquent\Factories;
use Closure;
BladeCompiler
has 48 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class BladeCompiler extends Compiler implements CompilerInterface
{
use Concerns\CompilesAuthorizations,
Concerns\CompilesClasses,
Concerns\CompilesComments,
HasOneOrManyThrough
has 48 functions (exceeds 20 allowed). Consider refactoring. Open
Open
abstract class HasOneOrManyThrough extends Relation
{
use InteractsWithDictionary;
/**
UrlGenerator
has 48 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class UrlGenerator implements UrlGeneratorContract
{
use InteractsWithTime, Macroable;
/**
BusFake
has 47 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class BusFake implements Fake, QueueingDispatcher
{
use ReflectsClosures;
/**
Filesystem
has 46 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class Filesystem
{
use Conditionable, Macroable;
/**
File Event.php
has 426 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
namespace Illuminate\Console\Scheduling;
use Closure;
LogManager
has 45 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class LogManager implements LoggerInterface
{
use ParsesLogConfiguration;
/**
File BusFake.php
has 423 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
namespace Illuminate\Support\Testing\Fakes;
use Closure;
Arr
has 44 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class Arr
{
use Macroable;
/**
File QueriesRelationships.php
has 411 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
namespace Illuminate\Database\Eloquent\Concerns;
use BadMethodCallException;
File Gate.php
has 410 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
namespace Illuminate\Auth\Access;
use BackedEnum;
AbstractCursorPaginator
has 43 functions (exceeds 20 allowed). Consider refactoring. Open
Open
abstract class AbstractCursorPaginator implements Htmlable, Stringable
{
use ForwardsCalls, Tappable;
/**
Repository
has 43 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class Repository implements ArrayAccess, CacheContract
{
use InteractsWithTime, Macroable {
__call as macroCall;
}
File Worker.php
has 407 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
namespace Illuminate\Queue;
use Illuminate\Contracts\Cache\Repository as CacheContract;
Gate
has 42 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class Gate implements GateContract
{
use HandlesAuthorization;
/**