Showing 864 of 1,073 total issues
GeneratorCommand
has 23 functions (exceeds 20 allowed). Consider refactoring. Open
abstract class GeneratorCommand extends Command implements PromptsForMissingInput
{
/**
* The filesystem instance.
*
SessionManager
has 23 functions (exceeds 20 allowed). Consider refactoring. Open
class SessionManager extends Manager
{
/**
* Call a custom driver creator.
*
EventFake
has 23 functions (exceeds 20 allowed). Consider refactoring. Open
class EventFake implements Dispatcher, Fake
{
use ForwardsCalls, ReflectsClosures;
/**
Method displayCli
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function displayCli($class, $database, $table, $policy, $attributes, $relations, $events, $observers)
{
$this->newLine();
$this->components->twoColumnDetail('<fg=green;options=bold>'.$class.'</>');
File Builder.php
has 269 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace Illuminate\Database\Schema;
use Closure;
Method compileSlots
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function compileSlots(string $value)
{
$pattern = "/
<
\s*
Function withAggregate
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
public function withAggregate($relations, $column, $function = null)
{
if (empty($relations)) {
return $this;
}
- 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 promptUntilValid
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
protected function promptUntilValid($prompt, $required, $validate)
{
while (true) {
$result = $prompt();
- 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 filterRoute
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
protected function filterRoute(array $route)
{
if (($this->option('name') && ! Str::contains((string) $route['name'], $this->option('name'))) ||
($this->option('path') && ! Str::contains($route['uri'], $this->option('path'))) ||
($this->option('method') && ! Str::contains($route['method'], strtoupper($this->option('method')))) ||
- 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 addToMiddlewarePriorityRelative
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
protected function addToMiddlewarePriorityRelative($existing, $middleware, $after = true)
{
if (! in_array($middleware, $this->middlewarePriority)) {
$index = $after ? 0 : count($this->middlewarePriority);
- 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 Relations.php
has 267 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace Illuminate\Types\Relations;
use Illuminate\Database\Eloquent\Model;
File ServiceProvider.php
has 266 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace Illuminate\Support;
use Closure;
Method tearDownTheTestEnvironment
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function tearDownTheTestEnvironment(): void
{
if ($this->app) {
$this->callBeforeApplicationDestroyedCallbacks();
File ManagesFrequencies.php
has 264 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace Illuminate\Console\Scheduling;
use Illuminate\Support\Carbon;
PendingCommand
has 22 functions (exceeds 20 allowed). Consider refactoring. Open
class PendingCommand
{
use Conditionable;
use Macroable;
FileStore
has 22 functions (exceeds 20 allowed). Consider refactoring. Open
class FileStore implements Store, LockProvider
{
use InteractsWithTime, RetrievesMultipleKeys;
/**
Queue
has 22 functions (exceeds 20 allowed). Consider refactoring. Open
abstract class Queue
{
use InteractsWithTime;
/**
Method configurePrompts
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function configurePrompts(InputInterface $input)
{
Prompt::setOutput($this->output);
Prompt::interactive(($input->isInteractive() && defined('STDIN') && stream_isatty(STDIN)) || $this->laravel->runningUnitTests());
Method flushOutputBuffer
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function flushOutputBuffer()
{
$lines = str($this->outputBuffer)->explode("\n");
$this->outputBuffer = (string) $lines->pop();
File helpers.php
has 261 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
use Illuminate\Contracts\Support\DeferringDisplayableValue;
use Illuminate\Contracts\Support\Htmlable;
use Illuminate\Support\Arr;