prefix stringlengths 512 512 | suffix stringlengths 256 256 | middle stringlengths 14 229 | meta dict |
|---|---|---|---|
/**
* The drivers aliases map.
*
* @var array<string, string>
*/
protected static $driverAliases = [
'mssql' => 'sqlsrv',
'mysql2' => 'mysql', // RDS
'postgres' => 'pgsql',
'postgresql' => 'pgsql',
'sqlite3' => 'sqlite',
'redis' => 'tcp',
... | 'url');
if (! $url) {
return $config;
}
$rawComponents = $this->parseUrl($url);
$decodedComponents = $this->parseStringsToNativeTypes(
array_map(rawurldecode(...), $rawComponents)
);
| $config
* @return array<string, mixed>
*/
public function parseConfiguration($config)
{
if (is_string($config)) {
$config = ['url' => $config];
}
$url = Arr::pull($config, | {
"filepath": "src/Illuminate/Support/ConfigurationUrlParser.php",
"language": "php",
"file_size": 4526,
"cut_index": 614,
"middle_length": 229
} |
timezone = null)
* @method \Illuminate\Support\Carbon createFromDate($year = null, $month = null, $day = null, $timezone = null)
* @method \Illuminate\Support\Carbon|null createFromFormat($format, $time, $timezone = null)
* @method \Illuminate\Support\Carbon|null createFromIsoFormat(string $format, string $time, $ti... | mTime($hour = 0, $minute = 0, $second = 0, $timezone = null)
* @method \Illuminate\Support\Carbon createFromTimeString(string $time, \DateTimeZone|string|int|null $timezone = null)
* @method \Illuminate\Support\Carbon createFromTimestamp(string|int|float | string $locale, string $time, $timezone = null)
* @method \Illuminate\Support\Carbon|null createFromLocaleIsoFormat(string $format, string $locale, string $time, $timezone = null)
* @method \Illuminate\Support\Carbon createFro | {
"filepath": "src/Illuminate/Support/DateFactory.php",
"language": "php",
"file_size": 10722,
"cut_index": 921,
"middle_length": 229
} |
namespace Illuminate\Hashing;
use RuntimeException;
class Argon2IdHasher extends ArgonHasher
{
/**
* Check the given plain value against a hash.
*
* @param string $value
* @param string $hashedValue
* @param array $options
* @return bool
*
* @throws \RuntimeException... | password_verify($value, $hashedValue);
}
/**
* Verify the hashed value's algorithm.
*
* @param string $hashedValue
* @return bool
*/
protected function isUsingCorrectAlgorithm($hashedValue)
{
return $this | rn false;
}
if ($this->verifyAlgorithm && ! $this->isUsingCorrectAlgorithm($hashedValue)) {
throw new RuntimeException('This password does not use the Argon2id algorithm.');
}
return | {
"filepath": "src/Illuminate/Hashing/Argon2IdHasher.php",
"language": "php",
"file_size": 1242,
"cut_index": 518,
"middle_length": 229
} |
ract;
use InvalidArgumentException;
use RuntimeException;
class BcryptHasher extends AbstractHasher implements HasherContract
{
/**
* The default cost factor.
*
* @var int
*/
protected $rounds = 12;
/**
* Indicates whether to perform an algorithm check.
*
* @var bool
... | $options['verify'] ?? $this->verifyAlgorithm;
$this->limit = $options['limit'] ?? $this->limit;
}
/**
* Hash the given value.
*
* @param string $value
* @param array $options
* @return string
*
* @th | Create a new hasher instance.
*
* @param array $options
*/
public function __construct(array $options = [])
{
$this->rounds = $options['rounds'] ?? $this->rounds;
$this->verifyAlgorithm = | {
"filepath": "src/Illuminate/Hashing/BcryptHasher.php",
"language": "php",
"file_size": 4288,
"cut_index": 614,
"middle_length": 229
} |
lluminate\Console\Application;
use Illuminate\Contracts\Concurrency\Driver;
use Illuminate\Process\Factory as ProcessFactory;
use Illuminate\Process\Pool;
use Illuminate\Support\Arr;
use Illuminate\Support\Defer\DeferredCallback;
use Laravel\SerializableClosure\SerializableClosure;
use function Illuminate\Support\defe... | ut = null): array
{
$command = Application::formatCommandString('invoke-serialized-closure');
$results = $this->processFactory->pool(function (Pool $pool) use ($tasks, $command, $timeout) {
foreach (Arr::wrap($tasks) as $ke | {
//
}
/**
* Run the given tasks concurrently and return an array containing the results.
*
* @throws \Throwable
*/
public function run(Closure|array $tasks, CarbonInterval|int|null $timeo | {
"filepath": "src/Illuminate/Concurrency/ProcessDriver.php",
"language": "php",
"file_size": 3064,
"cut_index": 614,
"middle_length": 229
} |
te\Log;
use InvalidArgumentException;
use Monolog\Level;
trait ParsesLogConfiguration
{
/**
* The Log levels.
*
* @var array
*/
protected $levels = [
'debug' => Level::Debug,
'info' => Level::Info,
'notice' => Level::Notice,
'warning' => Level::Warning,
... | * @throws \InvalidArgumentException
*/
protected function level(array $config)
{
$level = $config['level'] ?? 'debug';
if (isset($this->levels[$level])) {
return $this->levels[$level];
}
throw ne | me.
*
* @return string
*/
abstract protected function getFallbackChannelName();
/**
* Parse the string level into a Monolog constant.
*
* @param array $config
* @return int
*
| {
"filepath": "src/Illuminate/Log/ParsesLogConfiguration.php",
"language": "php",
"file_size": 1814,
"cut_index": 537,
"middle_length": 229
} |
ort\Traits\Conditionable;
use Illuminate\Support\Traits\Macroable;
use RuntimeException;
use Throwable;
class Repository
{
use Conditionable, Macroable, SerializesModels;
/**
* The event dispatcher instance.
*
* @var \Illuminate\Contracts\Events\Dispatcher
*/
protected $events;
/*... | Context instance.
*/
public function __construct(Dispatcher $events)
{
$this->events = $events;
}
/**
* Determine if the given key exists.
*
* @param string $key
* @return bool
*/
public functio | */
protected $hidden = [];
/**
* The callback that should handle unserialize exceptions.
*
* @var callable|null
*/
protected static $handleUnserializeExceptionsUsing;
/**
* Create a new | {
"filepath": "src/Illuminate/Log/Context/Repository.php",
"language": "php",
"file_size": 16861,
"cut_index": 921,
"middle_length": 229
} |
gumentException;
use Ramsey\Uuid\Uuid;
use Ramsey\Uuid\UuidInterface;
use Symfony\Component\Uid\Ulid;
class BinaryCodec
{
/** @var array<string, array{encode: callable(UuidInterface|Ulid|string|null): ?string, decode: callable(?string): ?string}> */
protected static array $customCodecs = [];
/**
* Re... | string $format): ?string
{
if (blank($value)) {
return null;
}
if (isset(self::$customCodecs[$format])) {
return (self::$customCodecs[$format]['encode'])($value);
}
return match ($forma | $encode,
'decode' => $decode,
];
}
/**
* Encode a value to binary.
*
* @throws \InvalidArgumentException
*/
public static function encode(UuidInterface|Ulid|string|null $value, | {
"filepath": "src/Illuminate/Support/BinaryCodec.php",
"language": "php",
"file_size": 2973,
"cut_index": 563,
"middle_length": 229
} |
osure;
use Illuminate\Support\HigherOrderWhenProxy;
trait Conditionable
{
/**
* Apply the callback if the given "value" is (or resolves to) truthy.
*
* @template TWhenParameter
* @template TWhenReturnType
*
* @param (\Closure($this): TWhenParameter)|TWhenParameter|null $value
*... | return new HigherOrderWhenProxy($this);
}
if (func_num_args() === 1) {
return (new HigherOrderWhenProxy($this))->condition($value);
}
if ($value) {
return $callback($this, $value) ?? $this;
| e
*/
public function when($value = null, ?callable $callback = null, ?callable $default = null)
{
$value = $value instanceof Closure ? $value($this) : $value;
if (func_num_args() === 0) {
| {
"filepath": "src/Illuminate/Conditionable/Traits/Conditionable.php",
"language": "php",
"file_size": 2256,
"cut_index": 563,
"middle_length": 229
} |
m;
use Illuminate\Contracts\Support\DeferringDisplayableValue;
use Illuminate\Contracts\Support\Htmlable;
class EncodedHtmlString extends HtmlString
{
/**
* The HTML string.
*
* @var \Illuminate\Contracts\Support\DeferringDisplayableValue|\Illuminate\Contracts\Support\Htmlable|\BackedEnum|string|int... | * @param bool $doubleEncode
*/
public function __construct($html = '', protected bool $doubleEncode = true)
{
parent::__construct($html);
}
/**
* Convert the special characters in the given value.
*
* @inter | Factory;
/**
* Create a new encoded HTML string instance.
*
* @param \Illuminate\Contracts\Support\DeferringDisplayableValue|\Illuminate\Contracts\Support\Htmlable|\BackedEnum|string|int|float|null $html
| {
"filepath": "src/Illuminate/Support/EncodedHtmlString.php",
"language": "php",
"file_size": 2575,
"cut_index": 563,
"middle_length": 229
} |
inate\Process\Factory as ProcessFactory;
use Illuminate\Support\MultipleInstanceManager;
use RuntimeException;
use Spatie\Fork\Fork;
use function Illuminate\Support\enum_value;
/**
* @mixin \Illuminate\Contracts\Concurrency\Driver
*/
class ConcurrencyManager extends MultipleInstanceManager
{
/**
* Get a dr... | iver($this->app->make(ProcessFactory::class));
}
/**
* Create an instance of the fork concurrency driver.
*
* @return \Illuminate\Concurrency\ForkDriver
*
* @throws \RuntimeException
*/
public function createForkD | $name));
}
/**
* Create an instance of the process concurrency driver.
*
* @return \Illuminate\Concurrency\ProcessDriver
*/
public function createProcessDriver()
{
return new ProcessDr | {
"filepath": "src/Illuminate/Concurrency/ConcurrencyManager.php",
"language": "php",
"file_size": 2544,
"cut_index": 563,
"middle_length": 229
} |
espace Illuminate\Log\Context;
use Illuminate\Container\Container;
use Illuminate\Contracts\Log\ContextLogProcessor as ContextLogProcessorContract;
use Illuminate\Log\Context\Repository as ContextRepository;
use Monolog\LogRecord;
class ContextLogProcessor implements ContextLogProcessorContract
{
/**
* Add c... | $app = Container::getInstance();
if (! $app->bound(ContextRepository::class)) {
return $record;
}
return $record->with(extra: [
...$record->extra,
...$app->get(ContextRepository::class)->a | ecord
{
| {
"filepath": "src/Illuminate/Log/Context/ContextLogProcessor.php",
"language": "php",
"file_size": 818,
"cut_index": 522,
"middle_length": 14
} |
class Composer
{
/**
* The filesystem instance.
*
* @var \Illuminate\Filesystem\Filesystem
*/
protected $files;
/**
* The working path to regenerate from.
*
* @var string|null
*/
protected $workingPath;
/**
* Create a new Composer manager instance.
... | untimeException
*/
public function hasPackage($package)
{
$composer = json_decode(file_get_contents($this->findComposerFile()), true);
return array_key_exists($package, $composer['require'] ?? [])
|| array_key_exis | $this->files = $files;
$this->workingPath = $workingPath;
}
/**
* Determine if the given Composer package is installed.
*
* @param string $package
* @return bool
*
* @throws \R | {
"filepath": "src/Illuminate/Support/Composer.php",
"language": "php",
"file_size": 7005,
"cut_index": 716,
"middle_length": 229
} |
\ResetCommand;
use Illuminate\Database\Console\Migrations\RollbackCommand;
use Illuminate\Database\Console\WipeCommand;
/**
* @method static \Illuminate\Database\Connection connection(\UnitEnum|string|null $name = null)
* @method static \Illuminate\Database\ConnectionInterface build(array $config)
* @method static ... | ethod static mixed usingConnection(\UnitEnum|string $name, callable $callback)
* @method static string getDefaultConnection()
* @method static void setDefaultConnection(string $name)
* @method static string[] supportedDrivers()
* @method static string[ | hod static void purge(\UnitEnum|string|null $name = null)
* @method static void disconnect(\UnitEnum|string|null $name = null)
* @method static \Illuminate\Database\Connection reconnect(\UnitEnum|string|null $name = null)
* @m | {
"filepath": "src/Illuminate/Support/Facades/DB.php",
"language": "php",
"file_size": 8589,
"cut_index": 716,
"middle_length": 229
} |
hp
namespace Illuminate\Support;
use Illuminate\Contracts\Support\Htmlable;
use Stringable;
class HtmlString implements Htmlable, Stringable
{
/**
* The HTML string.
*
* @var string
*/
protected $html;
/**
* Create a new HTML string instance.
*
* @param string $html
... | /**
* Determine if the given HTML string is not empty.
*
* @return bool
*/
public function isNotEmpty()
{
return ! $this->isEmpty();
}
/**
* Get the HTML string.
*
* @return string
*/
pu | l()
{
return $this->html;
}
/**
* Determine if the given HTML string is empty.
*
* @return bool
*/
public function isEmpty()
{
return ($this->html ?? '') === '';
}
| {
"filepath": "src/Illuminate/Support/HtmlString.php",
"language": "php",
"file_size": 1079,
"cut_index": 515,
"middle_length": 229
} |
acts\Support\Htmlable;
use Illuminate\Contracts\Support\Jsonable;
use JsonSerializable;
use Stringable;
use UnitEnum;
class Js implements Htmlable, Stringable
{
/**
* The JavaScript string.
*
* @var string
*/
protected $js;
/**
* Flags that should be used when encoding to JSON.
... | function __construct($data, $flags = 0, $depth = 512)
{
$this->js = $this->convertDataToJavaScriptExpression($data, $flags, $depth);
}
/**
* Create a new JavaScript string from the given data.
*
* @param mixed $data
| DE
| JSON_THROW_ON_ERROR;
/**
* Create a new class instance.
*
* @param mixed $data
* @param int|null $flags
* @param int $depth
*
* @throws \JsonException
*/
public | {
"filepath": "src/Illuminate/Support/Js.php",
"language": "php",
"file_size": 3948,
"cut_index": 614,
"middle_length": 229
} |
mber of potential opportunities to win.
*
* @var int|null
*/
protected $outOf;
/**
* The winning callback.
*
* @var null|callable
*/
protected $winner;
/**
* The losing callback.
*
* @var null|callable
*/
protected $loser;
/**
* The ... | chances > 1) {
throw new RuntimeException('Float must not be greater than 1.');
}
if ($outOf !== null && $outOf < 1) {
throw new RuntimeException('Lottery "out of" value must be greater than or equal to 1.');
| am int|float $chances
* @param int<1, max>|null $outOf
*
* @throws \RuntimeException
*/
public function __construct($chances, $outOf = null)
{
if ($outOf === null && is_float($chances) && $ | {
"filepath": "src/Illuminate/Support/Lottery.php",
"language": "php",
"file_size": 6195,
"cut_index": 716,
"middle_length": 229
} |
the registered messages.
*
* @var array<string, array<string>>
*/
protected $messages = [];
/**
* Default format for message output.
*
* @var string
*/
protected $format = ':message';
/**
* Create a new message bag instance.
*
* @param array<string, A... | public function keys()
{
return array_keys($this->messages);
}
/**
* Add a message to the message bag.
*
* @param string $key
* @param string $message
* @return $this
*/
public function add($ke | ceof Arrayable ? $value->toArray() : (array) $value;
$this->messages[$key] = array_unique($value);
}
}
/**
* Get the keys present in the message bag.
*
* @return array<string>
*/
| {
"filepath": "src/Illuminate/Support/MessageBag.php",
"language": "php",
"file_size": 10802,
"cut_index": 921,
"middle_length": 229
} |
sed items.
*
* @var array
*/
protected $parsed = [];
/**
* Parse a key into namespace, group, and item.
*
* @param string $key
* @return array
*/
public function parseKey($key)
{
// If we've already parsed the given key, we'll return the cached version ... | a
// tool for organizing configuration items for things such as modules.
if (! str_contains($key, '::')) {
$segments = explode('.', $key);
$parsed = $this->parseBasicSegments($segments);
} else {
| rsed[$key])) {
return $this->parsed[$key];
}
// If the key does not contain a double colon, it means the key is not in a
// namespace, and is just a regular configuration item. Namespaces are | {
"filepath": "src/Illuminate/Support/NamespacedItemResolver.php",
"language": "php",
"file_size": 3412,
"cut_index": 614,
"middle_length": 229
} |
te\Support;
use WeakMap;
class Once
{
/**
* The current globally used instance.
*
* @var static|null
*/
protected static ?self $instance = null;
/**
* Indicates if the once instance is enabled.
*
* @var bool
*/
protected static bool $enabled = true;
/**
... | the given onceable.
*
* @param Onceable $onceable
* @return mixed
*/
public function value(Onceable $onceable)
{
if (! static::$enabled) {
return call_user_func($onceable->callable);
}
$ob | }
/**
* Create a new once instance.
*
* @return static
*/
public static function instance()
{
return static::$instance ??= new static(new WeakMap);
}
/**
* Get the value of | {
"filepath": "src/Illuminate/Support/Once.php",
"language": "php",
"file_size": 1905,
"cut_index": 537,
"middle_length": 229
} |
ss;
use ArrayObject;
use Illuminate\Support\Traits\Macroable;
class Optional implements ArrayAccess
{
use Macroable {
__call as macroCall;
}
/**
* The underlying object.
*
* @var mixed
*/
protected $value;
/**
* Create a new optional instance.
*
* @param... | property exists on the underlying object.
*
* @param mixed $name
* @return bool
*/
public function __isset($name)
{
if (is_object($this->value)) {
return isset($this->value->{$name});
}
if | @param string $key
* @return mixed
*/
public function __get($key)
{
if (is_object($this->value)) {
return $this->value->{$key} ?? null;
}
}
/**
* Dynamically check a | {
"filepath": "src/Illuminate/Support/Optional.php",
"language": "php",
"file_size": 2715,
"cut_index": 563,
"middle_length": 229
} |
Inflector\InflectorFactory;
class Pluralizer
{
/**
* The cached inflector instance.
*
* @var static
*/
protected static $inflector;
/**
* The language that should be used by the inflector.
*
* @var string
*/
protected static $language = 'english';
/**
... | lic static function plural($value, $count = 2)
{
if (is_countable($count)) {
$count = count($count);
}
if ((int) abs($count) === 1 || static::uncountable($value) || preg_match('/^(.*)[A-Za-z0-9\x{0080}-\x{FFFF}]$/u' | e = [
'recommended',
'related',
];
/**
* Get the plural form of an English word.
*
* @param string $value
* @param int|array|\Countable $count
* @return string
*/
pub | {
"filepath": "src/Illuminate/Support/Pluralizer.php",
"language": "php",
"file_size": 2908,
"cut_index": 563,
"middle_length": 229
} |
rict_types=1);
namespace Illuminate\Support;
use Closure;
use ReflectionFunction;
trait RebindsCallbacksToSelf
{
/**
* Binds the provided callback to the class instance.
*
* @throws \ReflectionException
*/
protected function bindCallbackToSelf(Closure $callback): ?Closure
{
$r... | .
$callback = $callback->bindTo(null, static::class);
} else {
// Non-static functions are bound to $this.
$callback = $callback->bindTo($this, static::class);
}
}
ret | // Static functions are bound without $this | {
"filepath": "src/Illuminate/Support/RebindsCallbacksToSelf.php",
"language": "php",
"file_size": 860,
"cut_index": 529,
"middle_length": 52
} |
se Illuminate\Console\Command;
use ReflectionClass;
use Symfony\Component\Console\Attribute\AsCommand;
use Throwable;
#[AsCommand(name: 'invoke-serialized-closure')]
class InvokeSerializedClosureCommand extends Command
{
/**
* The console command signature.
*
* @var string
*/
protected $sig... | *
* @return void
*
* @throws \RuntimeException
*/
public function handle()
{
try {
$this->output->write(json_encode([
'successful' => true,
'result' => serialize($this->lar | he given serialized closure';
/**
* Indicates whether the command should be shown in the Artisan command list.
*
* @var bool
*/
protected $hidden = true;
/**
* Execute the console command.
| {
"filepath": "src/Illuminate/Concurrency/Console/InvokeSerializedClosureCommand.php",
"language": "php",
"file_size": 2372,
"cut_index": 563,
"middle_length": 229
} |
;
use Illuminate\Support\Traits\InteractsWithData;
use Illuminate\Support\Traits\Macroable;
use IteratorAggregate;
use JsonSerializable;
use Traversable;
/**
* @template TKey of array-key
* @template TValue
*
* @implements \Illuminate\Contracts\Support\Arrayable<TKey, TValue>
* @implements \ArrayAccess<TKey, TVal... | TValue> $attributes
*/
public function __construct($attributes = [])
{
$this->fill($attributes);
}
/**
* Create a new fluent instance.
*
* @param iterable<TKey, TValue> $attributes
* @return static
|
/**
* All of the attributes set on the fluent instance.
*
* @var array<TKey, TValue>
*/
protected $attributes = [];
/**
* Create a new fluent instance.
*
* @param iterable<TKey, | {
"filepath": "src/Illuminate/Support/Fluent.php",
"language": "php",
"file_size": 7647,
"cut_index": 716,
"middle_length": 229
} |
nvalidArgumentException;
use ReflectionException;
use RuntimeException;
abstract class Manager
{
use RebindsCallbacksToSelf;
/**
* The container instance.
*
* @var \Illuminate\Contracts\Container\Container
*/
protected $container;
/**
* The configuration repository instance.
... | ram \Illuminate\Contracts\Container\Container $container
*/
public function __construct(Container $container)
{
$this->container = $container;
$this->config = $container->make('config');
}
/**
* Get the default | */
protected $customCreators = [];
/**
* The array of created "drivers".
*
* @var array<string, mixed>
*/
protected $drivers = [];
/**
* Create a new manager instance.
*
* @pa | {
"filepath": "src/Illuminate/Support/Manager.php",
"language": "php",
"file_size": 4906,
"cut_index": 614,
"middle_length": 229
} |
ormat the given number according to the current locale.
*
* @param int|float $number
* @param int|null $precision
* @param int|null $maxPrecision
* @param string|null $locale
* @return string|false
*/
public static function format(int|float $number, ?int $precision = null,... | erFormatter::FRACTION_DIGITS, $precision);
}
return $formatter->format($number);
}
/**
* Parse the given string according to the specified format type.
*
* @param string $string
* @param int|null $type
| r::DECIMAL);
if (! is_null($maxPrecision)) {
$formatter->setAttribute(NumberFormatter::MAX_FRACTION_DIGITS, $maxPrecision);
} elseif (! is_null($precision)) {
$formatter->setAttribute(Numb | {
"filepath": "src/Illuminate/Support/Number.php",
"language": "php",
"file_size": 12992,
"cut_index": 921,
"middle_length": 229
} |
use Illuminate\Contracts\Support\HasOnceHash;
use Laravel\SerializableClosure\Support\ReflectionClosure;
class Onceable
{
/**
* Create a new onceable instance.
*
* @param string $hash
* @param object|null $object
* @param callable $callable
*/
public function __construct(
... | ace, $callable))) {
$object = static::objectFromTrace($trace);
return new static($hash, $object, $callable);
}
}
/**
* Computes the object of the onceable from the given trace, if any.
*
* @param ar | *
* @param array<int, array<string, mixed>> $trace
* @return static|null
*/
public static function tryFromTrace(array $trace, callable $callable)
{
if (! is_null($hash = static::hashFromTrace($tr | {
"filepath": "src/Illuminate/Support/Onceable.php",
"language": "php",
"file_size": 2548,
"cut_index": 563,
"middle_length": 229
} |
sUtils is a bunch of utility methods.
*
* This class was originally copied from Symfony 3.
*/
class ProcessUtils
{
/**
* Escapes a string to be used as a shell argument.
*
* @param string $argument
* @return string
*/
public static function escapeArgument($argument)
{
/... | quote = false;
foreach (preg_split('/(")/', $argument, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE) as $part) {
if ($part === '"') {
$escapedArgument .= '\\"';
} elseif (self::isSurrou | 84
// @see https://bugs.php.net/bug.php?id=49446
if ('\\' === DIRECTORY_SEPARATOR) {
if ($argument === '') {
return '""';
}
$escapedArgument = '';
$ | {
"filepath": "src/Illuminate/Support/ProcessUtils.php",
"language": "php",
"file_size": 2050,
"cut_index": 563,
"middle_length": 229
} |
rbonInterval;
use DateInterval;
use DateTimeInterface;
trait InteractsWithTime
{
/**
* Get the number of seconds until the given DateTime.
*
* @param \DateTimeInterface|\DateInterval|int $delay
* @return int
*/
protected function secondsUntil($delay)
{
$delay = $this->par... | ($delay);
return $delay instanceof DateTimeInterface
? $delay->getTimestamp()
: Carbon::now()->addSeconds($delay)->getTimestamp();
}
/**
* If the given value is an interval, convert it to a DateTime instance.
| * Get the "available at" UNIX timestamp.
*
* @param \DateTimeInterface|\DateInterval|int $delay
* @return int
*/
protected function availableAt($delay = 0)
{
$delay = $this->parseDateInterval | {
"filepath": "src/Illuminate/Support/InteractsWithTime.php",
"language": "php",
"file_size": 2076,
"cut_index": 563,
"middle_length": 229
} |
hp
namespace Illuminate\Support;
class AggregateServiceProvider extends ServiceProvider
{
/**
* The provider class names.
*
* @var array<int, class-string<\Illuminate\Support\ServiceProvider>>
*/
protected $providers = [];
/**
* An array of the service provider instances.
*
... | ed by the provider.
*
* @return array<int, string>
*/
public function provides()
{
$provides = [];
foreach ($this->providers as $provider) {
$instance = $this->app->resolveProvider($provider);
| function register()
{
$this->instances = [];
foreach ($this->providers as $provider) {
$this->instances[] = $this->app->register($provider);
}
}
/**
* Get the services provid | {
"filepath": "src/Illuminate/Support/AggregateServiceProvider.php",
"language": "php",
"file_size": 1106,
"cut_index": 515,
"middle_length": 229
} |
/**
* The application instance.
*
* @var \Illuminate\Contracts\Foundation\Application
*/
protected $app;
/**
* The configuration repository instance.
*
* @var \Illuminate\Contracts\Config\Repository
*/
protected $config;
/**
* The array of resolved insta... | nate\Contracts\Foundation\Application $app
*/
public function __construct($app)
{
$this->app = $app;
$this->config = $app->make('config');
}
/**
* Get the default instance name.
*
* @return string
| [];
/**
* The key name of the "driver" equivalent configuration option.
*
* @var string
*/
protected $driverKey = 'driver';
/**
* Create a new manager instance.
*
* @param \Illumi | {
"filepath": "src/Illuminate/Support/MultipleInstanceManager.php",
"language": "php",
"file_size": 5652,
"cut_index": 716,
"middle_length": 229
} |
*
* @var array<class-string>
*/
protected $providers;
/**
* Create a new default provider collection.
*
* @param array<class-string>|null $providers
*/
public function __construct(?array $providers = null)
{
$this->providers = $providers ?: [
\Ill... | ceProvider::class,
\Illuminate\Database\DatabaseServiceProvider::class,
\Illuminate\Encryption\EncryptionServiceProvider::class,
\Illuminate\Filesystem\FilesystemServiceProvider::class,
\Illuminate\Foundation | che\CacheServiceProvider::class,
\Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class,
\Illuminate\Concurrency\ConcurrencyServiceProvider::class,
\Illuminate\Cookie\CookieServi | {
"filepath": "src/Illuminate/Support/DefaultProviders.php",
"language": "php",
"file_size": 3339,
"cut_index": 614,
"middle_length": 229
} |
g.
*
* @var bool
*/
protected static $syncWithCarbon = false;
/**
* The total duration to sleep.
*
* @var \Carbon\CarbonInterval
*/
public $duration;
/**
* The callback that determines if sleeping should continue.
*
* @var \Closure
*/
public $... | e = [];
/**
* Indicates if the instance should sleep.
*
* @var bool
*/
protected $shouldSleep = true;
/**
* Indicates if the instance already slept via `then()`.
*
* @var bool
*/
protected $alreadyS | *
* @var bool
*/
protected static $fake = false;
/**
* The sequence of sleep durations encountered while faking.
*
* @var array<int, \Carbon\CarbonInterval>
*/
protected static $sequenc | {
"filepath": "src/Illuminate/Support/Sleep.php",
"language": "php",
"file_size": 12430,
"cut_index": 921,
"middle_length": 229
} |
eturn $this
*/
public function newLine($count = 1)
{
return $this->append(str_repeat(PHP_EOL, $count));
}
/**
* Transliterate a UTF-8 value to ASCII.
*
* @param string $language
* @return static
*/
public function ascii($language = 'en')
{
return ... | */
public function charAt($index)
{
return Str::charAt($this->value, $index);
}
/**
* Remove the given string if it exists at the start of the current string.
*
* @param string|array $needle
* @return stati | ic function basename($suffix = '')
{
return new static(basename($this->value, $suffix));
}
/**
* Get the character at the specified index.
*
* @param int $index
* @return string|false
| {
"filepath": "src/Illuminate/Support/Stringable.php",
"language": "php",
"file_size": 39545,
"cut_index": 2151,
"middle_length": 229
} |
e;
use League\Uri\Contracts\UriInterface;
use League\Uri\Uri as LeagueUri;
use SensitiveParameter;
use Stringable;
class Uri implements Htmlable, JsonSerializable, Responsable, Stringable
{
use Conditionable, Dumpable, Macroable, Tappable;
/**
* The URI instance.
*/
protected UriInterface $uri;
... | on of(UriInterface|Stringable|string $uri = ''): static
{
return new static($uri);
}
/**
* Get a URI instance of an absolute URL for the given path.
*/
public static function to(string $path): static
{
return | construct(UriInterface|Stringable|string $uri = '')
{
$this->uri = $uri instanceof UriInterface ? $uri : LeagueUri::new((string) $uri);
}
/**
* Create a new URI instance.
*/
public static functi | {
"filepath": "src/Illuminate/Support/Uri.php",
"language": "php",
"file_size": 11836,
"cut_index": 921,
"middle_length": 229
} |
a;
use Illuminate\Support\Traits\Dumpable;
use Illuminate\Support\Traits\InteractsWithData;
use Traversable;
class ValidatedInput implements ValidatedData
{
use Dumpable, InteractsWithData;
/**
* The underlying input.
*
* @var array
*/
protected $input;
/**
* Create a new val... | /**
* Get the raw, underlying input array.
*
* @param mixed $keys
* @return array
*/
public function all($keys = null)
{
if (! $keys) {
return $this->input;
}
$input = [];
| input with the given array of additional data.
*
* @param array $items
* @return static
*/
public function merge(array $items)
{
return new static(array_merge($this->all(), $items));
}
| {
"filepath": "src/Illuminate/Support/ValidatedInput.php",
"language": "php",
"file_size": 4732,
"cut_index": 614,
"middle_length": 229
} |
;
use Illuminate\Contracts\Support\MessageBag as MessageBagContract;
use Stringable;
/**
* @mixin \Illuminate\Contracts\Support\MessageBag
*/
class ViewErrorBag implements Countable, Stringable
{
/**
* The array of the view error bags.
*
* @var array<string, \Illuminate\Contracts\Support\MessageBa... | public function getBag($key)
{
return Arr::get($this->bags, $key) ?: new MessageBag;
}
/**
* Get all the bags.
*
* @return array<string, \Illuminate\Contracts\Support\MessageBag>
*/
public function getBags()
| $key = 'default')
{
return isset($this->bags[$key]);
}
/**
* Get a MessageBag instance from the bags.
*
* @param string $key
* @return \Illuminate\Contracts\Support\MessageBag
*/
| {
"filepath": "src/Illuminate/Support/ViewErrorBag.php",
"language": "php",
"file_size": 2755,
"cut_index": 563,
"middle_length": 229
} |
pace Illuminate\Support\Traits;
use Illuminate\Contracts\Container\Container;
use Illuminate\Support\Fluent;
trait CapsuleManagerTrait
{
/**
* The current globally used instance.
*
* @var object
*/
protected static $instance;
/**
* The container instance.
*
* @var \Illu... | 'config', new Fluent);
}
}
/**
* Make this capsule instance available globally.
*
* @return void
*/
public function setAsGlobal()
{
static::$instance = $this;
}
/**
* Get the IoC container | iner
* @return void
*/
protected function setupContainer(Container $container)
{
$this->container = $container;
if (! $this->container->bound('config')) {
$this->container->instance( | {
"filepath": "src/Illuminate/Support/Traits/CapsuleManagerTrait.php",
"language": "php",
"file_size": 1431,
"cut_index": 524,
"middle_length": 229
} |
ixed $keys
* @return array
*/
abstract public function all($keys = null);
/**
* Retrieve data from the instance.
*
* @param string|null $key
* @param mixed $default
* @return mixed
*/
abstract protected function data($key = null, $default = null);
/**
... | $data = $this->all();
foreach ($keys as $value) {
if (! Arr::has($data, $value)) {
return false;
}
}
return true;
}
/**
* Determine if the instance contains any of the given |
/**
* Determine if the data contains a given key.
*
* @param string|array $key
* @return bool
*/
public function has($key)
{
$keys = is_array($key) ? $key : func_get_args();
| {
"filepath": "src/Illuminate/Support/Traits/InteractsWithData.php",
"language": "php",
"file_size": 11130,
"cut_index": 921,
"middle_length": 229
} |
ception;
use ReflectionClass;
trait ReadsClassAttributes
{
/**
* Get a configuration value from an attribute, falling back to a property.
*
* @param object $target
* @param class-string $attributeClass
* @param string|null $property
* @param mixed $default
* @return mixed... | if ($instance = $this->getAttributeInstance($target, $attributeClass)) {
return $this->extractAttributeValue($instance);
}
return $target->{$property} ?? $default;
}
/**
* Extract the value from an attribute ins | $defaultProperties = $reflection->getDefaultProperties();
if (isset($target->{$property}) && $target->{$property} !== ($defaultProperties[$property] ?? null)) {
return $target->{$property};
}
| {
"filepath": "src/Illuminate/Support/Traits/ReadsClassAttributes.php",
"language": "php",
"file_size": 2040,
"cut_index": 563,
"middle_length": 229
} |
(\UnitEnum|string|null $name = null)
* @method static \Illuminate\Auth\SessionGuard createSessionDriver(string $name, array $config)
* @method static \Illuminate\Auth\TokenGuard createTokenDriver(string $name, array $config)
* @method static string getDefaultDriver()
* @method static void shouldUse(\UnitEnum|string... | \Auth\AuthManager provider(string $name, \Closure $callback)
* @method static bool hasResolvedGuards()
* @method static \Illuminate\Auth\AuthManager forgetGuards()
* @method static \Illuminate\Auth\AuthManager setApplication(\Illuminate\Contracts\Founda | osure userResolver()
* @method static \Illuminate\Auth\AuthManager resolveUsersUsing(\Closure $userResolver)
* @method static \Illuminate\Auth\AuthManager extend(string $driver, \Closure $callback)
* @method static \Illuminate | {
"filepath": "src/Illuminate/Support/Facades/Auth.php",
"language": "php",
"file_size": 5190,
"cut_index": 716,
"middle_length": 229
} |
lluminate\Contracts\Broadcasting\Factory as BroadcastingFactoryContract;
/**
* @method static void routes(array|null $attributes = null)
* @method static void userRoutes(array|null $attributes = null)
* @method static void channelRoutes(array|null $attributes = null)
* @method static string|null socket(\Illuminate... | atic void queue(mixed $event)
* @method static mixed connection(\UnitEnum|string|null $name = null)
* @method static mixed driver(\UnitEnum|string|null $name = null)
* @method static \Pusher\Pusher pusher(array $config)
* @method static \Ably\AblyRest | ting\AnonymousEvent private(string $channel)
* @method static \Illuminate\Broadcasting\AnonymousEvent presence(string $channel)
* @method static \Illuminate\Broadcasting\PendingBroadcast event(mixed $event = null)
* @method st | {
"filepath": "src/Illuminate/Support/Facades/Broadcast.php",
"language": "php",
"file_size": 2813,
"cut_index": 563,
"middle_length": 229
} |
ache\Repository driver(\UnitEnum|string|null $driver = null)
* @method static \Illuminate\Contracts\Cache\Repository memo(\UnitEnum|string|null $driver = null)
* @method static \Illuminate\Contracts\Cache\Repository resolve(string $name)
* @method static \Illuminate\Cache\Repository build(array $config)
* @method s... | ame = null)
* @method static \Illuminate\Cache\CacheManager extend(string $driver, \Closure $callback)
* @method static \Illuminate\Cache\CacheManager setApplication(\Illuminate\Contracts\Foundation\Application $app)
* @method static void handleUnserial | river()
* @method static void setDefaultDriver(\UnitEnum|string $name)
* @method static \Illuminate\Cache\CacheManager forgetDriver(array|\UnitEnum|string|null $name = null)
* @method static void purge(\UnitEnum|string|null $n | {
"filepath": "src/Illuminate/Support/Facades/Cache.php",
"language": "php",
"file_size": 6041,
"cut_index": 716,
"middle_length": 229
} |
pace Illuminate\Support\Facades;
use Illuminate\Concurrency\ConcurrencyManager;
/**
* @method static mixed driver(\UnitEnum|string|null $name = null)
* @method static \Illuminate\Concurrency\ProcessDriver createProcessDriver()
* @method static \Illuminate\Concurrency\ForkDriver createForkDriver()
* @method static... | $name = null)
* @method static \Illuminate\Concurrency\ConcurrencyManager extend(string $name, \Closure $callback)
* @method static \Illuminate\Concurrency\ConcurrencyManager setApplication(\Illuminate\Contracts\Foundation\Application $app)
* @method st | Config(string $name)
* @method static mixed instance(string|null $name = null)
* @method static \Illuminate\Concurrency\ConcurrencyManager forgetInstance(array|string|null $name = null)
* @method static void purge(string|null | {
"filepath": "src/Illuminate/Support/Facades/Concurrency.php",
"language": "php",
"file_size": 1479,
"cut_index": 524,
"middle_length": 229
} |
pace Illuminate\Support\Facades;
/**
* @method static bool has(string $key)
* @method static mixed get(array|string $key, mixed $default = null)
* @method static array getMany(array $keys)
* @method static string string(string $key, \Closure|string|null $default = null)
* @method static int integer(string $key, \... | ng $key, mixed $value = null)
* @method static void prepend(string $key, mixed $value)
* @method static void push(string $key, mixed $value)
* @method static array all()
* @method static void macro(string $name, object|callable $macro)
* @method stati | )
* @method static array array(string $key, \Closure|array|null $default = null)
* @method static \Illuminate\Support\Collection collection(string $key, \Closure|array|null $default = null)
* @method static void set(array|stri | {
"filepath": "src/Illuminate/Support/Facades/Config.php",
"language": "php",
"file_size": 1400,
"cut_index": 524,
"middle_length": 229
} |
, string $cipher)
* @method static string generateKey(string $cipher)
* @method static string encrypt(mixed $value, bool $serialize = true)
* @method static string encryptString(string $value)
* @method static mixed decrypt(string $payload, bool $unserialize = true)
* @method static string decryptString(string $pa... | $keys)
*
* @see \Illuminate\Encryption\Encrypter
*/
class Crypt extends Facade
{
/**
* Get the registered name of the component.
*
* @return string
*/
protected static function getFacadeAccessor()
{
return 'encryp | \Illuminate\Encryption\Encrypter previousKeys(array | {
"filepath": "src/Illuminate/Support/Facades/Crypt.php",
"language": "php",
"file_size": 928,
"cut_index": 606,
"middle_length": 52
} |
te\Support;
use Throwable;
class Timebox
{
/**
* Indicates if the timebox is allowed to return early.
*
* @var bool
*/
public $earlyReturn = false;
/**
* Invoke the given callback within the specified timebox minimum.
*
* @template TCallReturnType
*
* @param ... |
$remainder = (int) ($microseconds - ((microtime(true) - $start) * 1_000_000));
if (! $this->earlyReturn && $remainder > 0) {
$this->usleep($remainder);
}
if ($exception) {
throw $exception;
| ack, int $microseconds)
{
$exception = null;
$start = microtime(true);
try {
$result = $callback($this);
} catch (Throwable $caught) {
$exception = $caught;
}
| {
"filepath": "src/Illuminate/Support/Timebox.php",
"language": "php",
"file_size": 1698,
"cut_index": 537,
"middle_length": 229
} |
inate\Support\Defer\DeferredCallback;
use Illuminate\Support\Defer\DeferredCallbackCollection;
use Illuminate\Support\Facades\Date;
use Symfony\Component\Process\PhpExecutableFinder;
if (! function_exists('Illuminate\Support\defer')) {
/**
* Defer execution of the given callback.
*
* @param callabl... | p(DeferredCallbackCollection::class);
}
return tap(
new DeferredCallback($callback, $name, $always),
fn ($deferred) => app(DeferredCallbackCollection::class)[] = $deferred
);
}
}
if (! function_exists(' | Defer\DeferredCallback)
*/
function defer(?callable $callback = null, ?string $name = null, bool $always = false): DeferredCallback|DeferredCallbackCollection
{
if ($callback === null) {
return ap | {
"filepath": "src/Illuminate/Support/functions.php",
"language": "php",
"file_size": 4241,
"cut_index": 614,
"middle_length": 229
} |
te\Support\Traits;
use BadMethodCallException;
use Error;
trait ForwardsCalls
{
/**
* Forward a method call to the given object.
*
* @param mixed $object
* @param string $method
* @param array $parameters
* @return mixed
*
* @throws \BadMethodCallException
*/
... | hes['class'] != get_class($object) ||
$matches['method'] != $method) {
throw $e;
}
static::throwBadMethodCallException($method);
}
}
/**
* Forward a method call to the given obj | $pattern = '~^Call to undefined method (?P<class>[^:]+)::(?P<method>[^\(]+)\(\)$~';
if (! preg_match($pattern, $e->getMessage(), $matches)) {
throw $e;
}
if ($matc | {
"filepath": "src/Illuminate/Support/Traits/ForwardsCalls.php",
"language": "php",
"file_size": 1874,
"cut_index": 537,
"middle_length": 229
} |
te\Support\Facades;
use Illuminate\Contracts\Console\Kernel as ConsoleKernelContract;
/**
* @method static int handle(\Symfony\Component\Console\Input\InputInterface $input, \Symfony\Component\Console\Output\OutputInterface|null $output = null)
* @method static void terminate(\Symfony\Component\Console\Input\InputI... | $callback)
* @method static void registerCommand(\Symfony\Component\Console\Command\Command $command)
* @method static int call(\Symfony\Component\Console\Command\Command|string $command, array $parameters = [], \Symfony\Component\Console\Output\OutputIn | minate\Support\Carbon|null commandStartedAt()
* @method static \Illuminate\Console\Scheduling\Schedule resolveConsoleSchedule()
* @method static \Illuminate\Foundation\Console\ClosureCommand command(string $signature, \Closure | {
"filepath": "src/Illuminate/Support/Facades/Artisan.php",
"language": "php",
"file_size": 1952,
"cut_index": 537,
"middle_length": 229
} |
te\Support\Testing\Fakes\BusFake;
/**
* @method static mixed dispatch(mixed $command)
* @method static mixed dispatchSync(mixed $command, mixed $handler = null)
* @method static mixed dispatchNow(mixed $command, mixed $handler = null)
* @method static \Illuminate\Bus\Batch|null findBatch(string $batchId)
* @metho... | se(mixed $command, mixed $handler = null)
* @method static \Illuminate\Bus\Dispatcher pipeThrough(array $pipes)
* @method static \Illuminate\Bus\Dispatcher map(array $map)
* @method static \Illuminate\Bus\Dispatcher withDispatchingAfterResponses()
* @m | l $jobs = null)
* @method static bool hasCommandHandler(mixed $command)
* @method static mixed getCommandHandler(mixed $command)
* @method static mixed dispatchToQueue(mixed $command)
* @method static void dispatchAfterRespon | {
"filepath": "src/Illuminate/Support/Facades/Bus.php",
"language": "php",
"file_size": 5340,
"cut_index": 716,
"middle_length": 229
} |
tatic bool missing(string $key)
* @method static bool hasHidden(string $key)
* @method static bool missingHidden(string $key)
* @method static array all()
* @method static array allHidden()
* @method static mixed get(string $key, mixed $default = null)
* @method static mixed getHidden(string $key, mixed $default ... | ll)
* @method static \Illuminate\Log\Context\Repository addHidden(string|array $key, mixed $value = null)
* @method static mixed remember(string $key, mixed $value)
* @method static mixed rememberHidden(string $key, mixed $value)
* @method static \Illu | thod static array onlyHidden(array $keys)
* @method static array except(array $keys)
* @method static array exceptHidden(array $keys)
* @method static \Illuminate\Log\Context\Repository add(string|array $key, mixed $value = nu | {
"filepath": "src/Illuminate/Support/Facades/Context.php",
"language": "php",
"file_size": 3475,
"cut_index": 614,
"middle_length": 229
} |
cased words.
*
* @var array<string, string>
*/
protected static $studlyCache = [];
/**
* The callback that should be used to generate UUIDs.
*
* @var (callable(): \Ramsey\Uuid\UuidInterface)|null
*/
protected static $uuidFactory;
/**
* The callback that should b... | * @return \Illuminate\Support\Stringable
*/
public static function of($string)
{
return new Stringable($string);
}
/**
* Return the remainder of a string after the first occurrence of a given value.
*
* @param | ate random strings.
*
* @var (callable(int): string)|null
*/
protected static $randomStringFactory;
/**
* Get a new stringable object from the given string.
*
* @param string $string
| {
"filepath": "src/Illuminate/Support/Str.php",
"language": "php",
"file_size": 66174,
"cut_index": 2151,
"middle_length": 229
} |
luminate\Notifications\ChannelManager;
use Illuminate\Support\Testing\Fakes\NotificationFake;
/**
* @method static void send(\Illuminate\Support\Collection|mixed $notifiables, mixed $notification)
* @method static void sendNow(\Illuminate\Support\Collection|mixed $notifiables, mixed $notification, array|null $channe... | r extend(string $driver, \Closure $callback)
* @method static array getDrivers()
* @method static \Illuminate\Contracts\Container\Container getContainer()
* @method static \Illuminate\Notifications\ChannelManager setContainer(\Illuminate\Contracts\Conta | * @method static string deliversVia()
* @method static void deliverVia(string $channel)
* @method static \Illuminate\Notifications\ChannelManager locale(string $locale)
* @method static \Illuminate\Notifications\ChannelManage | {
"filepath": "src/Illuminate/Support/Facades/Notification.php",
"language": "php",
"file_size": 4138,
"cut_index": 614,
"middle_length": 229
} |
lluminate\Contracts\Auth\PasswordBroker;
/**
* @method static \Illuminate\Contracts\Auth\PasswordBroker broker(\UnitEnum|string|null $name = null)
* @method static string getDefaultDriver()
* @method static void setDefaultDriver(\UnitEnum|string $name)
* @method static string sendResetLink(array $credentials, \Clo... | ts\Auth\CanResetPassword $user, string $token)
* @method static \Illuminate\Auth\Passwords\TokenRepositoryInterface getRepository()
* @method static \Illuminate\Support\Timebox getTimebox()
*
* @see \Illuminate\Auth\Passwords\PasswordBrokerManager
* @ |
* @method static string createToken(\Illuminate\Contracts\Auth\CanResetPassword $user)
* @method static void deleteToken(\Illuminate\Contracts\Auth\CanResetPassword $user)
* @method static bool tokenExists(\Illuminate\Contrac | {
"filepath": "src/Illuminate/Support/Facades/Password.php",
"language": "php",
"file_size": 2463,
"cut_index": 563,
"middle_length": 229
} |
thod static \Illuminate\Process\PendingProcess command(array|string $command)
* @method static \Illuminate\Process\PendingProcess path(string $path)
* @method static \Illuminate\Process\PendingProcess timeout(\Carbon\CarbonInterval|int $timeout)
* @method static \Illuminate\Process\PendingProcess idleTimeout(\Carbon... | e)
* @method static \Illuminate\Process\PendingProcess options(array $options)
* @method static \Illuminate\Contracts\Process\ProcessResult run(array|string|null $command = null, callable|null $output = null)
* @method static \Illuminate\Process\Invoked | uminate\Process\PendingProcess input(\Traversable|resource|string|int|float|bool|null $input)
* @method static \Illuminate\Process\PendingProcess quietly()
* @method static \Illuminate\Process\PendingProcess tty(bool $tty = tru | {
"filepath": "src/Illuminate/Support/Facades/Process.php",
"language": "php",
"file_size": 4225,
"cut_index": 614,
"middle_length": 229
} |
ull)
* @method static string getPath()
* @method static void setPath(string $path)
* @method static string compileString(string $value)
* @method static string render(string $string, array $data = [], bool $deleteCachedView = false)
* @method static string renderComponent(\Illuminate\View\Component $component)
* ... | , string $prefix = '')
* @method static array getClassComponentAliases()
* @method static void anonymousComponentPath(string $path, string|null $prefix = null)
* @method static void anonymousComponentNamespace(string $directory, string|null $prefix = nu | lable $callback)
* @method static bool check(string $name, mixed ...$parameters)
* @method static void component(string $class, string|null $alias = null, string $prefix = '')
* @method static void components(array $components | {
"filepath": "src/Illuminate/Support/Facades/Blade.php",
"language": "php",
"file_size": 3135,
"cut_index": 614,
"middle_length": 229
} |
* @method static \Symfony\Component\HttpFoundation\Cookie make(string $name, string $value, int $minutes = 0, string|null $path = null, string|null $domain = null, bool|null $secure = null, bool $httpOnly = true, bool $raw = false, string|null $sameSite = null)
* @method static \Symfony\Component\HttpFoundation\Cookie... | y\Component\HttpFoundation\Cookie|null queued(string $key, mixed $default = null, string|null $path = null)
* @method static void queue(mixed ...$parameters)
* @method static void expire(string $name, string|null $path = null, string|null $domain = null) | @method static \Symfony\Component\HttpFoundation\Cookie forget(string $name, string|null $path = null, string|null $domain = null)
* @method static bool hasQueued(string $key, string|null $path = null)
* @method static \Symfon | {
"filepath": "src/Illuminate/Support/Facades/Cookie.php",
"language": "php",
"file_size": 2449,
"cut_index": 563,
"middle_length": 229
} |
luminate\Support\Sleep;
use Illuminate\Support\Str;
use Illuminate\Support\Stringable as SupportStringable;
if (! function_exists('append_config')) {
/**
* Assign high numeric IDs to a config item to force appending.
*
* @param array $array
*/
function append_config(array $array): array
... | assert-if-true !=numeric|bool $value
*
* @param mixed $value
*/
function blank($value): bool
{
if (is_null($value)) {
return true;
}
if (is_string($value)) {
return trim($value) === | );
}
}
return $array;
}
}
if (! function_exists('blank')) {
/**
* Determine if the given value is "blank".
*
* @phpstan-assert-if-false !=null|'' $value
*
* @phpstan- | {
"filepath": "src/Illuminate/Support/helpers.php",
"language": "php",
"file_size": 13667,
"cut_index": 921,
"middle_length": 229
} |
.php
*
* @method static mixed use(mixed $handler)
* @method static void useDefault()
* @method static void useCallable(callable $callable)
* @method static void useClass(string $dateClass)
* @method static void useFactory(object $factory)
* @method static bool canBeCreatedFromFormat(?string $date, string $format... | ateFromIsoFormat(string $format, string $time, $timezone = null, ?string $locale = 'en', ?\Symfony\Contracts\Translation\TranslatorInterface $translator = null)
* @method static \Illuminate\Support\Carbon|null createFromLocaleFormat(string $format, string | createFromDate($year = null, $month = null, $day = null, $timezone = null)
* @method static \Illuminate\Support\Carbon|null createFromFormat($format, $time, $timezone = null)
* @method static \Illuminate\Support\Carbon|null cre | {
"filepath": "src/Illuminate/Support/Facades/Date.php",
"language": "php",
"file_size": 8379,
"cut_index": 716,
"middle_length": 229
} |
eException;
abstract class Facade
{
/**
* The application instance being facaded.
*
* @var \Illuminate\Contracts\Foundation\Application|null
*/
protected static $app;
/**
* The resolved object instances.
*
* @var array
*/
protected static $resolvedInstance;
... | sor) === true) {
$callback(static::getFacadeRoot(), static::$app);
}
static::$app->afterResolving($accessor, function ($service, $app) use ($callback) {
$callback($service, $app);
});
}
/**
* C | olved.
*
* @param \Closure $callback
* @return void
*/
public static function resolved(Closure $callback)
{
$accessor = static::getFacadeAccessor();
if (static::$app->resolved($acces | {
"filepath": "src/Illuminate/Support/Facades/Facade.php",
"language": "php",
"file_size": 9330,
"cut_index": 921,
"middle_length": 229
} |
od static bool missing(string $path)
* @method static string get(string $path, bool $lock = false)
* @method static array json(string $path, int $flags = 0, bool $lock = false)
* @method static string sharedGet(string $path)
* @method static mixed getRequire(string $path, array $data = [])
* @method static mixed r... | rray|string $replace, string $path)
* @method static int prepend(string $path, string $data)
* @method static int append(string $path, string $data, bool $lock = false)
* @method static mixed chmod(string $path, int|null $mode = null)
* @method static |
* @method static int|bool put(string $path, string $contents, bool $lock = false)
* @method static void replace(string $path, string $content, int|null $mode = null)
* @method static void replaceInFile(array|string $search, a | {
"filepath": "src/Illuminate/Support/Facades/File.php",
"language": "php",
"file_size": 4026,
"cut_index": 614,
"middle_length": 229
} |
t\Factory globalOptions(\Closure|array $options)
* @method static \GuzzleHttp\Promise\PromiseInterface response(array|string|null $body = null, int $status = 200, array $headers = [])
* @method static \GuzzleHttp\Psr7\Response psr7Response(array|string|null $body = null, int $status = 200, array $headers = [])
* @me... | array|null $only = null)
* @method static \Illuminate\Http\Client\Factory record()
* @method static void recordRequestResponsePair(\Illuminate\Http\Client\Request $request, \Illuminate\Http\Client\Response|null $response)
* @method static void assertSen | ll $message = null)
* @method static \Illuminate\Http\Client\ResponseSequence sequence(array $responses = [])
* @method static bool preventingStrayRequests()
* @method static \Illuminate\Http\Client\Factory allowStrayRequests( | {
"filepath": "src/Illuminate/Support/Facades/Http.php",
"language": "php",
"file_size": 11002,
"cut_index": 921,
"middle_length": 229
} |
* @method static \Psr\Log\LoggerInterface build(array $config)
* @method static \Psr\Log\LoggerInterface stack(array $channels, string|null $channel = null)
* @method static \Psr\Log\LoggerInterface channel(\UnitEnum|string|null $channel = null)
* @method static \Psr\Log\LoggerInterface driver(\UnitEnum|string|null ... | inate\Log\LogManager extend(string $driver, \Closure $callback)
* @method static void forgetChannel(string|null $driver = null)
* @method static array getChannels()
* @method static void emergency(string|\Stringable $message, array $context = [])
* @me | ring[]|null $keys = null)
* @method static \Illuminate\Log\LogManager flushSharedContext()
* @method static string|null getDefaultDriver()
* @method static void setDefaultDriver(\UnitEnum|string $name)
* @method static \Illum | {
"filepath": "src/Illuminate/Support/Facades/Log.php",
"language": "php",
"file_size": 2909,
"cut_index": 563,
"middle_length": 229
} |
n\MaintenanceModeManager;
/**
* @method static string getDefaultDriver()
* @method static mixed driver(\UnitEnum|string|null $driver = null)
* @method static \Illuminate\Foundation\MaintenanceModeManager extend(string $driver, \Closure $callback)
* @method static array getDrivers()
* @method static \Illuminate\Co... | Drivers()
*
* @see \Illuminate\Foundation\MaintenanceModeManager
*/
class MaintenanceMode extends Facade
{
/**
* Get the registered name of the component.
*
* @return string
*/
protected static function getFacadeAccessor()
| \Illuminate\Foundation\MaintenanceModeManager forget | {
"filepath": "src/Illuminate/Support/Facades/MaintenanceMode.php",
"language": "php",
"file_size": 948,
"cut_index": 582,
"middle_length": 52
} |
pace Illuminate\Support\Facades;
/**
* @method static void resolveOptionsUsing(\Closure|null $resolver)
* @method static void resolveTokenUsing(\Closure|null $resolver)
* @method static void setUpProcess(callable $callback)
* @method static void setUpTestCase(callable $callback)
* @method static void setUpTestDat... | reMigratingCallbacks(string $database)
* @method static void callSetUpTestDatabaseCallbacks(string $database)
* @method static void callTearDownProcessCallbacks()
* @method static void callTearDownTestCaseCallbacks(\Illuminate\Foundation\Testing\TestCas | TestCase(callable $callback)
* @method static void callSetUpProcessCallbacks()
* @method static void callSetUpTestCaseCallbacks(\Illuminate\Foundation\Testing\TestCase $testCase)
* @method static void callSetUpTestDatabaseBefo | {
"filepath": "src/Illuminate/Support/Facades/ParallelTesting.php",
"language": "php",
"file_size": 1415,
"cut_index": 524,
"middle_length": 229
} |
ng(string $bootstrapper, \Closure $callback)
* @method static void afterBootstrapping(string $bootstrapper, \Closure $callback)
* @method static bool hasBeenBootstrapped()
* @method static \Illuminate\Foundation\Application setBasePath(string $basePath)
* @method static string path(string $path = '')
* @method sta... | seConfigPath(string $path)
* @method static string databasePath(string $path = '')
* @method static \Illuminate\Foundation\Application useDatabasePath(string $path)
* @method static string langPath(string $path = '')
* @method static \Illuminate\Founda | string getBootstrapProvidersPath()
* @method static \Illuminate\Foundation\Application useBootstrapPath(string $path)
* @method static string configPath(string $path = '')
* @method static \Illuminate\Foundation\Application u | {
"filepath": "src/Illuminate/Support/Facades/App.php",
"language": "php",
"file_size": 9787,
"cut_index": 921,
"middle_length": 229
} |
te\Support;
use Illuminate\Contracts\Support\Arrayable;
use Illuminate\Support\Traits\InteractsWithData;
use League\Uri\QueryString;
use Stringable;
class UriQueryString implements Arrayable, Stringable
{
use InteractsWithData;
/**
* Create a new URI query string instance.
*/
public function __... | :set($results, $key, Arr::get($query, $key));
}
return $results;
}
/**
* Retrieve data from the instance.
*
* @param string|null $key
* @param mixed $default
* @return mixed
*/
protected funct | l($keys = null)
{
$query = $this->toArray();
if (! $keys) {
return $query;
}
$results = [];
foreach (is_array($keys) ? $keys : func_get_args() as $key) {
Arr: | {
"filepath": "src/Illuminate/Support/UriQueryString.php",
"language": "php",
"file_size": 1984,
"cut_index": 537,
"middle_length": 229
} |
llable|array|string $events, \Illuminate\Events\QueuedClosure|callable|array|string|null $listener = null)
* @method static bool hasListeners(string $eventName)
* @method static bool hasWildcardListeners(string $eventName)
* @method static void push(string $event, object|array $payload = [])
* @method static void f... | d static \Closure createClassListener(string $listener, bool $wildcard = false)
* @method static void forget(string $event)
* @method static void forgetPushed()
* @method static \Illuminate\Events\Dispatcher setQueueResolver(callable $resolver)
* @meth | tch(string|object $event, mixed $payload = [], bool $halt = false)
* @method static array getListeners(string $eventName)
* @method static \Closure makeListener(\Closure|string|array $listener, bool $wildcard = false)
* @metho | {
"filepath": "src/Illuminate/Support/Facades/Event.php",
"language": "php",
"file_size": 5194,
"cut_index": 716,
"middle_length": 229
} |
pace Illuminate\Support\Facades;
/**
* @method static \Illuminate\Hashing\BcryptHasher createBcryptDriver()
* @method static \Illuminate\Hashing\ArgonHasher createArgonDriver()
* @method static \Illuminate\Hashing\Argon2IdHasher createArgon2idDriver()
* @method static array info(string $hashedValue)
* @method sta... | ger extend(string $driver, \Closure $callback)
* @method static array getDrivers()
* @method static \Illuminate\Contracts\Container\Container getContainer()
* @method static \Illuminate\Hashing\HashManager setContainer(\Illuminate\Contracts\Container\Co | , array $options = [])
* @method static bool isHashed(string $value)
* @method static string getDefaultDriver()
* @method static mixed driver(\UnitEnum|string|null $driver = null)
* @method static \Illuminate\Hashing\HashMana | {
"filepath": "src/Illuminate/Support/Facades/Hash.php",
"language": "php",
"file_size": 1394,
"cut_index": 524,
"middle_length": 229
} |
static \Illuminate\Mail\Mailer driver(\UnitEnum|string|null $driver = null)
* @method static \Illuminate\Mail\Mailer build(array $config)
* @method static \Symfony\Component\Mailer\Transport\TransportInterface createSymfonyTransport(array $config)
* @method static string getDefaultDriver()
* @method static void set... | MailManager forgetMailers()
* @method static void alwaysFrom(string $address, string|null $name = null)
* @method static void alwaysReplyTo(string $address, string|null $name = null)
* @method static void alwaysReturnPath(string $address)
* @method sta |
* @method static \Illuminate\Contracts\Foundation\Application getApplication()
* @method static \Illuminate\Mail\MailManager setApplication(\Illuminate\Contracts\Foundation\Application $app)
* @method static \Illuminate\Mail\ | {
"filepath": "src/Illuminate/Support/Facades/Mail.php",
"language": "php",
"file_size": 5376,
"cut_index": 716,
"middle_length": 229
} |
s All of the container bindings that should be registered.
* @property array<array-key, string> $singletons All of the singletons that should be registered.
*/
abstract class ServiceProvider
{
/**
* The application instance.
*
* @var \Illuminate\Contracts\Foundation\Application
*/
protecte... | e published by group.
*
* @var array
*/
public static $publishGroups = [];
/**
* The migration paths available for publishing.
*
* @var array
*/
protected static $publishableMigrationPaths = [];
/**
| *
* @var array
*/
protected $bootedCallbacks = [];
/**
* The paths that should be published.
*
* @var array
*/
public static $publishes = [];
/**
* The paths that should b | {
"filepath": "src/Illuminate/Support/ServiceProvider.php",
"language": "php",
"file_size": 17167,
"cut_index": 921,
"middle_length": 229
} |
lluminate\Contracts\Auth\Access\Gate as GateContract;
/**
* @method static bool has(\UnitEnum|array|string $ability)
* @method static \Illuminate\Auth\Access\Response allowIf(\Illuminate\Auth\Access\Response|\Closure|bool $condition, string|null $message = null, string|null $code = null)
* @method static \Illuminat... | olicy(string $class, string $policy)
* @method static \Illuminate\Auth\Access\Gate before(callable $callback)
* @method static \Illuminate\Auth\Access\Gate after(callable $callback)
* @method static bool allows(iterable|\UnitEnum|string $ability, mixed | efine(\UnitEnum|string $ability, callable|array|string $callback)
* @method static \Illuminate\Auth\Access\Gate resource(string $name, string $class, array|null $abilities = null)
* @method static \Illuminate\Auth\Access\Gate p | {
"filepath": "src/Illuminate/Support/Facades/Gate.php",
"language": "php",
"file_size": 2841,
"cut_index": 563,
"middle_length": 229
} |
* @method static bool hasForLocale(string $key, string|null $locale = null)
* @method static bool has(string $key, string|null $locale = null, bool $fallback = true)
* @method static string|array get(string $key, array $replace = [], string|null $locale = null, bool $fallback = true)
* @method static string choice(s... | ing $hint)
* @method static void addPath(string $path)
* @method static void addJsonPath(string $path)
* @method static array parseKey(string $key)
* @method static void determineLocalesUsing(callable $callback)
* @method static \Illuminate\Translatio | od static void load(string $namespace, string $group, string $locale)
* @method static \Illuminate\Translation\Translator handleMissingKeysUsing(callable|null $callback)
* @method static void addNamespace(string $namespace, str | {
"filepath": "src/Illuminate/Support/Facades/Lang.php",
"language": "php",
"file_size": 2172,
"cut_index": 563,
"middle_length": 229
} |
uminate\Support\Arr;
use Illuminate\Support\Testing\Fakes\ExceptionHandlerFake;
/**
* @method static void register()
* @method static \Illuminate\Foundation\Exceptions\ReportableHandler reportable(callable $reportUsing)
* @method static \Illuminate\Foundation\Exceptions\Handler renderable(callable $renderUsing)
* ... | atic \Illuminate\Foundation\Exceptions\Handler dontFlash(array|string $attributes)
* @method static \Illuminate\Foundation\Exceptions\Handler level(string $type, string $level)
* @method static void report(\Throwable $e)
* @method static bool isReportin | y|string $exceptions)
* @method static \Illuminate\Foundation\Exceptions\Handler dontReportWhen(callable $dontReportWhen)
* @method static \Illuminate\Foundation\Exceptions\Handler ignore(array|string $exceptions)
* @method st | {
"filepath": "src/Illuminate/Support/Facades/Exceptions.php",
"language": "php",
"file_size": 3654,
"cut_index": 614,
"middle_length": 229
} |
te\Support\Facades;
/**
* @method static \Illuminate\Pipeline\Pipeline send(mixed $passable)
* @method static \Illuminate\Pipeline\Pipeline through(mixed $pipes)
* @method static \Illuminate\Pipeline\Pipeline pipe(mixed $pipes)
* @method static \Illuminate\Pipeline\Pipeline via(string $method)
* @method static mi... | ipeline|mixed when(\Closure|mixed|null $value = null, callable|null $callback = null, callable|null $default = null)
* @method static \Illuminate\Pipeline\Pipeline|mixed unless(\Closure|mixed|null $value = null, callable|null $callback = null, callable|nu | withinTransaction(string|null|\UnitEnum|false $withinTransaction = null)
* @method static \Illuminate\Pipeline\Pipeline setContainer(\Illuminate\Contracts\Container\Container $container)
* @method static \Illuminate\Pipeline\P | {
"filepath": "src/Illuminate/Support/Facades/Pipeline.php",
"language": "php",
"file_size": 1659,
"cut_index": 537,
"middle_length": 229
} |
e\Support\Collection;
class DeferredCallbackCollection implements ArrayAccess, Countable
{
/**
* All of the deferred callbacks.
*
* @var array
*/
protected array $callbacks = [];
/**
* Get the first callback in the collection.
*
* @return callable
*/
public func... | tion invokeWhen(?Closure $when = null): void
{
$when ??= fn () => true;
$this->forgetDuplicates();
foreach ($this->callbacks as $index => $callback) {
if ($when($callback)) {
rescue($callback);
| {
$this->invokeWhen(fn () => true);
}
/**
* Invoke the deferred callbacks if the given truth test evaluates to true.
*
* @param \Closure|null $when
* @return void
*/
public func | {
"filepath": "src/Illuminate/Support/Defer/DeferredCallbackCollection.php",
"language": "php",
"file_size": 3335,
"cut_index": 614,
"middle_length": 229
} |
n manager.
*
* @var \Illuminate\Session\SessionManager
*/
protected $manager;
/**
* The callback that can resolve an instance of the cache factory.
*
* @var callable|null
*/
protected $cacheFactoryResolver;
/**
* Create a new session middleware.
*
* @p... | * @param \Closure $next
* @return mixed
*/
public function handle($request, Closure $next)
{
if (! $this->sessionConfigured()) {
return $next($request);
}
$session = $this->getSession($request);
| esolver = null)
{
$this->manager = $manager;
$this->cacheFactoryResolver = $cacheFactoryResolver;
}
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
| {
"filepath": "src/Illuminate/Session/Middleware/StartSession.php",
"language": "php",
"file_size": 9286,
"cut_index": 921,
"middle_length": 229
} |
ack, array $parameters = [])
* @method static \Illuminate\Console\Scheduling\Event command(\Symfony\Component\Console\Command\Command|string $command, array $parameters = [])
* @method static \Illuminate\Console\Scheduling\CallbackEvent job(object|string $job, \UnitEnum|string|null $queue = null, \UnitEnum|string|nul... | ate\Contracts\Foundation\Application $app)
* @method static \Illuminate\Console\Scheduling\Event[] events()
* @method static \Illuminate\Console\Scheduling\Event[] eventsForEnvironments(array $environments)
* @method static \Illuminate\Console\Schedulin | ng compileArrayInput(string|int $key, array $value)
* @method static bool serverShouldRun(\Illuminate\Console\Scheduling\Event $event, \DateTimeInterface $time)
* @method static \Illuminate\Support\Collection dueEvents(\Illumin | {
"filepath": "src/Illuminate/Support/Facades/Schedule.php",
"language": "php",
"file_size": 8334,
"cut_index": 716,
"middle_length": 229
} |
ic string|null blockDriver()
* @method static int defaultRouteBlockLockSeconds()
* @method static int defaultRouteBlockWaitSeconds()
* @method static array getSessionConfig()
* @method static string|null getDefaultDriver()
* @method static void setDefaultDriver(\UnitEnum|string $name)
* @method static mixed drive... | forgetDrivers()
* @method static bool start()
* @method static void save()
* @method static void ageFlashData()
* @method static array all()
* @method static array only(array $keys)
* @method static array except(array $keys)
* @method static bool ex | Illuminate\Contracts\Container\Container getContainer()
* @method static \Illuminate\Session\SessionManager setContainer(\Illuminate\Contracts\Container\Container $container)
* @method static \Illuminate\Session\SessionManager | {
"filepath": "src/Illuminate/Support/Facades/Session.php",
"language": "php",
"file_size": 4121,
"cut_index": 614,
"middle_length": 229
} |
ring current()
* @method static string previous(mixed $fallback = false)
* @method static string previousPath(mixed $fallback = false)
* @method static string to(string $path, mixed $extra = [], bool|null $secure = null)
* @method static string query(string $path, array $query = [], mixed $extra = [], bool|null $se... | mixed $parameters = [], \DateTimeInterface|\DateInterval|int|null $expiration = null, bool $absolute = true)
* @method static string temporarySignedRoute(\BackedEnum|string $name, \DateTimeInterface|\DateInterval|int $expiration, array $parameters = [], b | tring $path)
* @method static string assetFrom(string $root, string $path, bool|null $secure = null)
* @method static string formatScheme(bool|null $secure = null)
* @method static string signedRoute(\BackedEnum|string $name, | {
"filepath": "src/Illuminate/Support/Facades/URL.php",
"language": "php",
"file_size": 3980,
"cut_index": 614,
"middle_length": 229
} |
te\Support\Facades;
/**
* @method static \Illuminate\Validation\Validator make(array $data, array $rules, array $messages = [], array $attributes = [])
* @method static array validate(array $data, array $rules, array $messages = [], array $attributes = [])
* @method static void extend(string $rule, \Closure|string ... | idatedArrayKeys()
* @method static void resolver(\Closure $resolver)
* @method static \Illuminate\Contracts\Translation\Translator getTranslator()
* @method static \Illuminate\Validation\PresenceVerifierInterface getPresenceVerifier()
* @method static | ing $rule, \Closure|string $extension, string|null $message = null)
* @method static void replacer(string $rule, \Closure|string $replacer)
* @method static void includeUnvalidatedArrayKeys()
* @method static void excludeUnval | {
"filepath": "src/Illuminate/Support/Facades/Validator.php",
"language": "php",
"file_size": 1576,
"cut_index": 537,
"middle_length": 229
} |
* @method static array preloadedAssets()
* @method static string|null cspNonce()
* @method static string useCspNonce(string|null $nonce = null)
* @method static \Illuminate\Foundation\Vite useIntegrityKey(string|false $key)
* @method static \Illuminate\Foundation\Vite withEntryPoints(array $entryPoints)
* @method ... | ring $path)
* @method static \Illuminate\Foundation\Vite useScriptTagAttributes(callable|array $attributes)
* @method static \Illuminate\Foundation\Vite useStyleTagAttributes(callable|array $attributes)
* @method static \Illuminate\Foundation\Vite usePr | tion\Vite createAssetPathsUsing(callable|null $resolver)
* @method static string hotFile()
* @method static \Illuminate\Foundation\Vite useHotFile(string $path)
* @method static \Illuminate\Foundation\Vite useBuildDirectory(st | {
"filepath": "src/Illuminate/Support/Facades/Vite.php",
"language": "php",
"file_size": 2584,
"cut_index": 563,
"middle_length": 229
} |
ob types that should be dispatched instead of faked.
*
* @var array
*/
protected $jobsToDispatch = [];
/**
* The fake repository to track batched jobs.
*
* @var \Illuminate\Bus\BatchRepository
*/
protected $batchRepository;
/**
* The commands that have been disp... | tched.
*
* @var array
*/
protected $batches = [];
/**
* Indicates if commands should be serialized and restored when pushed to the Bus.
*
* @var bool
*/
protected bool $serializeAndRestore = false;
/**
| mandsSync = [];
/**
* The commands that have been dispatched after the response has been sent.
*
* @var array
*/
protected $commandsAfterResponse = [];
/**
* The batches that have been dispa | {
"filepath": "src/Illuminate/Support/Testing/Fakes/BusFake.php",
"language": "php",
"file_size": 27292,
"cut_index": 1331,
"middle_length": 229
} |
mixed $callback)
* @method static void exceptionOccurred(mixed $callback)
* @method static void looping(mixed $callback)
* @method static void failing(mixed $callback)
* @method static void starting(mixed $callback)
* @method static void stopping(mixed $callback)
* @method static void route(array|string $class, s... | d resume(string $connection, string $queue)
* @method static bool isPaused(string $connection, string $queue)
* @method static array getPausedQueues(string $connection, array $queues)
* @method static void withoutInterruptionPolling()
* @method static | nitEnum|string|null $name = null)
* @method static void pause(string $connection, string $queue)
* @method static void pauseFor(string $connection, string $queue, \DateTimeInterface|\DateInterval|int $ttl)
* @method static voi | {
"filepath": "src/Illuminate/Support/Facades/Queue.php",
"language": "php",
"file_size": 8193,
"cut_index": 716,
"middle_length": 229
} |
* @method static \Illuminate\Http\RedirectResponse back(int $status = 302, array $headers = [], mixed $fallback = false)
* @method static \Illuminate\Http\RedirectResponse refresh(int $status = 302, array $headers = [])
* @method static \Illuminate\Http\RedirectResponse guest(string $path, int $status = 302, array $h... | eaders = [])
* @method static \Illuminate\Http\RedirectResponse secure(string $path, int $status = 302, array $headers = [])
* @method static \Illuminate\Http\RedirectResponse route(\BackedEnum|string $route, mixed $parameters = [], int $status = 302, ar | method static \Illuminate\Http\RedirectResponse to(string $path, int $status = 302, array $headers = [], bool|null $secure = null)
* @method static \Illuminate\Http\RedirectResponse away(string $path, int $status = 302, array $h | {
"filepath": "src/Illuminate/Support/Facades/Redirect.php",
"language": "php",
"file_size": 2390,
"cut_index": 563,
"middle_length": 229
} |
\Support\Collection;
use Illuminate\Support\Traits\ForwardsCalls;
use Illuminate\Support\Traits\ReflectsClosures;
use Illuminate\Testing\Assert;
use PHPUnit\Framework\Assert as PHPUnit;
use PHPUnit\Framework\ExpectationFailedException;
use Throwable;
/**
* @mixin \Illuminate\Foundation\Exceptions\Handler
*/
class Ex... | dler fake.
*
* @param \Illuminate\Contracts\Debug\ExceptionHandler $handler
* @param list<class-string<\Throwable>> $exceptions
*/
public function __construct(
protected ExceptionHandler $handler,
protected array | e>
*/
protected $reported = [];
/**
* If the fake should throw exceptions when they are reported.
*
* @var bool
*/
protected $throwOnReport = false;
/**
* Create a new exception han | {
"filepath": "src/Illuminate/Support/Testing/Fakes/ExceptionHandlerFake.php",
"language": "php",
"file_size": 7123,
"cut_index": 716,
"middle_length": 229
} |
tring $uri, array|string|callable|null $action = null)
* @method static \Illuminate\Routing\Route put(string $uri, array|string|callable|null $action = null)
* @method static \Illuminate\Routing\Route patch(string $uri, array|string|callable|null $action = null)
* @method static \Illuminate\Routing\Route delete(stri... | ring $destination, int $status = 302)
* @method static \Illuminate\Routing\Route permanentRedirect(string $uri, string $destination)
* @method static \Illuminate\Routing\Route view(string $uri, string $view, array $data = [], int|array $status = 200, arr | uting\Route any(string $uri, array|string|callable|null $action = null)
* @method static \Illuminate\Routing\Route fallback(array|string|callable|null $action)
* @method static \Illuminate\Routing\Route redirect(string $uri, st | {
"filepath": "src/Illuminate/Support/Facades/Route.php",
"language": "php",
"file_size": 8587,
"cut_index": 716,
"middle_length": 229
} |
port\Traits\ForwardsCalls;
use Illuminate\Support\Traits\ReflectsClosures;
use PHPUnit\Framework\Assert as PHPUnit;
class MailFake implements Factory, Fake, Mailer, MailQueue
{
use ForwardsCalls, ReflectsClosures;
/**
* The mailer instance.
*
* @var MailManager
*/
public $manager;
... | *
* @param MailManager $manager
*/
public function __construct(MailManager $manager)
{
$this->manager = $manager;
$this->currentMailer = $manager->getDefaultDriver();
}
/**
* Assert if a mailable was sen | * @var array
*/
protected $mailables = [];
/**
* All of the mailables that have been queued.
*
* @var array
*/
protected $queuedMailables = [];
/**
* Create a new mail fake.
| {
"filepath": "src/Illuminate/Support/Testing/Fakes/MailFake.php",
"language": "php",
"file_size": 16588,
"cut_index": 921,
"middle_length": 229
} |
use Closure;
use Illuminate\Bus\PendingBatch;
use Illuminate\Support\Collection;
use Illuminate\Support\Traits\ReflectsClosures;
class PendingBatchFake extends PendingBatch
{
use ReflectsClosures;
/**
* The fake bus instance.
*
* @var \Illuminate\Support\Testing\Fakes\BusFake
*/
prote... | Batch
*/
public function dispatch()
{
return $this->bus->recordPendingBatch($this);
}
/**
* Dispatch the batch after the response is sent to the browser.
*
* @return \Illuminate\Bus\Batch
*/
public func | */
public function __construct(BusFake $bus, Collection $jobs)
{
$this->bus = $bus;
$this->jobs = $jobs->filter()->values();
}
/**
* Dispatch the batch.
*
* @return \Illuminate\Bus\ | {
"filepath": "src/Illuminate/Support/Testing/Fakes/PendingBatchFake.php",
"language": "php",
"file_size": 2202,
"cut_index": 563,
"middle_length": 229
} |
namespace Illuminate\Support\Testing\Fakes;
use Illuminate\Contracts\Mail\Mailable;
use Illuminate\Mail\PendingMail;
class PendingMailFake extends PendingMail
{
/**
* Create a new instance.
*
* @param \Illuminate\Support\Testing\Fakes\MailFake $mailer
*/
public function __construct($mai... | s\Mail\Mailable $mailable
* @return void
*/
public function sendNow(Mailable $mailable)
{
$this->mailer->sendNow($this->fill($mailable));
}
/**
* Push the given mailable onto the queue.
*
* @param \Illumi |
*/
public function send(Mailable $mailable)
{
$this->mailer->send($this->fill($mailable));
}
/**
* Send a new mailable message instance synchronously.
*
* @param \Illuminate\Contract | {
"filepath": "src/Illuminate/Support/Testing/Fakes/PendingMailFake.php",
"language": "php",
"file_size": 1193,
"cut_index": 518,
"middle_length": 229
} |
res;
/**
* The original queue manager.
*
* @var \Illuminate\Contracts\Queue\Queue
*/
public $queue;
/**
* The job types that should be intercepted instead of pushed to the queue.
*
* @var \Illuminate\Support\Collection
*/
protected $jobsToFake;
/**
* T... | * All of the unique jobs that were pushed.
*
* @var array
*/
private $uniqueJobs = [];
/**
* Indicates if items should be serialized and restored when pushed to the queue.
*
* @var bool
*/
protected bool | at have been pushed.
*
* @var array
*/
protected $jobs = [];
/**
* All of the payloads that have been raw pushed.
*
* @var list<RawPushType>
*/
protected $rawPushes = [];
/**
| {
"filepath": "src/Illuminate/Support/Testing/Fakes/QueueFake.php",
"language": "php",
"file_size": 22074,
"cut_index": 1331,
"middle_length": 229
} |
th)
* @method static void defaultTimePrecision(int|null $precision)
* @method static void defaultMorphKeyType(string $type)
* @method static void morphUsingUuids()
* @method static void morphUsingUlids()
* @method static bool createDatabase(string $name)
* @method static bool dropDatabaseIfExists(string $name)
*... | []|null $schema = null)
* @method static bool hasColumn(string $table, string $column)
* @method static bool hasColumns(string $table, array $columns)
* @method static void whenTableHasColumn(string $table, string $column, \Closure $callback)
* @method | null)
* @method static array getTableListing(string|string[]|null $schema = null, bool $schemaQualified = true)
* @method static array getViews(string|string[]|null $schema = null)
* @method static array getTypes(string|string | {
"filepath": "src/Illuminate/Support/Facades/Schema.php",
"language": "php",
"file_size": 4052,
"cut_index": 614,
"middle_length": 229
} |
@method static \Illuminate\Contracts\Filesystem\Filesystem build(string|array $config)
* @method static \Illuminate\Contracts\Filesystem\Filesystem createLocalDriver(array $config, string $name = 'local')
* @method static \Illuminate\Contracts\Filesystem\Filesystem createFtpDriver(array $config)
* @method static \Il... | aultCloudDriver()
* @method static \Illuminate\Filesystem\FilesystemManager forgetDisk(array|string $disk)
* @method static void purge(string|null $name = null)
* @method static \Illuminate\Filesystem\FilesystemManager extend(string $driver, \Closure $c | ntracts\Filesystem\Filesystem createScopedDriver(array $config)
* @method static \Illuminate\Filesystem\FilesystemManager set(string $name, mixed $disk)
* @method static string getDefaultDriver()
* @method static string getDef | {
"filepath": "src/Illuminate/Support/Facades/Storage.php",
"language": "php",
"file_size": 9322,
"cut_index": 921,
"middle_length": 229
} |
ch;
use Illuminate\Bus\UpdatedBatchJobCounts;
use Illuminate\Support\Carbon;
use Illuminate\Support\Collection;
use Throwable;
class BatchFake extends Batch
{
/**
* The jobs that have been added to the batch.
*
* @var array
*/
public $added = [];
/**
* Indicates if the batch has b... | rbonImmutable|null $cancelledAt
* @param \Carbon\CarbonImmutable|null $finishedAt
*/
public function __construct(
string $id,
string $name,
int $totalJobs,
int $pendingJobs,
int $failedJobs,
| ram int $totalJobs
* @param int $pendingJobs
* @param int $failedJobs
* @param array $failedJobIds
* @param array $options
* @param \Carbon\CarbonImmutable $createdAt
* @param \Carbon\Ca | {
"filepath": "src/Illuminate/Support/Testing/Fakes/BatchFake.php",
"language": "php",
"file_size": 3872,
"cut_index": 614,
"middle_length": 229
} |
\Assert as PHPUnit;
use ReflectionFunction;
class EventFake implements Dispatcher, Fake
{
use ForwardsCalls, ReflectsClosures;
/**
* The original event dispatcher.
*
* @var \Illuminate\Contracts\Events\Dispatcher
*/
public $dispatcher;
/**
* The event types that should be int... | nt fake instance.
*
* @param \Illuminate\Contracts\Events\Dispatcher $dispatcher
* @param array|string $eventsToFake
*/
public function __construct(Dispatcher $dispatcher, $eventsToFake = [])
{
$this->dispatcher = $d | * @var array
*/
protected $eventsToDispatch = [];
/**
* All of the events that have been intercepted keyed by type.
*
* @var array
*/
protected $events = [];
/**
* Create a new eve | {
"filepath": "src/Illuminate/Support/Testing/Fakes/EventFake.php",
"language": "php",
"file_size": 11972,
"cut_index": 921,
"middle_length": 229
} |
ers\DurationLimiterBuilder throttle(string $name)
* @method static mixed client()
* @method static void subscribe(array|string $channels, \Closure $callback)
* @method static void psubscribe(array|string $channels, \Closure $callback)
* @method static mixed command(string $method, array $parameters = [])
* @method... | r $events)
* @method static void unsetEventDispatcher()
* @method static bool hasHashTag(string $key)
* @method static void macro(string $name, object|callable $macro)
* @method static void mixin(object $mixin, bool $replace = true)
* @method static b | c \Illuminate\Redis\Connections\Connection setName(string $name)
* @method static \Illuminate\Contracts\Events\Dispatcher|null getEventDispatcher()
* @method static void setEventDispatcher(\Illuminate\Contracts\Events\Dispatche | {
"filepath": "src/Illuminate/Support/Facades/Redis.php",
"language": "php",
"file_size": 24317,
"cut_index": 1331,
"middle_length": 229
} |
lluminate\Contracts\Routing\ResponseFactory as ResponseFactoryContract;
/**
* @method static \Illuminate\Http\Response make(mixed $content = '', int $status = 200, array $headers = [])
* @method static \Illuminate\Http\Response noContent(int $status = 204, array $headers = [])
* @method static \Illuminate\Http\Resp... | amedResponse eventStream(\Closure $callback, array $headers = [], \Illuminate\Http\StreamedEvent|string|null $endStreamWith = '</stream>')
* @method static \Symfony\Component\HttpFoundation\StreamedResponse stream(callable|null $callback, int $status = 20 | = [], int $options = 0)
* @method static \Illuminate\Http\JsonResponse jsonp(string $callback, mixed $data = [], int $status = 200, array $headers = [], int $options = 0)
* @method static \Symfony\Component\HttpFoundation\Stre | {
"filepath": "src/Illuminate/Support/Facades/Response.php",
"language": "php",
"file_size": 3014,
"cut_index": 563,
"middle_length": 229
} |
pace Illuminate\Support\Testing\Fakes;
use Closure;
use Illuminate\Foundation\Bus\PendingChain;
use Illuminate\Queue\CallQueuedClosure;
class PendingChainFake extends PendingChain
{
/**
* The fake bus instance.
*
* @var \Illuminate\Support\Testing\Fakes\BusFake
*/
protected $bus;
/**
... | minate\Foundation\Bus\PendingDispatch
*/
public function dispatch()
{
if (is_string($this->job)) {
$firstJob = new $this->job(...func_get_args());
} elseif ($this->job instanceof Closure) {
$firstJob = C | ction __construct(BusFake $bus, $job, $chain)
{
$this->bus = $bus;
$this->job = $job;
$this->chain = $chain;
}
/**
* Dispatch the job with the given arguments.
*
* @return \Illu | {
"filepath": "src/Illuminate/Support/Testing/Fakes/PendingChainFake.php",
"language": "php",
"file_size": 1414,
"cut_index": 524,
"middle_length": 229
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.