Showing 864 of 1,073 total issues
Method compileLegacyRenameColumn
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function compileLegacyRenameColumn(Blueprint $blueprint, Fluent $command, Connection $connection)
{
$column = collect($connection->getSchemaBuilder()->getColumns($blueprint->getTable()))
->firstWhere('name', $command->from);
Method flexible
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function flexible($key, $ttl, $callback, $lock = null)
{
[
$key => $value,
"illuminate:cache:flexible:created:{$key}" => $created,
Method handle
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function handle()
{
$environmentFile = $this->option('env')
? base_path('.env').'.'.$this->option('env')
: base_path('.env');
Method sendNow
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function sendNow($notifiables, $notification, ?array $channels = null)
{
if (! $notifiables instanceof Collection && ! is_array($notifiables)) {
$notifiables = [$notifiables];
}
Method createMonologDriver
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function createMonologDriver(array $config)
{
if (! is_a($config['handler'], HandlerInterface::class, true)) {
throw new InvalidArgumentException(
$config['handler'].' must be an instance of '.HandlerInterface::class
Method assertJsonValidationErrors
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function assertJsonValidationErrors($errors, $responseKey = 'errors')
{
$errors = Arr::wrap($errors);
PHPUnit::withResponse($this)->assertNotEmpty($errors, 'No validation errors were provided.');
Method groupBy
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function groupBy($groupBy, $preserveKeys = false)
{
if (! $this->useAsCallable($groupBy) && is_array($groupBy)) {
$nextGroups = $groupBy;
Method morphToMany
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function morphToMany($related, $name, $table = null, $foreignPivotKey = null,
$relatedPivotKey = null, $parentKey = null,
$relatedKey = null, $relation = null, $inverse = false)
Method make
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function make($name, $value, $minutes = 0, $path = null, $domain = null, $secure = null, $httpOnly = true, $raw = false, $sameSite = null);
Method __construct
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function __construct(Address|string|null $from = null, $to = [], $cc = [], $bcc = [], $replyTo = [], ?string $subject = null, array $tags = [], array $metadata = [], Closure|array $using = [])
Method make
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function make($name, $value, $minutes = 0, $path = null, $domain = null, $secure = null, $httpOnly = true, $raw = false, $sameSite = null)
Method withRouting
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function withRouting(?Closure $using = null,
array|string|null $web = null,
array|string|null $api = null,
?string $commands = null,
?string $channels = null,
Method __construct
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function __construct($name = 'default', $environment = null, $backoff = 0, $memory = 128, $timeout = 60, $sleep = 3, $maxTries = 1, $force = false, $rest = 0)
Method cookie
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function cookie($name = null, $value = null, $minutes = 0, $path = null, $domain = null, $secure = null, $httpOnly = true, $raw = false, $sameSite = null)
Method has
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function has($key, $length = null, ?Closure $callback = null): self
{
$prop = $this->prop();
if (is_int($key) && is_null($length)) {
Method componentClass
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function componentClass(string $component)
{
$viewFactory = Container::getInstance()->make(Factory::class);
if (isset($this->aliases[$component])) {
Method whereNot
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function whereNot(string $key, $expected): self
{
$this->has($key);
$actual = $this->prop($key);
Method hydrate
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function hydrate($context)
{
$unserialize = function ($value, $key, $hidden) {
try {
return tap($this->getRestoredPropertyValue(unserialize($value)), function ($value) {
Method handle
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function handle()
{
return $this->migrator->usingConnection($this->option('database'), function () {
if (! $this->migrator->repositoryExists()) {
$this->components->error('Migration table not found.');
Method __call
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function __call($method, $parameters)
{
if (static::hasMacro($method)) {
return $this->macroCall($method, $parameters);
}