Showing 829 of 1,026 total issues
HasManyThrough
has 52 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class HasManyThrough extends Relation
{
use InteractsWithDictionary;
/**
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
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,
UrlGenerator
has 48 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class UrlGenerator implements UrlGeneratorContract
{
use InteractsWithTime, Macroable;
/**
Handler
has 48 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class Handler implements ExceptionHandlerContract
{
use ReflectsClosures;
/**
BusFake
has 46 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;
/**
Arr
has 44 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class Arr
{
use Macroable;
/**
File BusFake.php
has 414 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
namespace Illuminate\Support\Testing\Fakes;
use Closure;
File QueriesRelationships.php
has 411 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
namespace Illuminate\Database\Eloquent\Concerns;
use BadMethodCallException;
AbstractCursorPaginator
has 43 functions (exceeds 20 allowed). Consider refactoring. Open
Open
abstract class AbstractCursorPaginator implements Htmlable, Stringable
{
use ForwardsCalls, Tappable;
/**
File Gate.php
has 407 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
namespace Illuminate\Auth\Access;
use Closure;
Gate
has 42 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class Gate implements GateContract
{
use HandlesAuthorization;
/**
Repository
has 42 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class Repository implements ArrayAccess, CacheContract
{
use InteractsWithTime, Macroable {
__call as macroCall;
}
File HasManyThrough.php
has 402 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
namespace Illuminate\Database\Eloquent\Relations;
use Closure;