Showing 864 of 1,073 total issues
Function data_forget
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
function data_forget(&$target, $key)
{
$segments = is_array($key) ? $key : explode('.', $key);
if (($segment = array_shift($segments)) === '*' && Arr::accessible($target)) {
- 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 ReplacesAttributes.php
has 301 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace Illuminate\Validation\Concerns;
use Illuminate\Support\Arr;
File MailManager.php
has 300 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace Illuminate\Mail;
use Aws\Ses\SesClient;
File Kernel.php
has 299 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace Illuminate\Foundation\Console;
use Carbon\CarbonInterval;
Job
has 27 functions (exceeds 20 allowed). Consider refactoring. Open
abstract class Job
{
use InteractsWithTime;
/**
Function daemon
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
public function daemon($connectionName, $queue, WorkerOptions $options)
{
if ($supportsAsyncSignals = $this->supportsAsyncSignals()) {
$this->listenForSignals();
}
- 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
ComponentTagCompiler
has 26 functions (exceeds 20 allowed). Consider refactoring. Open
class ComponentTagCompiler
{
/**
* The Blade compiler instance.
*
PendingBatch
has 26 functions (exceeds 20 allowed). Consider refactoring. Open
class PendingBatch
{
use Conditionable;
/**
Factory
has 26 functions (exceeds 20 allowed). Consider refactoring. Open
class Factory
{
use Macroable {
__call as macroCall;
}
CacheManager
has 26 functions (exceeds 20 allowed). Consider refactoring. Open
class CacheManager implements FactoryContract
{
/**
* The application instance.
*
File ResourceRegistrar.php
has 290 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace Illuminate\Routing;
use Illuminate\Support\Str;
Function assertInvalid
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
public function assertInvalid($errors = null,
$errorBag = 'default',
$responseKey = 'errors')
{
if ($this->baseResponse->headers->get('Content-Type') === 'application/json') {
- 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 queueNotification
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
protected function queueNotification($notifiables, $notification)
{
$notifiables = $this->formatNotifiables($notifiables);
$original = clone $notification;
- 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 AbstractCursorPaginator.php
has 286 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace Illuminate\Pagination;
use ArrayAccess;
File PendingCommand.php
has 286 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace Illuminate\Testing;
use Illuminate\Console\OutputStyle;
Batch
has 25 functions (exceeds 20 allowed). Consider refactoring. Open
class Batch implements Arrayable, JsonSerializable
{
/**
* The queue factory implementation.
*
DatabaseStore
has 25 functions (exceeds 20 allowed). Consider refactoring. Open
class DatabaseStore implements LockProvider, Store
{
use InteractsWithTime;
/**
RedisStore
has 25 functions (exceeds 20 allowed). Consider refactoring. Open
class RedisStore extends TaggableStore implements LockProvider
{
/**
* The Redis factory implementation.
*
File RouteListCommand.php
has 284 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace Illuminate\Foundation\Console;
use Closure;
Method update
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function update(Fluent $command)
{
switch ($command->name) {
case 'alter':
// Already handled...