Showing 864 of 1,073 total issues
Method daemon
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function daemon($connectionName, $queue, WorkerOptions $options)
{
if ($supportsAsyncSignals = $this->supportsAsyncSignals()) {
$this->listenForSignals();
}
Method handle
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function handle($request, Closure $next)
{
if ($this->inExceptArray($request)) {
return $next($request);
}
Method quotes
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function quotes()
{
return Collection::make([
'Act only according to that maxim whereby you can, at the same time, will that it should become a universal law. - Immanuel Kant',
'An unexamined life is not worth living. - Socrates',
Method createClient
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function createClient(array $config)
{
return tap(new Redis, function ($client) use ($config) {
if ($client instanceof RedisFacade) {
throw new LogicException(
Method queueNotification
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function queueNotification($notifiables, $notification)
{
$notifiables = $this->formatNotifiables($notifiables);
$original = clone $notification;
Method getMiddlewareGroups
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getMiddlewareGroups()
{
$middleware = [
'web' => array_values(array_filter([
\Illuminate\Cookie\Middleware\EncryptCookies::class,
Function where
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function where($column, $operator = null, $value = null, $boolean = 'and')
{
if ($column instanceof ConditionExpression) {
$type = 'Expression';
- 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 toSql
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function toSql()
{
$this->addImpliedCommands();
$statements = [];
- 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 forget
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public static function forget(&$array, $keys)
{
$original = &$array;
$keys = (array) $keys;
- 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 has
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public static function has($array, $keys)
{
$keys = (array) $keys;
if (! $array || $keys === []) {
- 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 getListenersOnDispatcher
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
protected function getListenersOnDispatcher()
{
$events = [];
foreach ($this->getRawListeners() as $event => $rawListeners) {
- 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 retry
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
function retry($times, callable $callback, $sleepMilliseconds = 0, $when = null)
{
$attempts = 0;
$backoff = [];
- 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 goodnight
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
protected function goodnight()
{
if ($this->alreadySlept || ! $this->shouldSleep) {
return;
}
- 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
Method bootTestDatabase
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function bootTestDatabase()
{
ParallelTesting::setUpProcess(function () {
$this->whenNotUsingInMemoryDatabase(function ($database) {
if (ParallelTesting::option('recreate_databases')) {
Method passes
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function passes($attribute, $value)
{
$this->messages = [];
$validator = Validator::make(
Method orderedChunkById
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function orderedChunkById($count, callable $callback, $column = null, $alias = null, $descending = false)
{
$column ??= $this->defaultKeyName();
$alias ??= $column;
$lastId = null;
Method doSend
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function doSend(SentMessage $message): void
{
$options = $this->options;
if ($message->getOriginalMessage() instanceof Message) {
Method data_get
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
function data_get($target, $key, $default = null)
{
if (is_null($key)) {
return $target;
}
Method __construct
has 12 arguments (exceeds 4 allowed). Consider refactoring. Open
public function __construct(QueueFactory $queue,
BatchRepository $repository,
string $id,
string $name,
int $totalJobs,
Method originalIsEquivalent
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function originalIsEquivalent($key)
{
if (! array_key_exists($key, $this->original)) {
return false;
}