controller refactoring part 24

This commit is contained in:
Peter Papp
2021-07-21 18:46:55 +02:00
parent 54f1f4c9a8
commit 6d8a7a429c
29 changed files with 561 additions and 209 deletions

View File

@@ -3,7 +3,7 @@
/**
* A helper file for Laravel, to provide autocomplete information to your IDE
* Generated for Laravel 8.41.0.
* Generated for Laravel 8.50.0.
*
* This file should not be included in your code, only analyzed by your IDE!
*
@@ -989,6 +989,7 @@
* @param \Closure|string|null $concrete
* @param bool $shared
* @return void
* @throws \TypeError
* @static
*/
public static function bind($abstract, $concrete = null, $shared = false)
@@ -1087,6 +1088,32 @@
{ //Method inherited from \Illuminate\Container\Container
/** @var \Illuminate\Foundation\Application $instance */
$instance->singletonIf($abstract, $concrete);
}
/**
* Register a scoped binding in the container.
*
* @param string $abstract
* @param \Closure|string|null $concrete
* @return void
* @static
*/
public static function scoped($abstract, $concrete = null)
{ //Method inherited from \Illuminate\Container\Container
/** @var \Illuminate\Foundation\Application $instance */
$instance->scoped($abstract, $concrete);
}
/**
* Register a scoped binding if it hasn't already been registered.
*
* @param string $abstract
* @param \Closure|string|null $concrete
* @return void
* @static
*/
public static function scopedIf($abstract, $concrete = null)
{ //Method inherited from \Illuminate\Container\Container
/** @var \Illuminate\Foundation\Application $instance */
$instance->scopedIf($abstract, $concrete);
}
/**
* "Extend" an abstract type in the container.
@@ -1359,6 +1386,17 @@
{ //Method inherited from \Illuminate\Container\Container
/** @var \Illuminate\Foundation\Application $instance */
$instance->forgetInstances();
}
/**
* Clear all of the scoped instances from the container.
*
* @return void
* @static
*/
public static function forgetScopedInstances()
{ //Method inherited from \Illuminate\Container\Container
/** @var \Illuminate\Foundation\Application $instance */
$instance->forgetScopedInstances();
}
/**
* Get the globally available instance of the container.
@@ -1769,7 +1807,7 @@
/**
* Get the currently authenticated user.
*
* @return \Domain\Traffic\Models\User|null
* @return \App\Users\Models\User|null
* @static
*/
public static function user()
@@ -1804,7 +1842,7 @@
* Log the given user ID into the application without sessions or cookies.
*
* @param mixed $id
* @return \Domain\Traffic\Models\User|false
* @return \App\Users\Models\User|false
* @static
*/
public static function onceUsingId($id)
@@ -1882,7 +1920,7 @@
*
* @param mixed $id
* @param bool $remember
* @return \Domain\Traffic\Models\User|false
* @return \App\Users\Models\User|false
* @static
*/
public static function loginUsingId($id, $remember = false)
@@ -1934,7 +1972,7 @@
*
* @param string $password
* @param string $attribute
* @return bool|null
* @return \App\Users\Models\User|null
* @throws \Illuminate\Auth\AuthenticationException
* @static
*/
@@ -1958,7 +1996,7 @@
/**
* Get the last user we attempted to authenticate.
*
* @return \Domain\Traffic\Models\User
* @return \App\Users\Models\User
* @static
*/
public static function getLastAttempted()
@@ -2060,7 +2098,7 @@
/**
* Return the currently cached user.
*
* @return \Domain\Traffic\Models\User|null
* @return \App\Users\Models\User|null
* @static
*/
public static function getUser()
@@ -2106,7 +2144,7 @@
/**
* Determine if the current user is authenticated. If not, throw an exception.
*
* @return \Domain\Traffic\Models\User
* @return \App\Users\Models\User
* @throws \Illuminate\Auth\AuthenticationException
* @static
*/
@@ -2587,6 +2625,19 @@
{
/** @var \Illuminate\View\Compilers\BladeCompiler $instance */
return $instance->compileEndOnce();
}
/**
* Add a handler to be executed before echoing a given class.
*
* @param string|callable $class
* @param callable|null $handler
* @return void
* @static
*/
public static function stringable($class, $handler = null)
{
/** @var \Illuminate\View\Compilers\BladeCompiler $instance */
$instance->stringable($class, $handler);
}
/**
* Compile Blade echos into valid PHP.
@@ -2599,6 +2650,18 @@
{
/** @var \Illuminate\View\Compilers\BladeCompiler $instance */
return $instance->compileEchos($value);
}
/**
* Apply the echo handler for the value if it exists.
*
* @param $value string
* @return string
* @static
*/
public static function applyEchoHandler($value)
{
/** @var \Illuminate\View\Compilers\BladeCompiler $instance */
return $instance->applyEchoHandler($value);
}
}
@@ -2877,6 +2940,7 @@
*
* @param mixed $command
* @return mixed
* @throws \RuntimeException
* @static
*/
public static function dispatchToQueue($command)
@@ -2959,6 +3023,45 @@
{
/** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
$instance->assertNotDispatched($command, $callback);
}
/**
* Assert if a job was explicitly dispatched synchronously based on a truth-test callback.
*
* @param string|\Closure $command
* @param callable|int|null $callback
* @return void
* @static
*/
public static function assertDispatchedSync($command, $callback = null)
{
/** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
$instance->assertDispatchedSync($command, $callback);
}
/**
* Assert if a job was pushed synchronously a number of times.
*
* @param string $command
* @param int $times
* @return void
* @static
*/
public static function assertDispatchedSyncTimes($command, $times = 1)
{
/** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
$instance->assertDispatchedSyncTimes($command, $times);
}
/**
* Determine if a job was dispatched based on a truth-test callback.
*
* @param string|\Closure $command
* @param callable|null $callback
* @return void
* @static
*/
public static function assertNotDispatchedSync($command, $callback = null)
{
/** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
$instance->assertNotDispatchedSync($command, $callback);
}
/**
* Assert if a job was dispatched after the response was sent based on a truth-test callback.
@@ -3048,6 +3151,19 @@
{
/** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
return $instance->dispatched($command, $callback);
}
/**
* Get all of the jobs dispatched synchronously matching a truth-test callback.
*
* @param string $command
* @param callable|null $callback
* @return \Illuminate\Support\Collection
* @static
*/
public static function dispatchedSync($command, $callback = null)
{
/** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
return $instance->dispatchedSync($command, $callback);
}
/**
* Get all of the jobs dispatched after the response was sent matching a truth-test callback.
@@ -3093,6 +3209,18 @@
* @return bool
* @static
*/
public static function hasDispatchedSync($command)
{
/** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
return $instance->hasDispatchedSync($command);
}
/**
* Determine if there are any stored commands for a given class.
*
* @param string $command
* @return bool
* @static
*/
public static function hasDispatchedAfterResponse($command)
{
/** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */
@@ -4666,6 +4794,17 @@
{ //Method inherited from \Illuminate\Database\Connection
/** @var \Illuminate\Database\MySqlConnection $instance */
return $instance->raw($value);
}
/**
* Determine if the database connection has modified any database records.
*
* @return bool
* @static
*/
public static function hasModifiedRecords()
{ //Method inherited from \Illuminate\Database\Connection
/** @var \Illuminate\Database\MySqlConnection $instance */
return $instance->hasModifiedRecords();
}
/**
* Indicate if any records have been modified.
@@ -4678,6 +4817,18 @@
{ //Method inherited from \Illuminate\Database\Connection
/** @var \Illuminate\Database\MySqlConnection $instance */
$instance->recordsHaveBeenModified($value);
}
/**
* Set the record modification state.
*
* @param bool $value
* @return \Illuminate\Database\MySqlConnection
* @static
*/
public static function setRecordModificationState($value)
{ //Method inherited from \Illuminate\Database\Connection
/** @var \Illuminate\Database\MySqlConnection $instance */
return $instance->setRecordModificationState($value);
}
/**
* Reset the record modification state.
@@ -4689,6 +4840,18 @@
{ //Method inherited from \Illuminate\Database\Connection
/** @var \Illuminate\Database\MySqlConnection $instance */
$instance->forgetRecordModificationState();
}
/**
* Indicate that the connection should use the write PDO connection for reads.
*
* @param bool $value
* @return \Illuminate\Database\MySqlConnection
* @static
*/
public static function useWriteConnectionWhenReading($value = true)
{ //Method inherited from \Illuminate\Database\Connection
/** @var \Illuminate\Database\MySqlConnection $instance */
return $instance->useWriteConnectionWhenReading($value);
}
/**
* Is Doctrine available?
@@ -4814,6 +4977,17 @@
{ //Method inherited from \Illuminate\Database\Connection
/** @var \Illuminate\Database\MySqlConnection $instance */
return $instance->getName();
}
/**
* Get the database connection full name.
*
* @return string|null
* @static
*/
public static function getNameWithReadWriteType()
{ //Method inherited from \Illuminate\Database\Connection
/** @var \Illuminate\Database\MySqlConnection $instance */
return $instance->getNameWithReadWriteType();
}
/**
* Get an option from the configuration options.
@@ -5052,6 +5226,18 @@
{ //Method inherited from \Illuminate\Database\Connection
/** @var \Illuminate\Database\MySqlConnection $instance */
return $instance->setDatabaseName($database);
}
/**
* Set the read / write type of the connection.
*
* @param string|null $readWriteType
* @return \Illuminate\Database\MySqlConnection
* @static
*/
public static function setReadWriteType($readWriteType)
{ //Method inherited from \Illuminate\Database\Connection
/** @var \Illuminate\Database\MySqlConnection $instance */
return $instance->setReadWriteType($readWriteType);
}
/**
* Get the table prefix for the connection.
@@ -5178,6 +5364,7 @@
*
* @param callable $callback
* @return void
* @throws \RuntimeException
* @static
*/
public static function afterCommit($callback)
@@ -5569,6 +5756,7 @@
* @param string $path
* @param array $data
* @return mixed
* @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
* @static
*/
public static function requireOnce($path, $data = [])
@@ -5724,6 +5912,7 @@
* @param string $target
* @param string $link
* @return void
* @throws \RuntimeException
* @static
*/
public static function relativeLink($target, $link)
@@ -5784,6 +5973,7 @@
*
* @param string $path
* @return string|null
* @throws \RuntimeException
* @static
*/
public static function guessExtension($path)
@@ -6710,6 +6900,7 @@
*
* @param string $locale
* @return void
* @throws \InvalidArgumentException
* @static
*/
public static function setLocale($locale)
@@ -6806,6 +6997,8 @@
/**
*
*
* @method static \Illuminate\Log\Logger withContext(array $context = [])
* @method static \Illuminate\Log\Logger withoutContext()
* @method static void write(string $level, string $message, array $context = [])
* @method static void listen(\Closure $callback)
* @see \Illuminate\Log\Logger
@@ -7078,6 +7271,7 @@
*
* @param array $config
* @return \Swift_Transport
* @throws \InvalidArgumentException
* @static
*/
public static function createTransport($config)
@@ -11860,6 +12054,7 @@
*
* @param string $type
* @return void
* @throws \InvalidArgumentException
* @static
*/
public static function defaultMorphKeyType($type)
@@ -12776,6 +12971,18 @@
{
/** @var \Illuminate\Filesystem\FilesystemManager $instance */
return $instance->cloud();
}
/**
* Build an on-demand disk.
*
* @param string|array $config
* @return \Illuminate\Filesystem\FilesystemAdapter
* @static
*/
public static function build($config)
{
/** @var \Illuminate\Filesystem\FilesystemManager $instance */
return $instance->build($config);
}
/**
* Create an instance of the local driver.
@@ -13919,6 +14126,17 @@
{
/** @var \Illuminate\Validation\Factory $instance */
$instance->replacer($rule, $replacer);
}
/**
* Indicate that unvalidated array keys should be excluded, even if the parent array was validated.
*
* @return void
* @static
*/
public static function excludeUnvalidatedArrayKeys()
{
/** @var \Illuminate\Validation\Factory $instance */
$instance->excludeUnvalidatedArrayKeys();
}
/**
* Set the Validator instance resolver.
@@ -14457,6 +14675,7 @@
* @param string $name
* @param string|null $content
* @return void
* @throws \InvalidArgumentException
* @static
*/
public static function slot($name, $content = null)
@@ -16086,7 +16305,7 @@ namespace {
* @param mixed $operator
* @param mixed $value
* @param string $boolean
* @return \Illuminate\Database\Eloquent\Model|static
* @return \Illuminate\Database\Eloquent\Model|static|null
* @static
*/
public static function firstWhere($column, $operator = null, $value = null, $boolean = 'and')
@@ -16423,8 +16642,7 @@ namespace {
* @param array $columns
* @param string $cursorName
* @param string|null $cursor
* @return \Illuminate\Contracts\Pagination\Paginator
* @throws \Illuminate\Pagination\CursorPaginationException
* @return \Illuminate\Contracts\Pagination\CursorPaginator
* @static
*/
public static function cursorPaginate($perPage = null, $columns = [], $cursorName = 'cursor', $cursor = null)
@@ -17046,6 +17264,19 @@ namespace {
return $instance->withAvg($relation, $column);
}
/**
* Add subselect queries to include the existence of related models.
*
* @param string|array $relation
* @return \Illuminate\Database\Eloquent\Builder|static
* @static
*/
public static function withExists($relation)
{
/** @var \Illuminate\Database\Eloquent\Builder $instance */
return $instance->withExists($relation);
}
/**
* Merge the where constraints from another query to the current query.
*
@@ -17105,6 +17336,7 @@ namespace {
* @param callable $callback
* @param int $count
* @return bool
* @throws \RuntimeException
* @static
*/
public static function each($callback, $count = 1000)
@@ -17150,6 +17382,7 @@ namespace {
*
* @param int $chunkSize
* @return \Illuminate\Support\LazyCollection
* @throws \InvalidArgumentException
* @static
*/
public static function lazy($chunkSize = 1000)
@@ -17165,6 +17398,7 @@ namespace {
* @param string|null $column
* @param string|null $alias
* @return \Illuminate\Support\LazyCollection
* @throws \InvalidArgumentException
* @static
*/
public static function lazyById($chunkSize = 1000, $column = null, $alias = null)
@@ -17201,21 +17435,6 @@ namespace {
return $instance->baseSole($columns);
}
/**
* Apply the callback's query changes if the given "value" is true.
*
* @param mixed $value
* @param callable $callback
* @param callable|null $default
* @return mixed|$this
* @static
*/
public static function when($value, $callback, $default = null)
{
/** @var \Illuminate\Database\Eloquent\Builder $instance */
return $instance->when($value, $callback, $default);
}
/**
* Pass the query to a given callback.
*
@@ -17230,12 +17449,27 @@ namespace {
}
/**
* Apply the callback's query changes if the given "value" is false.
* Apply the callback if the given "value" is truthy.
*
* @param mixed $value
* @param callable $callback
* @param callable|null $default
* @return mixed|$this
* @return mixed
* @static
*/
public static function when($value, $callback, $default = null)
{
/** @var \Illuminate\Database\Eloquent\Builder $instance */
return $instance->when($value, $callback, $default);
}
/**
* Apply the callback if the given "value" is falsy.
*
* @param mixed $value
* @param callable $callback
* @param callable|null $default
* @return mixed
* @static
*/
public static function unless($value, $callback, $default = null)
@@ -17763,7 +17997,7 @@ namespace {
/**
* Add an "or where null" clause to the query.
*
* @param string $column
* @param string|array $column
* @return \Illuminate\Database\Query\Builder
* @static
*/
@@ -18441,7 +18675,7 @@ namespace {
/**
* Add a descending "order by" clause to the query.
*
* @param string $column
* @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Query\Expression|string $column
* @return \Illuminate\Database\Query\Builder
* @static
*/
@@ -18577,7 +18811,7 @@ namespace {
/**
* Remove all existing orders and optionally add a new order.
*
* @param string|null $column
* @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Query\Expression|string|null $column
* @param string $direction
* @return \Illuminate\Database\Query\Builder
* @static
@@ -18652,6 +18886,31 @@ namespace {
return $instance->sharedLock();
}
/**
* Register a closure to be invoked before the query is executed.
*
* @param callable $callback
* @return \Illuminate\Database\Query\Builder
* @static
*/
public static function beforeQuery($callback)
{
/** @var \Illuminate\Database\Query\Builder $instance */
return $instance->beforeQuery($callback);
}
/**
* Invoke the "before query" modification callbacks.
*
* @return void
* @static
*/
public static function applyBeforeQueryCallbacks()
{
/** @var \Illuminate\Database\Query\Builder $instance */
$instance->applyBeforeQueryCallbacks();
}
/**
* Get the SQL representation of the query.
*