{"prefix": "l\\StrlenZeroToIdenticalEmptyStringRector;\nuse Rector\\CodingStyle\\Rector\\ArrowFunction\\ArrowFunctionDelegatingCallToFirstClassCallableRector;\nuse Rector\\CodingStyle\\Rector\\Closure\\ClosureDelegatingCallToFirstClassCallableRector;\nuse Rector\\CodingStyle\\Rector\\FuncCall\\ClosureFromCallableToFirstClassCallableRector;\nuse Rector\\CodingStyle\\Rector\\FuncCall\\CountArrayToEmptyArrayComparisonRector;\nuse Rector\\CodingStyle\\Rector\\FuncCall\\FunctionFirstClassCallableRector;\nuse Rector\\Config\\RectorConfig;\nuse Rector\\Php", "suffix": "ctor\\Php70\\Rector\\MethodCall\\ThisCallOnStaticMethodToStaticCallRector;\nuse Rector\\Php70\\Rector\\StaticCall\\StaticCallOnNonStaticToInstanceCallRector;\nuse Rector\\Php70\\Rector\\Ternary\\TernaryToNullCoalescingRector;\nuse Rector\\Php71\\Rector\\BinaryOp\\BinaryOpBet", "middle": "55\\Rector\\Class_\\ClassConstantToSelfClassRector;\nuse Rector\\Php55\\Rector\\String_\\StringClassNameToClassConstantRector;\nuse Rector\\Php56\\Rector\\FuncCall\\PowToExpRector;\nuse Rector\\Php70\\Rector\\FuncCall\\RandomFunctionRector;\nuse Re", "meta": {"filepath": "rector.php", "language": "php", "file_size": 7355, "cut_index": 716, "middle_length": 229}} {"prefix": "Builder;\nuse Illuminate\\Database\\Query\\Builder;\n\nuse function PHPStan\\Testing\\assertType;\n\n/** @param \\Illuminate\\Database\\Eloquent\\Builder<\\User> $userQuery */\nfunction test(Builder $query, EloquentBuilder $userQuery): void\n{\n assertType('stdClass|null', $query->first());\n assertType('stdClass|null', $query->find(1));\n assertType('42|stdClass', $query->findOr(1, fn () => 42));\n assertType('42|stdClass', $query->findOr(1, callback: fn () => 42));\n assertType('Illuminate\\Database\\Query\\Builder", "suffix": "sertType('Illuminate\\Database\\Query\\Builder', $query->joinSub($userQuery, 'alias', 'foo'));\n assertType('Illuminate\\Database\\Query\\Builder', $query->joinLateral($userQuery, 'alias'));\n assertType('Illuminate\\Database\\Query\\Builder', $query->leftJoinL", "middle": "', $query->selectSub($userQuery, 'alias'));\n assertType('Illuminate\\Database\\Query\\Builder', $query->fromSub($userQuery, 'alias'));\n assertType('Illuminate\\Database\\Query\\Builder', $query->from($userQuery, 'alias'));\n as", "meta": {"filepath": "types/Database/Query/Builder.php", "language": "php", "file_size": 3689, "cut_index": 614, "middle_length": 229}} {"prefix": " Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Database\\Eloquent\\HasCollection;\nuse Illuminate\\Database\\Eloquent\\Model;\nuse Illuminate\\Support\\Carbon;\nuse User;\n\nuse function PHPStan\\Testing\\assertType;\n\nfunction test(User $user, Post $post, Comment $comment, Article $article): void\n{\n assertType('UserFactory', User::factory(function ($attributes, $model) {\n assertType('array', $attributes);\n assertType('User|null', $model);\n\n return ['string' => 'string'];\n ", "suffix": " }));\n\n User::addGlobalScope('ancient', function ($builder) {\n assertType('Illuminate\\Database\\Eloquent\\Builder', $builder);\n\n $builder->where('created_at', '<', Carbon::now()->subYears(2000));\n });\n\n assertType('Illuminate\\Da", "middle": " }));\n assertType('UserFactory', User::factory(42, function ($attributes, $model) {\n assertType('array', $attributes);\n assertType('User|null', $model);\n\n return ['string' => 'string'];\n ", "meta": {"filepath": "types/Database/Eloquent/Model.php", "language": "php", "file_size": 3460, "cut_index": 614, "middle_length": 229}} {"prefix": "an\\Testing\\assertType;\n\nassertType(\n 'Illuminate\\Contracts\\Database\\Eloquent\\CastsAttributes, iterable>',\n \\Illuminate\\Database\\Eloquent\\Casts\\AsArrayObject::castUsing([]),\n);\n\nassertType(\n 'Illuminate\\Contracts\\Database\\Eloquent\\CastsAttributes, iterable>',\n \\Illuminate\\Database\\Eloquent\\Casts\\AsCollection::castUsing([]),\n);\n\nassertType(\n 'Illuminate\\Contracts\\Database\\Eloqu", "suffix": "e\\Eloquent\\CastsAttributes, iterable>',\n \\Illuminate\\Database\\Eloquent\\Casts\\AsEncryptedCollection::castUsing([]),\n);\n\nassertType(\n 'Illuminate\\Contracts\\Database\\Eloquent\\CastsAttributes, iterable>',\n \\Illuminate\\Database\\Eloquent\\Casts\\AsEncryptedArrayObject::castUsing([]),\n);\n\nassertType(\n 'Illuminate\\Contracts\\Databas", "meta": {"filepath": "types/Database/Eloquent/Casts/Castable.php", "language": "php", "file_size": 1637, "cut_index": 537, "middle_length": 229}} {"prefix": "php\n\nuse Illuminate\\Contracts\\Cache\\Repository;\nuse Illuminate\\Support\\Carbon;\n\nuse function PHPStan\\Testing\\assertType;\n\n/** @var Repository $cache */\n$cache = resolve(Repository::class);\n\nassertType('mixed', $cache->get('key'));\nassertType('mixed', $cache->get('cache', 27));\nassertType('mixed', $cache->get('cache', function (): int {\n return 26;\n}));\n\nassertType('mixed', $cache->pull('key'));\nassertType('28', $cache->pull('cache', 28));\nassertType('30', $cache->pull('cache', function (): int {\n retu", "suffix": "sertType('33', $cache->sear('cache', function (): int {\n return 33;\n}));\nassertType('36', $cache->remember('cache', Carbon::now(), function (): int {\n return 36;\n}));\nassertType('36', $cache->rememberForever('cache', function (): int {\n return 36;", "middle": "rn 30;\n}));\nas", "meta": {"filepath": "types/Contracts/Cache/Repository.php", "language": "php", "file_size": 790, "cut_index": 514, "middle_length": 14}} {"prefix": "rt\\LazyCollection', LazyCollection::make($iterable));\nassertType('Illuminate\\Support\\LazyCollection', LazyCollection::make($traversable));\nassertType('Illuminate\\Support\\LazyCollection', LazyCollection::make($generator));\n\nassertType('Illuminate\\Support\\LazyCollection', $collection::times(10, function ($int) {\n // assertType('int', $int);\n\n return new User;\n}));\n\nassertType('Illuminate\\Support\\LazyCollection', $collection::times(10, function () {", "suffix": "n::range(1, 100));\n\nassertType('Illuminate\\Support\\LazyCollection<(int|string), string>', $collection::wrap('string'));\nassertType('Illuminate\\Support\\LazyCollection<(int|string), User>', $collection::wrap(new User));\n\nassertType('Illuminate\\Support\\LazyCo", "middle": "\n return new User;\n}));\n\nassertType('Illuminate\\Support\\LazyCollection', $collection->each(function ($user) {\n assertType('User', $user);\n}));\n\nassertType('Illuminate\\Support\\LazyCollection', $collectio", "meta": {"filepath": "types/Support/LazyCollection.php", "language": "php", "file_size": 44704, "cut_index": 2151, "middle_length": 229}} {"prefix": "leware = new Middleware();\n\n$middleware->convertEmptyStringsToNull(except: [\n fn (Request $request): bool => $request->has('skip-all-1'),\n fn (Request $request): bool => $request->has('skip-all-2'),\n]);\n\n$middleware->trimStrings(except: [\n 'aaa',\n fn (Request $request): bool => $request->has('skip-all'),\n]);\n\n$middleware->trustProxies(at: '*');\n$middleware->trustProxies(at: [\n '192.168.1.1',\n '192.168.1.2',\n]);\n\n$middleware->trustProxies(at: '*', headers: Request::HEADER_X_FORWARDED_AWS_EL", "suffix": "DER_X_FORWARDED_AWS_ELB);\n\n$middleware->trustHosts();\n$middleware->trustHosts(at: ['laravel.test']);\n$middleware->trustHosts(at: ['laravel.test'], subdomains: false);\n\n$middleware->encryptCookies();\n$middleware->encryptCookies([\n 'cookie1',\n 'cookie2", "middle": "B);\n\n$middleware->trustProxies(headers: Request::HEA", "meta": {"filepath": "types/Foundation/Configuration/Middleware.php", "language": "php", "file_size": 921, "cut_index": 606, "middle_length": 52}} {"prefix": "gin a fluent query against a database table.\n *\n * @param \\Closure|\\Illuminate\\Database\\Query\\Builder|\\UnitEnum|string $table\n * @param string|null $as\n * @return \\Illuminate\\Database\\Query\\Builder\n */\n public function table($table, $as = null);\n\n /**\n * Get a new raw query expression.\n *\n * @param literal-string|int|float $value\n * @return \\Illuminate\\Contracts\\Database\\Query\\Expression\n */\n public function raw($value);\n\n /**\n * Run a select sta", "suffix": "do = true);\n\n /**\n * Run a select statement and return the first column of the first row.\n *\n * @param string $query\n * @param array $bindings\n * @param bool $useReadPdo\n * @return mixed\n *\n * @throws \\Illuminate\\Da", "middle": "tement and return a single result.\n *\n * @param string $query\n * @param array $bindings\n * @param bool $useReadPdo\n * @return mixed\n */\n public function selectOne($query, $bindings = [], $useReadP", "meta": {"filepath": "src/Illuminate/Database/ConnectionInterface.php", "language": "php", "file_size": 4417, "cut_index": 614, "middle_length": 229}} {"prefix": "implements LostConnectionDetectorContract\n{\n /**\n * Determine if the given exception was caused by a lost connection.\n *\n * @param \\Throwable $e\n * @return bool\n */\n public function causedByLostConnection(Throwable $e): bool\n {\n $message = $e->getMessage();\n\n return Str::contains($message, [\n 'server has gone away',\n 'Server has gone away',\n 'no connection to the server',\n 'Lost connection',\n 'is dead or not ", "suffix": "r writing data to the connection',\n 'Resource deadlock avoided',\n 'Transaction() on null',\n 'child connection forced to terminate due to client_idle_limit',\n 'query_wait_timeout',\n 'reset by peer',\n ", "middle": "enabled',\n 'Error while sending',\n 'decryption failed or bad record mac',\n 'server closed the connection unexpectedly',\n 'SSL connection has been closed unexpectedly',\n 'Erro", "meta": {"filepath": "src/Illuminate/Database/LostConnectionDetector.php", "language": "php", "file_size": 5425, "cut_index": 716, "middle_length": 229}} {"prefix": "iqueConstraintViolationException extends QueryException\n{\n /**\n * The unique index which prevented the query.\n *\n * @var string|null\n */\n public ?string $index = null;\n\n /**\n * The columns which caused the violation.\n *\n * @var list\n */\n public array $columns = [];\n\n /**\n * Set the unique index which caused the violation.\n *\n * @param string|null $index\n * @return $this\n */\n public function setIndex(?string $index): self\n {\n ", "suffix": "\n }\n\n /**\n * Set the columns that caused the violation.\n *\n * @param list $columns\n * @return $this\n */\n public function setColumns(array $columns): self\n {\n $this->columns = $columns;\n\n return $this;", "middle": " $this->index = $index;\n\n return $this;", "meta": {"filepath": "src/Illuminate/Database/UniqueConstraintViolationException.php", "language": "php", "file_size": 876, "cut_index": 559, "middle_length": 52}} {"prefix": "nsole\\ConfirmableTrait;\nuse Illuminate\\Console\\Prohibitable;\nuse Illuminate\\Database\\ConnectionResolverInterface as Resolver;\nuse Illuminate\\Database\\Eloquent\\Model;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\nuse Symfony\\Component\\Console\\Input\\InputArgument;\nuse Symfony\\Component\\Console\\Input\\InputOption;\n\n#[AsCommand(name: 'db:seed')]\nclass SeedCommand extends Command\n{\n use ConfirmableTrait, Prohibitable;\n\n /**\n * The console command name.\n *\n * @var string\n */\n protecte", "suffix": "* @var \\Illuminate\\Database\\ConnectionResolverInterface\n */\n protected $resolver;\n\n /**\n * Create a new database seed command instance.\n *\n * @param \\Illuminate\\Database\\ConnectionResolverInterface $resolver\n */\n public funct", "middle": "d $name = 'db:seed';\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected $description = 'Seed the database with records';\n\n /**\n * The connection resolver instance.\n *\n ", "meta": {"filepath": "src/Illuminate/Database/Console/Seeds/SeedCommand.php", "language": "php", "file_size": 3554, "cut_index": 614, "middle_length": 229}} {"prefix": "\nuse Illuminate\\Support\\Collection;\nuse Illuminate\\Support\\Stringable;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\nuse Symfony\\Component\\Console\\Input\\InputOption;\n\n#[AsCommand(name: 'migrate:status')]\nclass StatusCommand extends BaseCommand\n{\n /**\n * The console command name.\n *\n * @var string\n */\n protected $name = 'migrate:status';\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected $description = 'Show the status of each migration", "suffix": "inate\\Database\\Migrations\\Migrator $migrator\n */\n public function __construct(Migrator $migrator)\n {\n parent::__construct();\n\n $this->migrator = $migrator;\n }\n\n /**\n * Execute the console command.\n *\n * @return in", "middle": "';\n\n /**\n * The migrator instance.\n *\n * @var \\Illuminate\\Database\\Migrations\\Migrator\n */\n protected $migrator;\n\n /**\n * Create a new migration rollback command instance.\n *\n * @param \\Illum", "meta": {"filepath": "src/Illuminate/Database/Console/Migrations/StatusCommand.php", "language": "php", "file_size": 4388, "cut_index": 614, "middle_length": 229}} {"prefix": "?php\n\nuse Illuminate\\Database\\Eloquent\\Factories\\Factory;\nuse Illuminate\\Database\\Eloquent\\Factories\\HasFactory;\nuse Illuminate\\Database\\Eloquent\\MassPrunable;\nuse Illuminate\\Database\\Eloquent\\Model;\nuse Illuminate\\Database\\Eloquent\\SoftDeletes;\nuse Illuminate\\Foundation\\Auth\\User as Authenticatable;\nuse Illuminate\\Notifications\\HasDatabaseNotifications;\n\nclass User extends Authenticatable\n{\n use HasDatabaseNotifications;\n /** @use HasFactory */\n use HasFactory;\n use MassPrunable;\n ", "suffix": "ctory = UserFactory::class;\n}\n\n/** @extends Factory */\nclass UserFactory extends Factory\n{\n protected $model = User::class;\n\n public function definition(): array\n {\n return [];\n }\n}\n\nclass Post extends Model\n{\n}\n\nenum UserType\n{\n}\n", "middle": " use SoftDeletes;\n\n protected static string $fa", "meta": {"filepath": "types/Autoload.php", "language": "php", "file_size": 821, "cut_index": 513, "middle_length": 52}} {"prefix": "ate\\Types\\Builder\\User>', $query->orWhere('name', 'John'));\n assertType('Illuminate\\Database\\Eloquent\\Builder', $query->whereNot('status', 'active'));\n assertType('Illuminate\\Database\\Eloquent\\Builder', $query->with('relation'));\n assertType('Illuminate\\Database\\Eloquent\\Builder', $query->with(['relation' => ['foo' => fn ($q) => $q]]));\n assertType('Illuminate\\Database\\Eloquent\\Builder', $query->without('relation'));\n assertType('Illuminate\\Database\\Eloquent\\Builder', $query->withOnly(['relation']));\n assertType('Illuminate\\Database\\Eloquent\\Builder', $q", "middle": "uilder\\User>', $query->with(['relation' => function ($query) {\n // assertType('Illuminate\\Database\\Eloquent\\Relations\\Relation<*,*,*>', $query);\n }]));\n assertType('Illuminate\\Database\\Eloquent\\Builder', $collection->load('string'));\nassertType('Illuminate\\Database\\Eloquent\\Collection', $collection->load(['string']));\nassertType('Illuminate\\Database\\Eloquent\\Collection', $collection->load(['string' => ['foo' => fn ($q) => $q]]));\nassertType('Illuminate\\Database\\Eloquent\\Collection', $collection->load(['string' => function ($query) {\n // assertType('Illuminate\\Database\\Eloquent\\Relations\\Relation<*,*,*>', $query);\n}]));\n\nassertType('Illuminate\\Database\\Eloquent\\", "suffix": "\\Collection', $collection->loadAggregate(['string' => ['foo' => fn ($q) => $q]], 'string'));\nassertType('Illuminate\\Database\\Eloquent\\Collection', $collection->loadAggregate(['string'], 'string', 'string'));\nassertType('Illuminate\\Dat", "middle": "Collection', $collection->loadAggregate('string', 'string'));\nassertType('Illuminate\\Database\\Eloquent\\Collection', $collection->loadAggregate(['string'], 'string'));\nassertType('Illuminate\\Database\\Eloquent", "meta": {"filepath": "types/Database/Eloquent/Collection.php", "language": "php", "file_size": 11306, "cut_index": 921, "middle_length": 229}} {"prefix": "\n */\nclass UserScope implements Scope\n{\n public function apply(Builder $builder, Model $model): void\n {\n assertType('Illuminate\\Database\\Eloquent\\Builder', $builder);\n assertType('Illuminate\\Types\\Scope\\User', $model", "suffix": "nate\\Database\\Eloquent\\Model>', $builder);\n assertType('Illuminate\\Database\\Eloquent\\Model', $model);\n }\n}\n\nclass User extends Model\n{\n}\n\n$user = new User();\n$query = User::query();\n(new UserScope())->apply($query, $user);\n(new GenericScope())->a", "middle": ");\n }\n}\n\n/**\n * @implements Scope\n */\nclass GenericScope implements Scope\n{\n public function apply(Builder $builder, Model $model): void\n {\n assertType('Illuminate\\Database\\Eloquent\\Builder', $user->address());\n assertType('Illuminate\\Types\\Relations\\Address|null', $user->address()->getResults());\n assertType('Illuminate\\Database\\Eloquent\\Collection', $user->address()->get());\n assertType('Illuminate\\Types\\Relations\\Address', $user->address()->make());\n assertType('Illumi", "suffix": "ype('Illuminate\\Types\\Relations\\Address', $child->address()->make());\n assertType('Illuminate\\Types\\Relations\\Address', $child->address()->create([]));\n assertType('Illuminate\\Types\\Relations\\Address', $child->address()->getRelated());\n assertType", "middle": "nate\\Types\\Relations\\Address', $user->address()->create());\n assertType('Illuminate\\Database\\Eloquent\\Relations\\HasOne', $child->address());\n assertT", "meta": {"filepath": "types/Database/Eloquent/Relations.php", "language": "php", "file_size": 23136, "cut_index": 1331, "middle_length": 229}} {"prefix": "\n{\n protected $model = User::class;\n\n /** @return array */\n public function definition(): array\n {\n return [];\n }\n}\n\n/** @extends Illuminate\\Database\\Eloquent\\Factories\\Factory */\nclass PostFactory extends Factory\n{\n protected $model = Post::class;\n\n /** @return array */\n public function definition(): array\n {\n return [];\n }\n}\n\nassertType('UserFactory', $factory = UserFactory::new());\nassertType('UserFactory', UserFactory::new([", "suffix": "ry->definition());\n\nassertType('UserFactory', $factory::times(10));\n\nassertType('UserFactory', $factory->configure());\n\nassertType('array', $factory->raw());\nassertType('array', $factory->raw(['string' => 'string']));\n", "middle": "'string' => 'string']));\nassertType('UserFactory', UserFactory::new(function ($attributes) {\n assertType('array', $attributes);\n\n return ['string' => 'string'];\n}));\n\nassertType('array', $facto", "meta": {"filepath": "types/Database/Eloquent/Factories/Factory.php", "language": "php", "file_size": 7151, "cut_index": 716, "middle_length": 229}} {"prefix": "hp\n\nuse Illuminate\\Config\\Repository;\nuse Illuminate\\Container\\Container;\n\nuse function PHPStan\\Testing\\assertType;\n\n$container = resolve(Container::class);\n\nassertType('stdClass', $container->instance('foo', new stdClass));\n\nassertType('mixed', $container->get('foo'));\nassertType('Illuminate\\Config\\Repository', $container->get(Repository::class));\n\nassertType('Closure(): mixed', $container->factory('foo'));\nassertType('Closure(): Illuminate\\Config\\Repository', $container->factory(Repository::class));\n\nasse", "suffix": "makeWith(Repository::class));\n\nassertType('Illuminate\\Config\\Repository', $container->build(Repository::class));\nassertType('Illuminate\\Config\\Repository', $container->build(function (Container $container, array $parameters) {\n return new Repository($pa", "middle": "rtType('mixed', $container->make('foo'));\nassertType('Illuminate\\Config\\Repository', $container->make(Repository::class));\n\nassertType('mixed', $container->makeWith('foo'));\nassertType('Illuminate\\Config\\Repository', $container->", "meta": {"filepath": "types/Container/Container.php", "language": "php", "file_size": 1103, "cut_index": 515, "middle_length": 229}} {"prefix": "$array = [new User];\n/** @var iterable $iterable */\n$iterable = [];\n/** @var Traversable $traversable */\n$traversable = new ArrayIterator([new User]);\n\nassertType('User|null', Arr::first($array));\nassertType('User|null', Arr::first($array, function ($user) {\n assertType('User', $user);\n\n return true;\n}));\nassertType(\"'string'|User\", Arr::first($array, function ($user) {\n assertType('User', $user);\n\n return false;\n}, 'string'));\nassertType(\"'string'|User\", Arr::first($array,", "suffix": "tring'|User\", Arr::first($iterable, function ($user) {\n assertType('User', $user);\n\n return false;\n}, 'string'));\nassertType(\"'string'|User\", Arr::first($iterable, null, function () {\n return 'string';\n}));\n\nassertType('User|null', Arr::first($tra", "middle": " null, function () {\n return 'string';\n}));\n\nassertType('User|null', Arr::first($iterable));\nassertType('User|null', Arr::first($iterable, function ($user) {\n assertType('User', $user);\n\n return true;\n}));\nassertType(\"'s", "meta": {"filepath": "types/Support/Arr.php", "language": "php", "file_size": 6501, "cut_index": 716, "middle_length": 229}} {"prefix": ">', $collection::make($collection));\nassertType('Illuminate\\Support\\Collection', $collection::make($collection));\nassertType('Illuminate\\Support\\Collection', $collection::make($iterable));\nassertType('Illuminate\\Support\\Collection', $collection::make($traversable));\n\nassertType('Illuminate\\Support\\Collection', $collection::times(10, function ($int) {\n // assertType('int', $int);\n\n return new User;\n}));\n\nassertType('Illuminate\\Support\\Collection',", "suffix": "ection', $collection::range(1, 100));\n\nassertType('Illuminate\\Support\\Collection<(int|string), string>', $collection::wrap('string'));\nassertType('Illuminate\\Support\\Collection<(int|string), User>', $collection::wrap(new User));\n\nassertType('Illu", "middle": " $collection::times(10, function () {\n return new User;\n}));\n\nassertType('Illuminate\\Support\\Collection', $collection->each(function ($user) {\n assertType('User', $user);\n}));\n\nassertType('Illuminate\\Support\\Coll", "meta": {"filepath": "types/Support/Collection.php", "language": "php", "file_size": 50339, "cut_index": 2151, "middle_length": 229}} {"prefix": "hp\n\nuse Illuminate\\Support\\Fluent;\n\nuse function PHPStan\\Testing\\assertType;\n\n$fluent = new Fluent(['name' => 'Taylor', 'age' => 25, 'user' => new User]);\n\nassertType(\"Illuminate\\Support\\Fluent\", $fluent);\nassertType('Illuminate\\Support\\Fluent', new Fluent(['name' => 'Taylor']));\nassertType('Illuminate\\Support\\Fluent', new Fluent(['age' => 25]));\nassertType('Illuminate\\Support\\Fluent', new Fluent(['user' => new User]));\n\nassertType(\"25|'Ta", "suffix": "|null\", $fluent->get('foobar'));\nassertType(\"25|'Taylor'|'zonda'|User\", $fluent->get('foobar', 'zonda'));\nassertType(\"array\", $fluent->getAttributes());\nassertType(\"array\", $fluent->toArray());\nassertType", "middle": "ylor'|User|null\", $fluent['name']);\nassertType(\"25|'Taylor'|User|null\", $fluent['age']);\nassertType(\"25|'Taylor'|User|null\", $fluent['age']);\nassertType(\"25|'Taylor'|User|null\", $fluent->get('name'));\nassertType(\"25|'Taylor'|User", "meta": {"filepath": "types/Support/Fluent.php", "language": "php", "file_size": 1063, "cut_index": 515, "middle_length": 229}} {"prefix": "led($value)) {\n assertType('bool|float|int|non-empty-string', $value);\n} else {\n assertType('string|null', $value);\n}\n\nif (blank($value)) {\n assertType('string|null', $value);\n} else {\n assertType('bool|float|int|non-empty-string', $value);\n}\n\nassertType('User', object_get(new User(), null));\nassertType('User', object_get(new User(), ''));\nassertType('mixed', object_get(new User(), 'name'));\n\nassertType('1', once(fn () => 1));\nassertType('null', once(function () { /** @phpstan-ignore function.vo", "suffix": "\n}));\n\nassertType('1', retry(5, fn () => 1));\n\nassertType('object', str());\nassertType('Illuminate\\Support\\Stringable', str('foo'));\n\nassertType('User', tap(new User(), function ($user) {\n assertType('User', $user);\n}));\nassertType('Illuminate\\Support\\H", "middle": "id (testing void) */\n}));\n\nassertType('Illuminate\\Support\\Optional', optional());\nassertType('null', optional(null, fn () => 1));\nassertType('1', optional('foo', function ($value) {\n assertType(\"'foo'\", $value);\n\n return 1;", "meta": {"filepath": "types/Support/Helpers.php", "language": "php", "file_size": 3537, "cut_index": 614, "middle_length": 229}} {"prefix": " * @var mixed $ulid\n * @var mixed $url\n * @var mixed $uuid\n * @var string $strStartsWith\n */\nif (Str::isJson($json)) {\n assertType('non-empty-string', $json);\n} else {\n assertType('mixed', $json);\n}\n\nif (Str::isUlid($ulid)) {\n assertType('non-empty-string', $ulid);\n} else {\n assertType('mixed', $ulid);\n}\n\nif (Str::isUrl($url)) {\n assertType('non-empty-string', $url);\n} else {\n assertType('mixed', $url);\n}\n\nif (Str::isUuid($uuid)) {\n assertType('non-empty-string', $uuid);\n} else {\n as", "suffix": " assertType('string', $strStartsWith);\n} else {\n assertType('non-empty-string', $strStartsWith);\n}\n\n/**\n * @var string $search\n * @var string $replace\n * @var string $subject\n */\nassertType('string', Str::replace($search, $replace, $subject));\nassertTyp", "middle": "sertType('mixed', $uuid);\n}\n\nif (Str::startsWith($strStartsWith, '')) {\n assertType('non-empty-string', $strStartsWith);\n} else {\n assertType('string', $strStartsWith);\n}\n\nif (Str::doesntStartWith($strStartsWith, '')) {\n ", "meta": {"filepath": "types/Support/Str.php", "language": "php", "file_size": 4520, "cut_index": 614, "middle_length": 229}} {"prefix": "\nuse function PHPStan\\Testing\\assertType;\n\nassertType(\"'foo'\", value('foo', 42));\nassertType('42', value(fn () => 42));\nassertType('42', value(function ($foo) {\n assertType('true', $foo);\n\n return 42;\n}, true));\n\nassertType(\"'foo'\", when(true, 'foo'));\nassertType(\"'foo'\", when(true, 'foo', 42));\nassertType('null', when(false, 'foo'));\nassertType('42', when(false, 'foo', 42));\nassertType(\"'foo'\", when(true, fn () => 'foo'));\nassertType(\"'foo'\", when(true, fn () => 'foo', fn () => 42));\nassertType('null", "suffix": "en(-42, 'foo'));\nassertType('null', when(null, 'foo'));\nassertType('42', when(['foo'], 42));\nassertType('null', when([], 42));\nassertType('42|null', when(random_int(0, 1), 42));\nassertType('42|1337', when(random_int(0, 1), 42, 1337));\nassertType(\"array{'ba", "middle": "', when(false, fn () => 'foo'));\nassertType('42', when(false, fn () => 'foo', fn () => 42));\nassertType(\"'foo'\", when(1, 'foo', 42));\nassertType(\"'foo'\", when(42, 'foo'));\nassertType('null', when(0, 'foo'));\nassertType('null', wh", "meta": {"filepath": "types/Collections/helpers.php", "language": "php", "file_size": 1191, "cut_index": 518, "middle_length": 229}} {"prefix": "instance('foo', new stdClass));\n\nassertType('mixed', $app->get('foo'));\nassertType('Illuminate\\Config\\Repository', $app->get(Repository::class));\n\nassertType('Closure(): mixed', $app->factory('foo'));\nassertType('Closure(): Illuminate\\Config\\Repository', $app->factory(Repository::class));\n\nassertType('mixed', $app->make('", "suffix": "e\\Config\\Repository', $app->build(Repository::class));\nassertType('Illuminate\\Config\\Repository', $app->build(function (Application $app, array $parameters) {\n return new Repository($parameters);\n}));\nassertType('stdClass', $app->build(function () {\n ", "middle": "foo'));\nassertType('Illuminate\\Config\\Repository', $app->make(Repository::class));\n\nassertType('mixed', $app->makeWith('foo'));\nassertType('Illuminate\\Config\\Repository', $app->makeWith(Repository::class));\n\nassertType('Illuminat", "meta": {"filepath": "types/Foundation/Application.php", "language": "php", "file_size": 1026, "cut_index": 512, "middle_length": 229}} {"prefix": "esponse;\nuse Illuminate\\Http\\Response;\nuse Illuminate\\Testing\\TestResponse;\nuse Symfony\\Component\\HttpFoundation\\BinaryFileResponse;\nuse Symfony\\Component\\HttpFoundation\\StreamedResponse;\n\nuse function PHPStan\\Testing\\assertType;\n\n$response = TestResponse::fromBaseResponse(response('Laravel', 200));\nassertType(Response::class, $response->baseResponse);\n\n$response = TestResponse::fromBaseResponse(response()->redirectTo(''));\nassertType(RedirectResponse::class, $response->baseResponse);\n\n$response = TestRespo", "suffix": "ertType(BinaryFileResponse::class, $response->baseResponse);\n\n$response = TestResponse::fromBaseResponse(response()->json());\nassertType(JsonResponse::class, $response->baseResponse);\n\n$response = TestResponse::fromBaseResponse(response()->streamDownload(f", "middle": "nse::fromBaseResponse(response()->download(''));\nass", "meta": {"filepath": "types/Testing/TestResponse.php", "language": "php", "file_size": 965, "cut_index": 582, "middle_length": 52}} {"prefix": "ion PHPStan\\Testing\\assertType;\n\nassertType('Illuminate\\Foundation\\Application', app());\nassertType('mixed', app('foo'));\nassertType('Illuminate\\Config\\Repository', app(Repository::class));\n\nassertType('Illuminate\\Contracts\\Auth\\Factory', auth());\nassertType('Illuminate\\Contracts\\Auth\\Guard', auth('foo'));\n\nassertType('Illuminate\\Cache\\CacheManager', cache());\nassertType('bool', cache(['foo' => 'bar'], 42));\nassertType('mixed', cache('foo', 42));\n\nassertType('Illuminate\\Config\\Repository', config());\nassert", "suffix": "d', context('foo'));\n\nassertType('Illuminate\\Cookie\\CookieJar', cookie());\nassertType('Symfony\\Component\\HttpFoundation\\Cookie', cookie('foo'));\n\nassertType('Illuminate\\Foundation\\Bus\\PendingDispatch', dispatch('foo'));\nassertType('Illuminate\\Foundation\\Bu", "middle": "Type('null', config(['foo' => 'bar']));\nassertType('mixed', config('foo'));\n\nassertType('Illuminate\\Log\\Context\\Repository', context());\nassertType('Illuminate\\Log\\Context\\Repository', context(['foo' => 'bar']));\nassertType('mixe", "meta": {"filepath": "types/Foundation/Helpers.php", "language": "php", "file_size": 2566, "cut_index": 563, "middle_length": 229}} {"prefix": "?php\n\nuse Illuminate\\Cache\\Repository;\nuse Illuminate\\Support\\Carbon;\n\nuse function PHPStan\\Testing\\assertType;\n\n/** @var Repository $cache */\n$cache = resolve(Repository::class);\n\nassertType('mixed', $cache->get('key'));\nassertType('mixed', $cache->get('cache', 27));\nassertType('mixed', $cache->get('cache', function (): int {\n return 26;\n}));\n\nassertType('mixed', $cache->pull('key'));\nassertType('mixed', $cache->pull('cache', 28));\nassertType('mixed', $cache->pull('cache', function (): int {\n return ", "suffix": "tType('33', $cache->sear('cache', function (): int {\n return 33;\n}));\nassertType('36', $cache->remember('cache', Carbon::now(), function (): int {\n return 36;\n}));\nassertType('36', $cache->rememberForever('cache', function (): int {\n return 36;\n})", "middle": "30;\n}));\nasser", "meta": {"filepath": "types/Cache/Repository.php", "language": "php", "file_size": 786, "cut_index": 513, "middle_length": 14}} {"prefix": "\nnamespace Illuminate\\Types\\Foundation\\Testing;\n\nuse Illuminate\\Contracts\\Foundation\\Application;\nuse Illuminate\\Foundation\\Testing\\Concerns\\InteractsWithContainer;\nuse User;\n\nuse function PHPStan\\Testing\\assertType;\n\nclass InteractsWithContainerTestCase\n{\n use InteractsWithContainer;\n\n protected Application $app;\n\n public function test(): void\n {\n assertType('Mockery\\MockInterface&User', $this->mock(User::class));\n assertType('Mockery\\MockInterface&User', $this->mock(User::class, ", "suffix": "\n assertType('Mockery\\MockInterface&User', $this->spy(User::class));\n assertType('Mockery\\MockInterface&User', $this->spy(User::class, function ($mock) {\n }));\n\n assertType('Mockery\\MockInterface', $this->mock('my.service'));\n ", "middle": "function ($mock) {\n }));\n\n assertType('Mockery\\MockInterface&User', $this->partialMock(User::class));\n assertType('Mockery\\MockInterface&User', $this->partialMock(User::class, function ($mock) {\n }));\n", "meta": {"filepath": "types/Foundation/Testing/InteractsWithContainer.php", "language": "php", "file_size": 1159, "cut_index": 518, "middle_length": 229}} {"prefix": "sting;\n\nuse Illuminate\\Foundation\\Testing\\Concerns\\InteractsWithTime;\nuse Illuminate\\Support\\Carbon;\n\nuse function PHPStan\\Testing\\assertType;\n\nclass InteractsWithTimeTestCase\n{\n use InteractsWithTime;\n\n public function test(): void\n {\n assertType(Carbon::class, $this->freezeTime());\n assertType('42', $this->freezeTime(fn () => 42));\n assertType('42', $this->freezeTime(fn (Carbon $date) => 42));\n\n assertType(Carbon::class, $this->freezeSecond());\n assertType('42',", "suffix": "pe('42', $this->freezeSecond(fn (Carbon $date) => 42));\n\n // @phpstan-ignore method.void\n assertType('null', $this->travelTo(Carbon::now(), function () {\n }));\n assertType('42', $this->travelTo(Carbon::now(), fn () => 42));\n ", "middle": " $this->freezeSecond(fn () => 42));\n assertTy", "meta": {"filepath": "types/Foundation/Testing/InteractsWithTime.php", "language": "php", "file_size": 871, "cut_index": 559, "middle_length": 52}} {"prefix": "pace Illuminate\\Database;\n\nuse Illuminate\\Contracts\\Database\\ConcurrencyErrorDetector as ConcurrencyErrorDetectorContract;\nuse Illuminate\\Support\\Str;\nuse PDOException;\nuse Throwable;\n\nclass ConcurrencyErrorDetector implements ConcurrencyErrorDetectorContract\n{\n /**\n * Determine if the given exception was caused by a concurrency error such as a deadlock or serialization failure.\n *\n * @param \\Throwable $e\n * @return bool\n */\n public function causedByConcurrencyError(Throwable $e)", "suffix": " 'Deadlock found when trying to get lock',\n 'deadlock detected',\n 'The database file is locked',\n 'database is locked',\n 'database table is locked',\n 'A table in the database is locked',\n ", "middle": ": bool\n {\n if ($e instanceof PDOException && ($e->getCode() === 40001 || $e->getCode() === '40001')) {\n return true;\n }\n\n $message = $e->getMessage();\n\n return Str::contains($message, [\n ", "meta": {"filepath": "src/Illuminate/Database/ConcurrencyErrorDetector.php", "language": "php", "file_size": 1316, "cut_index": 524, "middle_length": 229}} {"prefix": "e = new Wormhole(1);\n\n$voidFunction = function () {\n};\n\nassertType('42', $wormhole->seconds(fn () => 42));\nassertType('42', $wormhole->second(fn () => 42));\nassertType('42', $wormhole->minutes(fn () => 42));\nassertType('42', $wormhole->minute(fn () => 42));\nassertType('42', $wormhole->hours(fn () => 42));\nassertType('42', $wormhole->hour(fn () => 42));\nassertType('42', $wormhole->days(fn () => 42));\nassertType('42', $wormhole->day(fn () => 42));\nassertType('42', $wormhole->weeks(fn () => 42));\nassertType('4", "suffix": ";\nassertType('42', $wormhole->microseconds(fn () => 42));\nassertType('42', $wormhole->microsecond(fn () => 42));\nassertType('42', $wormhole->milliseconds(fn () => 42));\nassertType('42', $wormhole->millisecond(fn () => 42));\n\n/** @phpstan-ignore method.void", "middle": "2', $wormhole->week(fn () => 42));\nassertType('42', $wormhole->months(fn () => 42));\nassertType('42', $wormhole->month(fn () => 42));\nassertType('42', $wormhole->years(fn () => 42));\nassertType('42', $wormhole->year(fn () => 42))", "meta": {"filepath": "types/Foundation/Testing/Wormhole.php", "language": "php", "file_size": 4057, "cut_index": 614, "middle_length": 229}} {"prefix": "atabase;\n\n /**\n * The type of the connection.\n *\n * @var string|null\n */\n protected $readWriteType;\n\n /**\n * The table prefix for the connection.\n *\n * @var string\n */\n protected $tablePrefix = '';\n\n /**\n * The database connection configuration options.\n *\n * @var array\n */\n protected $config = [];\n\n /**\n * The reconnector instance for the connection.\n *\n * @var (callable(\\Illuminate\\Database\\Connection): mixed)\n */\n pro", "suffix": " * @var \\Illuminate\\Database\\Schema\\Grammars\\Grammar\n */\n protected $schemaGrammar;\n\n /**\n * The query post processor implementation.\n *\n * @var \\Illuminate\\Database\\Query\\Processors\\Processor\n */\n protected $postProcessor;", "middle": "tected $reconnector;\n\n /**\n * The query grammar implementation.\n *\n * @var \\Illuminate\\Database\\Query\\Grammars\\Grammar\n */\n protected $queryGrammar;\n\n /**\n * The schema grammar implementation.\n *\n", "meta": {"filepath": "src/Illuminate/Database/Connection.php", "language": "php", "file_size": 46662, "cut_index": 2151, "middle_length": 229}} {"prefix": "ination\\CursorPaginator;\nuse Illuminate\\Pagination\\LengthAwarePaginator;\nuse Illuminate\\Pagination\\Paginator;\n\nuse function PHPStan\\Testing\\assertType;\n\n$items = [new Post(), new Post(), new Post()];\n\n/** @var Paginator $paginator */\n$paginator = new Paginator($items, 1, 1);\n\nassertType('array', $paginator->items());\nassertType('ArrayIterator', $paginator->getIterator());\n\n$paginator->each(function ($post) {\n assertType('Post', $post);\n});\n\nforeach ($paginator as $post) {", "suffix": "\nassertType('ArrayIterator', $lengthAwarePaginator->getIterator());\n\n$lengthAwarePaginator->each(function ($post) {\n assertType('Post', $post);\n});\n\nforeach ($lengthAwarePaginator as $post) {\n assertType('Post', $post);\n}\n\n/** @var CursorP", "middle": "\n assertType('Post', $post);\n}\n\n/** @var LengthAwarePaginator $lengthAwarePaginator */\n$lengthAwarePaginator = new LengthAwarePaginator($items, 1, 1);\n\nassertType('array', $lengthAwarePaginator->items());", "meta": {"filepath": "types/Pagination/Paginator.php", "language": "php", "file_size": 1738, "cut_index": 537, "middle_length": 229}} {"prefix": "Generator;\nuse Illuminate\\Contracts\\Database\\ConcurrencyErrorDetector as ConcurrencyErrorDetectorContract;\nuse Illuminate\\Contracts\\Database\\LostConnectionDetector as LostConnectionDetectorContract;\nuse Illuminate\\Contracts\\Queue\\EntityResolver;\nuse Illuminate\\Database\\Connectors\\ConnectionFactory;\nuse Illuminate\\Database\\Eloquent\\Model;\nuse Illuminate\\Database\\Eloquent\\QueueEntityResolver;\nuse Illuminate\\Support\\ServiceProvider;\n\nclass DatabaseServiceProvider extends ServiceProvider\n{\n /**\n * The ar", "suffix": "del::setConnectionResolver($this->app['db']);\n\n Model::setEventDispatcher($this->app['events']);\n }\n\n /**\n * Register the service provider.\n *\n * @return void\n */\n public function register()\n {\n Model::clearBootedM", "middle": "ray of resolved Faker instances.\n *\n * @var array\n */\n protected static $fakers = [];\n\n /**\n * Bootstrap the application events.\n *\n * @return void\n */\n public function boot()\n {\n Mo", "meta": {"filepath": "src/Illuminate/Database/DatabaseServiceProvider.php", "language": "php", "file_size": 3822, "cut_index": 614, "middle_length": 229}} {"prefix": "ection\n */\n protected $committedTransactions;\n\n /**\n * All of the pending transactions.\n *\n * @var \\Illuminate\\Support\\Collection\n */\n protected $pendingTransactions;\n\n /**\n * The current transaction.\n *\n * @var array\n */\n protected $currentTransaction = [];\n\n /**\n * Create a new database transactions manager instance.\n */\n public function", "suffix": " * @param int $level\n * @return void\n */\n public function begin($connection, $level)\n {\n $this->pendingTransactions->push(\n $newTransaction = new DatabaseTransactionRecord(\n $connection,\n $l", "middle": " __construct()\n {\n $this->committedTransactions = new Collection;\n $this->pendingTransactions = new Collection;\n }\n\n /**\n * Start a new database transaction.\n *\n * @param string $connection\n ", "meta": {"filepath": "src/Illuminate/Database/DatabaseTransactionsManager.php", "language": "php", "file_size": 8640, "cut_index": 716, "middle_length": 229}} {"prefix": " Grammar\n{\n use Macroable;\n\n /**\n * The connection used for escaping values.\n *\n * @var \\Illuminate\\Database\\Connection\n */\n protected $connection;\n\n /**\n * Create a new grammar instance.\n *\n * @param \\Illuminate\\Database\\Connection $connection\n */\n public function __construct(Connection $connection)\n {\n $this->connection = $connection;\n }\n\n /**\n * Wrap an array of values.\n *\n * @param array<\\Illuminate\\Contracts\\Database\\Query\\Ex", "suffix": " *\n * @param \\Illuminate\\Contracts\\Database\\Query\\Expression|string $table\n * @param string|null $prefix\n * @return string\n */\n public function wrapTable($table, $prefix = null)\n {\n if ($this->isExpression($table)) {\n ", "middle": "pression|string> $values\n * @return array\n */\n public function wrapArray(array $values)\n {\n return array_map($this->wrap(...), $values);\n }\n\n /**\n * Wrap a table in keyword identifiers.\n ", "meta": {"filepath": "src/Illuminate/Database/Grammar.php", "language": "php", "file_size": 8211, "cut_index": 716, "middle_length": 229}} {"prefix": "ction Illuminate\\Support\\enum_value;\n\n/**\n * @mixin \\Illuminate\\Database\\Connection\n */\nclass DatabaseManager implements ConnectionResolverInterface\n{\n use Macroable {\n __call as macroCall;\n }\n\n /**\n * The application instance.\n *\n * @var \\Illuminate\\Contracts\\Foundation\\Application\n */\n protected $app;\n\n /**\n * The database connection factory instance.\n *\n * @var \\Illuminate\\Database\\Connectors\\ConnectionFactory\n */\n protected $factory;\n\n /**\n ", "suffix": " *\n * @var array\n */\n protected $dynamicConnectionConfigurations = [];\n\n /**\n * The custom connection resolvers.\n *\n * @var array\n */\n protected $extensions = [];\n\n /**\n * The callbac", "middle": " * The active connection instances.\n *\n * @var array\n */\n protected $connections = [];\n\n /**\n * The dynamically configured (DB::build) connection configurations.\n ", "meta": {"filepath": "src/Illuminate/Database/DatabaseManager.php", "language": "php", "file_size": 13999, "cut_index": 921, "middle_length": 229}} {"prefix": "seTransactionRecord\n{\n /**\n * The name of the database connection.\n *\n * @var string\n */\n public $connection;\n\n /**\n * The transaction level.\n *\n * @var int\n */\n public $level;\n\n /**\n * The parent instance of this transaction.\n *\n * @var \\Illuminate\\Database\\DatabaseTransactionRecord\n */\n public $parent;\n\n /**\n * The callbacks that should be executed after committing.\n *\n * @var array\n */\n protected $callbacks = [];\n\n ", "suffix": " string $connection\n * @param int $level\n * @param \\Illuminate\\Database\\DatabaseTransactionRecord|null $parent\n */\n public function __construct($connection, $level, ?DatabaseTransactionRecord $parent = null)\n {\n $this->connect", "middle": " /**\n * The callbacks that should be executed after rollback.\n *\n * @var array\n */\n protected $callbacksForRollback = [];\n\n /**\n * Create a new database transaction record instance.\n *\n * @param ", "meta": {"filepath": "src/Illuminate/Database/DatabaseTransactionRecord.php", "language": "php", "file_size": 2447, "cut_index": 563, "middle_length": 229}} {"prefix": "te\\Database;\n\nclass ConnectionResolver implements ConnectionResolverInterface\n{\n /**\n * All of the registered connections.\n *\n * @var \\Illuminate\\Database\\ConnectionInterface[]\n */\n protected $connections = [];\n\n /**\n * The default connection name.\n *\n * @var string\n */\n protected $default;\n\n /**\n * Create a new connection resolver instance.\n *\n * @param array $connections\n */\n public functi", "suffix": " *\n * @param string|null $name\n * @return \\Illuminate\\Database\\ConnectionInterface\n */\n public function connection($name = null)\n {\n if (is_null($name)) {\n $name = $this->getDefaultConnection();\n }\n\n retu", "middle": "on __construct(array $connections = [])\n {\n foreach ($connections as $name => $connection) {\n $this->addConnection($name, $connection);\n }\n }\n\n /**\n * Get a database connection instance.\n ", "meta": {"filepath": "src/Illuminate/Database/ConnectionResolver.php", "language": "php", "file_size": 1980, "cut_index": 537, "middle_length": 229}} {"prefix": "bound(ConcurrencyErrorDetectorContract::class)\n ? $container[ConcurrencyErrorDetectorContract::class]\n : new ConcurrencyErrorDetector();\n\n return $detector->causedByConcurrencyError($e);\n }\n", "middle": "getInstance();", "meta": {"filepath": "src/Illuminate/Database/DetectsConcurrencyErrors.php", "language": "php", "file_size": 784, "cut_index": 512, "middle_length": 14}} {"prefix": "ate\\Database\\Console\\Migrations\\InstallCommand;\nuse Illuminate\\Database\\Console\\Migrations\\MigrateCommand;\nuse Illuminate\\Database\\Console\\Migrations\\MigrateMakeCommand;\nuse Illuminate\\Database\\Console\\Migrations\\RefreshCommand;\nuse Illuminate\\Database\\Console\\Migrations\\ResetCommand;\nuse Illuminate\\Database\\Console\\Migrations\\RollbackCommand;\nuse Illuminate\\Database\\Console\\Migrations\\StatusCommand;\nuse Illuminate\\Database\\Migrations\\DatabaseMigrationRepository;\nuse Illuminate\\Database\\Migrations\\Migration", "suffix": " *\n * @var array\n */\n protected $commands = [\n 'Migrate' => MigrateCommand::class,\n 'MigrateFresh' => FreshCommand::class,\n 'MigrateInstall' => InstallCommand::class,\n 'MigrateRefresh' => RefreshCommand::class,\n ", "middle": "Creator;\nuse Illuminate\\Database\\Migrations\\Migrator;\nuse Illuminate\\Support\\ServiceProvider;\n\nclass MigrationServiceProvider extends ServiceProvider implements DeferrableProvider\n{\n /**\n * The commands to be registered.\n ", "meta": {"filepath": "src/Illuminate/Database/MigrationServiceProvider.php", "language": "php", "file_size": 6313, "cut_index": 716, "middle_length": 229}} {"prefix": "rammar as QueryGrammar;\nuse Illuminate\\Database\\Query\\Processors\\PostgresProcessor;\nuse Illuminate\\Database\\Schema\\Grammars\\PostgresGrammar as SchemaGrammar;\nuse Illuminate\\Database\\Schema\\PostgresBuilder;\nuse Illuminate\\Database\\Schema\\PostgresSchemaState;\nuse Illuminate\\Filesystem\\Filesystem;\n\nclass PostgresConnection extends Connection\n{\n /**\n * {@inheritdoc}\n */\n public function getDriverTitle()\n {\n return 'PostgreSQL';\n }\n\n /**\n * Escape a binary value for safe SQL emb", "suffix": " value for safe SQL embedding.\n *\n * @param bool $value\n * @return string\n */\n protected function escapeBool($value)\n {\n return $value ? 'true' : 'false';\n }\n\n /**\n * Determine if the given database exception was ca", "middle": "edding.\n *\n * @param string $value\n * @return string\n */\n protected function escapeBinary($value)\n {\n $hex = bin2hex($value);\n\n return \"'\\x{$hex}'::bytea\";\n }\n\n /**\n * Escape a bool", "meta": {"filepath": "src/Illuminate/Database/PostgresConnection.php", "language": "php", "file_size": 3530, "cut_index": 614, "middle_length": 229}} {"prefix": "mmar as QueryGrammar;\nuse Illuminate\\Database\\Query\\Processors\\SQLiteProcessor;\nuse Illuminate\\Database\\Schema\\Grammars\\SQLiteGrammar as SchemaGrammar;\nuse Illuminate\\Database\\Schema\\SQLiteBuilder;\nuse Illuminate\\Database\\Schema\\SqliteSchemaState;\nuse Illuminate\\Filesystem\\Filesystem;\n\nclass SQLiteConnection extends Connection\n{\n /**\n * {@inheritdoc}\n */\n public function getDriverTitle()\n {\n return 'SQLite';\n }\n\n /**\n * Run the statement to start a new transaction.\n *\n ", "suffix": " $this->getPdo()->exec(\"BEGIN {$mode} TRANSACTION\");\n\n return;\n }\n\n $this->getPdo()->beginTransaction();\n }\n\n /**\n * Escape a binary value for safe SQL embedding.\n *\n * @param string $value\n * @return s", "middle": " * @return void\n */\n protected function executeBeginTransactionStatement()\n {\n if (version_compare(PHP_VERSION, '8.4.0', '>=')) {\n $mode = $this->getConfig('transaction_mode') ?? 'DEFERRED';\n\n ", "meta": {"filepath": "src/Illuminate/Database/SQLiteConnection.php", "language": "php", "file_size": 3726, "cut_index": 614, "middle_length": 229}} {"prefix": "ars\\SqlServerGrammar as QueryGrammar;\nuse Illuminate\\Database\\Query\\Processors\\SqlServerProcessor;\nuse Illuminate\\Database\\Schema\\Grammars\\SqlServerGrammar as SchemaGrammar;\nuse Illuminate\\Database\\Schema\\SqlServerBuilder;\nuse Illuminate\\Filesystem\\Filesystem;\nuse RuntimeException;\nuse Throwable;\n\nclass SqlServerConnection extends Connection\n{\n /**\n * {@inheritdoc}\n */\n public function getDriverTitle()\n {\n return 'SQL Server';\n }\n\n /**\n * Execute a Closure within a transact", "suffix": "1; $a <= $attempts; $a++) {\n if ($this->getDriverName() === 'sqlsrv') {\n return parent::transaction($callback, $attempts);\n }\n\n $this->getPdo()->exec('BEGIN TRAN');\n\n // We'll simply execute the gi", "middle": "ion.\n *\n * @param \\Closure $callback\n * @param int $attempts\n * @return mixed\n *\n * @throws \\Throwable\n */\n public function transaction(Closure $callback, $attempts = 1)\n {\n for ($a = ", "meta": {"filepath": "src/Illuminate/Database/SqlServerConnection.php", "language": "php", "file_size": 4591, "cut_index": 614, "middle_length": 229}} {"prefix": "te\\Database\\Query\\Grammars\\MariaDbGrammar as QueryGrammar;\nuse Illuminate\\Database\\Query\\Processors\\MariaDbProcessor;\nuse Illuminate\\Database\\Schema\\Grammars\\MariaDbGrammar as SchemaGrammar;\nuse Illuminate\\Database\\Schema\\MariaDbBuilder;\nuse Illuminate\\Database\\Schema\\MariaDbSchemaState;\nuse Illuminate\\Filesystem\\Filesystem;\nuse Illuminate\\Support\\Str;\n\nclass MariaDbConnection extends MySqlConnection\n{\n /**\n * {@inheritdoc}\n */\n public function getDriverTitle()\n {\n return 'MariaDB';\n", "suffix": "nection.\n *\n * @return string\n */\n public function getServerVersion(): string\n {\n return Str::between(parent::getServerVersion(), '5.5.5-', '-MariaDB');\n }\n\n /**\n * Get the default query grammar instance.\n *\n * @r", "middle": " }\n\n /**\n * Determine if the connected database is a MariaDB database.\n *\n * @return bool\n */\n public function isMaria()\n {\n return true;\n }\n\n /**\n * Get the server version for the con", "meta": {"filepath": "src/Illuminate/Database/MariaDbConnection.php", "language": "php", "file_size": 2451, "cut_index": 563, "middle_length": 229}} {"prefix": "use PDOException;\nuse Throwable;\n\nclass QueryException extends PDOException\n{\n /**\n * The database connection name.\n *\n * @var string\n */\n public $connectionName;\n\n /**\n * The SQL for the query.\n *\n * @var string\n */\n protected $sql;\n\n /**\n * The bindings for the query.\n *\n * @var array\n */\n protected $bindings;\n\n /**\n * The PDO read / write type for the executed query.\n *\n * @var null|'read'|'write'\n */\n public $readWri", "suffix": " * @param string $connectionName\n * @param string $sql\n * @param array $bindings\n * @param \\Throwable $previous\n * @param array $connectionDetails\n * @param null|'read'|'write' $readWriteType\n */\n public function __co", "middle": "teType;\n\n /**\n * The connection details for the query (host, port, database, etc.).\n *\n * @var array\n */\n protected $connectionDetails = [];\n\n /**\n * Create a new query exception instance.\n *\n ", "meta": {"filepath": "src/Illuminate/Database/QueryException.php", "language": "php", "file_size": 4219, "cut_index": 614, "middle_length": 229}} {"prefix": "mar as QueryGrammar;\nuse Illuminate\\Database\\Query\\Processors\\MySqlProcessor;\nuse Illuminate\\Database\\Schema\\Grammars\\MySqlGrammar as SchemaGrammar;\nuse Illuminate\\Database\\Schema\\MySqlBuilder;\nuse Illuminate\\Database\\Schema\\MySqlSchemaState;\nuse Illuminate\\Filesystem\\Filesystem;\nuse Illuminate\\Support\\Str;\nuse PDO;\n\nclass MySqlConnection extends Connection\n{\n /**\n * The last inserted ID generated by the server.\n *\n * @var string|int|null\n */\n protected $lastInsertId;\n\n /**\n * {", "suffix": "* @param array $bindings\n * @param string|null $sequence\n * @return bool\n */\n public function insert($query, $bindings = [], $sequence = null)\n {\n return $this->run($query, $bindings, function ($query, $bindings) use ($sequence", "middle": "@inheritdoc}\n */\n public function getDriverTitle()\n {\n return $this->isMaria() ? 'MariaDB' : 'MySQL';\n }\n\n /**\n * Run an insert statement against the database.\n *\n * @param string $query\n ", "meta": {"filepath": "src/Illuminate/Database/MySqlConnection.php", "language": "php", "file_size": 4871, "cut_index": 614, "middle_length": 229}} {"prefix": "ponents\\TwoColumnDetail;\nuse Illuminate\\Contracts\\Container\\Container;\nuse Illuminate\\Database\\Console\\Seeds\\WithoutModelEvents;\nuse Illuminate\\Support\\Arr;\nuse InvalidArgumentException;\n\nabstract class Seeder\n{\n /**\n * The container instance.\n *\n * @var \\Illuminate\\Contracts\\Container\\Container\n */\n protected $container;\n\n /**\n * The console command instance.\n *\n * @var \\Illuminate\\Console\\Command\n */\n protected $command;\n\n /**\n * Seeders that have been ca", "suffix": " $parameters\n * @return $this\n */\n public function call($class, $silent = false, array $parameters = [])\n {\n $classes = Arr::wrap($class);\n\n foreach ($classes as $class) {\n $seeder = $this->resolve($class);\n\n ", "middle": "lled at least one time.\n *\n * @var array\n */\n protected static $called = [];\n\n /**\n * Run the given seeder class.\n *\n * @param array|string $class\n * @param bool $silent\n * @param array ", "meta": {"filepath": "src/Illuminate/Database/Seeder.php", "language": "php", "file_size": 4731, "cut_index": 614, "middle_length": 229}} {"prefix": "ss\\Exception\\ProcessFailedException;\nuse Symfony\\Component\\Process\\Process;\nuse UnexpectedValueException;\n\n#[AsCommand(name: 'db')]\nclass DbCommand extends Command\n{\n /**\n * The name and signature of the console command.\n *\n * @var string\n */\n protected $signature = 'db {connection? : The database connection that should be used}\n {--read : Connect to the read connection}\n {--write : Connect to the write connection}';\n\n /**\n * The console command descr", "suffix": "$connection = $this->getConnection();\n\n if (! isset($connection['host']) && $connection['driver'] !== 'sqlite') {\n $this->components->error('No host specified for this database connection.');\n $this->line(' Use the Note: This can be slow on large databases }\n {--views : Show the database views Note: This can be slow on large databases }\n {--types : Show the user defined ", "meta": {"filepath": "src/Illuminate/Database/Console/ShowCommand.php", "language": "php", "file_size": 9102, "cut_index": 716, "middle_length": 229}} {"prefix": "\n /**\n * The name and signature of the console command.\n *\n * @var string\n */\n protected $signature = 'db:table\n {table? : The name of the table}\n {--database= : The database connection}\n {--json : Output the table information as JSON}';\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected $description = 'Display information about the given database table';\n\n ", "suffix": "'));\n $tables = (new Collection($connection->getSchemaBuilder()->getTables()))\n ->keyBy('schema_qualified_name')->all();\n\n $tableNames = (new Collection($tables))->keys();\n\n $tableName = $this->argument('table') ?: search(\n ", "middle": "/**\n * Execute the console command.\n *\n * @return int\n */\n public function handle(ConnectionResolverInterface $connections)\n {\n $connection = $connections->connection($this->input->getOption('database", "meta": {"filepath": "src/Illuminate/Database/Console/TableCommand.php", "language": "php", "file_size": 9553, "cut_index": 921, "middle_length": 229}} {"prefix": "pace Illuminate\\Database\\Console;\n\nuse Illuminate\\Console\\Command;\nuse Illuminate\\Database\\ConnectionInterface;\nuse Illuminate\\Support\\Arr;\n\nabstract class DatabaseInspectionCommand extends Command\n{\n /**\n * Get a human-readable name for the given connection.\n *\n * @param \\Illuminate\\Database\\ConnectionInterface $connection\n * @param string $database\n * @return string\n *\n * @deprecated\n */\n protected function getConnectionName(ConnectionInterface $connection, $datab", "suffix": "\n *\n * @deprecated\n */\n protected function getConnectionCount(ConnectionInterface $connection)\n {\n return $connection->threadCount();\n }\n\n /**\n * Get the connection configuration details for the given connection.\n *\n ", "middle": "ase)\n {\n return $connection->getDriverTitle();\n }\n\n /**\n * Get the number of open connections for a database.\n *\n * @param \\Illuminate\\Database\\ConnectionInterface $connection\n * @return int|null", "meta": {"filepath": "src/Illuminate/Database/Console/DatabaseInspectionCommand.php", "language": "php", "file_size": 1281, "cut_index": 524, "middle_length": 229}} {"prefix": "ngFinished;\nuse Illuminate\\Database\\Events\\ModelPruningStarting;\nuse Illuminate\\Database\\Events\\ModelsPruned;\nuse Illuminate\\Support\\Collection;\nuse Illuminate\\Support\\Str;\nuse InvalidArgumentException;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\nuse Symfony\\Component\\Finder\\Finder;\n\n#[AsCommand(name: 'model:prune')]\nclass PruneCommand extends Command\n{\n /**\n * The console command name.\n *\n * @var string\n */\n protected $signature = 'model:prune\n {-", "suffix": "here models are located}\n {--chunk=1000 : The number of models to retrieve per chunk of models to be deleted}\n {--pretend : Display the number of prunable records found instead of deleting them}", "middle": "-model=* : Class names of the models to be pruned}\n {--except=* : Class names of the models to be excluded from pruning}\n {--path=* : Absolute path(s) to directories w", "meta": {"filepath": "src/Illuminate/Database/Console/PruneCommand.php", "language": "php", "file_size": 5813, "cut_index": 716, "middle_length": 229}} {"prefix": "ConfirmableTrait;\nuse Illuminate\\Console\\Prohibitable;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\nuse Symfony\\Component\\Console\\Input\\InputOption;\n\n#[AsCommand(name: 'db:wipe')]\nclass WipeCommand extends Command\n{\n use ConfirmableTrait, Prohibitable;\n\n /**\n * The console command name.\n *\n * @var string\n */\n protected $name = 'db:wipe';\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected $description = 'Drop all tables, views, and ", "suffix": ":FAILURE;\n }\n\n $database = $this->input->getOption('database');\n\n if ($this->option('drop-views')) {\n $this->dropAllViews($database);\n\n $this->components->info('Dropped all views successfully.');\n }\n\n ", "middle": "types';\n\n /**\n * Execute the console command.\n *\n * @return int\n */\n public function handle()\n {\n if ($this->isProhibited() ||\n ! $this->confirmToProceed()) {\n return Command:", "meta": {"filepath": "src/Illuminate/Database/Console/WipeCommand.php", "language": "php", "file_size": 3136, "cut_index": 614, "middle_length": 229}} {"prefix": "Prohibitable;\nuse Illuminate\\Contracts\\Events\\Dispatcher;\nuse Illuminate\\Database\\Connection;\nuse Illuminate\\Database\\ConnectionResolverInterface;\nuse Illuminate\\Database\\Events\\MigrationsPruned;\nuse Illuminate\\Database\\Events\\SchemaDumped;\nuse Illuminate\\Filesystem\\Filesystem;\nuse Illuminate\\Support\\Facades\\Config;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\n\n#[AsCommand(name: 'schema:dump')]\nclass DumpCommand extends Command\n{\n use Prohibitable;\n\n /**\n * The console command name.\n *\n ", "suffix": "prune : Delete all existing migration files}';\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected $description = 'Dump the given database schema';\n\n /**\n * Execute the console command.\n *\n * @par", "middle": " * @var string\n */\n protected $signature = 'schema:dump\n {--database= : The database connection to use}\n {--path= : The path where the schema dump file should be stored}\n {--", "meta": {"filepath": "src/Illuminate/Database/Console/DumpCommand.php", "language": "php", "file_size": 3181, "cut_index": 614, "middle_length": 229}} {"prefix": "te\\Database\\Console\\Seeds;\n\nuse Illuminate\\Console\\GeneratorCommand;\nuse Illuminate\\Support\\Str;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\n\n#[AsCommand(name: 'make:seeder')]\nclass SeederMakeCommand extends GeneratorCommand\n{\n /**\n * The console command name.\n *\n * @var string\n */\n protected $name = 'make:seeder';\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected $description = 'Create a new seeder class';\n\n /**\n * The type ", "suffix": "();\n }\n\n /**\n * Get the stub file for the generator.\n *\n * @return string\n */\n protected function getStub()\n {\n return $this->resolveStubPath('/stubs/seeder.stub');\n }\n\n /**\n * Resolve the fully-qualified path t", "middle": "of class being generated.\n *\n * @var string\n */\n protected $type = 'Seeder';\n\n /**\n * Execute the console command.\n *\n * @return void\n */\n public function handle()\n {\n parent::handle", "meta": {"filepath": "src/Illuminate/Database/Console/Seeds/SeederMakeCommand.php", "language": "php", "file_size": 1954, "cut_index": 537, "middle_length": 229}} {"prefix": "te\\Console\\ConfirmableTrait;\nuse Illuminate\\Console\\Prohibitable;\nuse Illuminate\\Contracts\\Events\\Dispatcher;\nuse Illuminate\\Database\\Events\\DatabaseRefreshed;\nuse Illuminate\\Database\\Migrations\\Migrator;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\nuse Symfony\\Component\\Console\\Input\\InputOption;\nuse Throwable;\n\n#[AsCommand(name: 'migrate:fresh')]\nclass FreshCommand extends Command\n{\n use ConfirmableTrait, Prohibitable;\n\n /**\n * The console command name.\n *\n * @var string\n */\n ", "suffix": "ce.\n *\n * @var \\Illuminate\\Database\\Migrations\\Migrator\n */\n protected $migrator;\n\n /**\n * Create a new fresh command instance.\n *\n * @param \\Illuminate\\Database\\Migrations\\Migrator $migrator\n */\n public function __co", "middle": " protected $name = 'migrate:fresh';\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected $description = 'Drop all tables and re-run all migrations';\n\n /**\n * The migrator instan", "meta": {"filepath": "src/Illuminate/Database/Console/Migrations/FreshCommand.php", "language": "php", "file_size": 4822, "cut_index": 614, "middle_length": 229}} {"prefix": "r;\nuse PDOException;\nuse RuntimeException;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\nuse Throwable;\n\nuse function Laravel\\Prompts\\confirm;\n\n#[AsCommand(name: 'migrate')]\nclass MigrateCommand extends BaseCommand implements Isolatable\n{\n use ConfirmableTrait;\n\n /**\n * The name and signature of the console command.\n *\n * @var string\n */\n protected $signature = 'migrate {--database= : The database connection to use}\n {--force : Force the operation to run when in ", "suffix": " : The path to a schema dump file}\n {--pretend : Dump the SQL queries that would be run}\n {--seed : Indicates if the seed task should be re-run}\n {--seeder= : The class name of the root seeder}\n {", "middle": "production}\n {--path=* : The path(s) to the migrations files to be executed}\n {--realpath : Indicate any provided migration file paths are pre-resolved absolute paths}\n {--schema-path=", "meta": {"filepath": "src/Illuminate/Database/Console/Migrations/MigrateCommand.php", "language": "php", "file_size": 11377, "cut_index": 921, "middle_length": 229}} {"prefix": "atcher;\nuse Illuminate\\Database\\Events\\DatabaseRefreshed;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\nuse Symfony\\Component\\Console\\Input\\InputOption;\n\n#[AsCommand(name: 'migrate:refresh')]\nclass RefreshCommand extends Command\n{\n use ConfirmableTrait, Prohibitable;\n\n /**\n * The console command name.\n *\n * @var string\n */\n protected $name = 'migrate:refresh';\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected $description = 'Reset ", "suffix": " return Command::FAILURE;\n }\n\n // Next we'll gather some of the options so that we can have the right options\n // to pass to the commands. This includes options such as which database to\n // use and the path to use for the m", "middle": "and re-run all migrations';\n\n /**\n * Execute the console command.\n *\n * @return int\n */\n public function handle()\n {\n if ($this->isProhibited() ||\n ! $this->confirmToProceed()) {\n ", "meta": {"filepath": "src/Illuminate/Database/Console/Migrations/RefreshCommand.php", "language": "php", "file_size": 5104, "cut_index": 716, "middle_length": 229}} {"prefix": "ions;\n\nuse Illuminate\\Console\\Command;\nuse Illuminate\\Console\\ConfirmableTrait;\nuse Illuminate\\Console\\Prohibitable;\nuse Illuminate\\Database\\Migrations\\Migrator;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\nuse Symfony\\Component\\Console\\Input\\InputOption;\n\n#[AsCommand('migrate:rollback')]\nclass RollbackCommand extends BaseCommand\n{\n use ConfirmableTrait, Prohibitable;\n\n /**\n * The console command name.\n *\n * @var string\n */\n protected $name = 'migrate:rollback';\n\n /**\n ", "suffix": "igrator\n */\n protected $migrator;\n\n /**\n * Create a new migration rollback command instance.\n *\n * @param \\Illuminate\\Database\\Migrations\\Migrator $migrator\n */\n public function __construct(Migrator $migrator)\n {\n p", "middle": "* The console command description.\n *\n * @var string\n */\n protected $description = 'Rollback the last database migration';\n\n /**\n * The migrator instance.\n *\n * @var \\Illuminate\\Database\\Migrations\\M", "meta": {"filepath": "src/Illuminate/Database/Console/Migrations/RollbackCommand.php", "language": "php", "file_size": 2768, "cut_index": 563, "middle_length": 229}} {"prefix": "lutionException;\nuse Illuminate\\Database\\Eloquent\\ModelInfo;\nuse Illuminate\\Database\\Eloquent\\ModelInspector;\nuse Illuminate\\Support\\Collection;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\nuse Symfony\\Component\\Console\\Output\\OutputInterface;\n\nuse function Laravel\\Prompts\\suggest;\n\n#[AsCommand(name: 'model:show')]\nclass ShowModelCommand extends DatabaseInspectionCommand implements PromptsForMissingInput\n{\n use FindsAvailableModels;\n\n /**\n * The console command name.\n *\n * @var strin", "suffix": " console command signature.\n *\n * @var string\n */\n protected $signature = 'model:show {model : The model to show}\n {--database= : The database connection to use}\n {--json : Output the model as JSON}';\n\n /**\n ", "middle": "g\n */\n protected $name = 'model:show {model}';\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected $description = 'Show information about an Eloquent model';\n\n /**\n * The", "meta": {"filepath": "src/Illuminate/Database/Console/ShowModelCommand.php", "language": "php", "file_size": 5592, "cut_index": 716, "middle_length": 229}} {"prefix": "te\\Database\\Console\\Migrations;\n\nuse Illuminate\\Console\\Command;\nuse Illuminate\\Database\\Migrations\\MigrationRepositoryInterface;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\nuse Symfony\\Component\\Console\\Input\\InputOption;\n\n#[AsCommand(name: 'migrate:install')]\nclass InstallCommand extends Command\n{\n /**\n * The console command name.\n *\n * @var string\n */\n protected $name = 'migrate:install';\n\n /**\n * The console command description.\n *\n * @var string\n */\n p", "suffix": "* Create a new migration install command instance.\n *\n * @param \\Illuminate\\Database\\Migrations\\MigrationRepositoryInterface $repository\n */\n public function __construct(MigrationRepositoryInterface $repository)\n {\n parent::__con", "middle": "rotected $description = 'Create the migration repository';\n\n /**\n * The repository instance.\n *\n * @var \\Illuminate\\Database\\Migrations\\MigrationRepositoryInterface\n */\n protected $repository;\n\n /**\n ", "meta": {"filepath": "src/Illuminate/Database/Console/Migrations/InstallCommand.php", "language": "php", "file_size": 1726, "cut_index": 537, "middle_length": 229}} {"prefix": "ions;\n\nuse Illuminate\\Console\\Command;\nuse Illuminate\\Console\\ConfirmableTrait;\nuse Illuminate\\Console\\Prohibitable;\nuse Illuminate\\Database\\Migrations\\Migrator;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\nuse Symfony\\Component\\Console\\Input\\InputOption;\n\n#[AsCommand(name: 'migrate:reset')]\nclass ResetCommand extends BaseCommand\n{\n use ConfirmableTrait, Prohibitable;\n\n /**\n * The console command name.\n *\n * @var string\n */\n protected $name = 'migrate:reset';\n\n /**\n * T", "suffix": "\n */\n protected $migrator;\n\n /**\n * Create a new migration rollback command instance.\n *\n * @param \\Illuminate\\Database\\Migrations\\Migrator $migrator\n */\n public function __construct(Migrator $migrator)\n {\n parent::", "middle": "he console command description.\n *\n * @var string\n */\n protected $description = 'Rollback all database migrations';\n\n /**\n * The migrator instance.\n *\n * @var \\Illuminate\\Database\\Migrations\\Migrator", "meta": {"filepath": "src/Illuminate/Database/Console/Migrations/ResetCommand.php", "language": "php", "file_size": 2750, "cut_index": 563, "middle_length": 229}} {"prefix": "MySqlProcessor extends Processor\n{\n /**\n * Process the results of a column listing query.\n *\n * @deprecated Will be removed in a future Laravel version.\n *\n * @param array $results\n * @return array\n */\n public function processColumnListing($results)\n {\n return array_map(function ($result) {\n return ((object) $result)->column_name;\n }, $results);\n }\n\n /**\n * Process an \"insert get ID\" query.\n *\n * @param \\Illuminate\\Database\\", "suffix": "ll)\n {\n $query->getConnection()->insert($sql, $values, $sequence);\n\n $id = $query->getConnection()->getLastInsertId();\n\n return is_numeric($id) ? (int) $id : $id;\n }\n\n /** @inheritDoc */\n public function processColumns($res", "middle": "Query\\Builder $query\n * @param string $sql\n * @param array $values\n * @param string|null $sequence\n * @return int\n */\n public function processInsertGetId(Builder $query, $sql, $values, $sequence = nu", "meta": {"filepath": "src/Illuminate/Database/Query/Processors/MySqlProcessor.php", "language": "php", "file_size": 3236, "cut_index": 614, "middle_length": 229}} {"prefix": " * @return TReturn\n *\n * @throws \\Throwable\n */\n public function transaction(Closure $callback, $attempts = 1)\n {\n for ($currentAttempt = 1; $currentAttempt <= $attempts; $currentAttempt++) {\n $this->beginTransaction();\n\n // We'll simply execute the given callback within a try / catch block and if we\n // catch any exception we can rollback this transaction so that none of this\n // gets actually persisted to a database or stored in a perm", "suffix": "s. If we are out of attempts we will just throw the\n // exception back out, and let the developer handle an uncaught exception.\n catch (Throwable $e) {\n $this->handleTransactionException(\n $e, $curren", "middle": "anent fashion.\n try {\n $callbackResult = $callback($this);\n }\n\n // If we catch an exception we'll rollback this transaction and try again if we\n // are not out of attempt", "meta": {"filepath": "src/Illuminate/Database/Concerns/ManagesTransactions.php", "language": "php", "file_size": 10323, "cut_index": 921, "middle_length": 229}} {"prefix": "?php\n\nnamespace Illuminate\\Database\\Eloquent;\n\n/**\n * @mixin \\Illuminate\\Database\\Eloquent\\Builder\n */\nclass HigherOrderBuilderProxy\n{\n /**\n * The collection being operated on.\n *\n * @var \\Illuminate\\Database\\Eloquent\\Builder<*>\n */\n protected $builder;\n\n /**\n * The method being proxied.\n *\n * @var string\n */\n protected $method;\n\n /**\n * Create a new proxy instance.\n *\n * @param \\Illuminate\\Database\\Eloquent\\Builder<*> $builder\n * @param stri", "suffix": " * @param string $method\n * @param array $parameters\n * @return mixed\n */\n public function __call($method, $parameters)\n {\n return $this->builder->{$this->method}(function ($value) use ($method, $parameters) {\n retur", "middle": "ng $method\n */\n public function __construct(Builder $builder, $method)\n {\n $this->method = $method;\n $this->builder = $builder;\n }\n\n /**\n * Proxy a scope call onto the query builder.\n *\n ", "meta": {"filepath": "src/Illuminate/Database/Eloquent/HigherOrderBuilderProxy.php", "language": "php", "file_size": 1055, "cut_index": 513, "middle_length": 229}} {"prefix": "as BaseArrayObject;\nuse Illuminate\\Contracts\\Support\\Arrayable;\nuse Illuminate\\Support\\Collection;\nuse JsonSerializable;\n\n/**\n * @template TKey of array-key\n * @template TItem\n *\n * @extends \\ArrayObject\n */\nclass ArrayObject extends BaseArrayObject implements Arrayable, JsonSerializable\n{\n /**\n * Get a collection containing the underlying array.\n *\n * @return \\Illuminate\\Support\\Collection\n */\n public function collect()\n {\n return new Collection($this->getArray", "suffix": "n array.\n *\n * @return array\n */\n public function toArray()\n {\n return $this->getArrayCopy();\n }\n\n /**\n * Get the array that should be JSON serialized.\n *\n * @return array\n */\n public function jsonSerialize", "middle": "Copy());\n }\n\n /**\n * Get the instance as a", "meta": {"filepath": "src/Illuminate/Database/Eloquent/Casts/ArrayObject.php", "language": "php", "file_size": 952, "cut_index": 582, "middle_length": 52}} {"prefix": "pace Illuminate\\Database\\Console\\Migrations;\n\nuse Illuminate\\Console\\Command;\nuse Illuminate\\Support\\Collection;\n\nclass BaseCommand extends Command\n{\n /**\n * Get all of the migration paths.\n *\n * @return string[]\n */\n protected function getMigrationPaths()\n {\n // Here, we will check to see if a path option has been defined. If it has we will\n // use the path relative to the root of the installation folder so our database\n // migrations may be run for any customi", "suffix": "gRealPath()\n ? $this->laravel->basePath().'/'.$path\n : $path;\n })->all();\n }\n\n return array_merge(\n $this->migrator->paths(), [$this->getMigrationPath()]\n );\n }\n\n /**\n ", "middle": "zed path from within the application.\n if ($this->input->hasOption('path') && $this->option('path')) {\n return (new Collection($this->option('path')))->map(function ($path) {\n return ! $this->usin", "meta": {"filepath": "src/Illuminate/Database/Console/Migrations/BaseCommand.php", "language": "php", "file_size": 1473, "cut_index": 524, "middle_length": 229}} {"prefix": "\nnamespace Illuminate\\Database\\Eloquent\\Casts;\n\nclass Json\n{\n /**\n * The custom JSON encoder.\n *\n * @var callable|null\n */\n protected static $encoder;\n\n /**\n * The custom JSON decode.\n *\n * @var callable|null\n */\n protected static $decoder;\n\n /**\n * Encode the given value.\n */\n public static function encode(mixed $value, int $flags = 0): mixed\n {\n return isset(static::$encoder)\n ? (static::$encoder)($value, $flags)\n : ", "suffix": "ic::$decoder)($value, $associative)\n : json_decode($value, $associative);\n }\n\n /**\n * Encode all values using the given callable.\n */\n public static function encodeUsing(?callable $encoder): void\n {\n static::$encoder =", "middle": "json_encode($value, $flags);\n }\n\n /**\n * Decode the given value.\n */\n public static function decode(mixed $value, ?bool $associative = true): mixed\n {\n return isset(static::$decoder)\n ? (stat", "meta": {"filepath": "src/Illuminate/Database/Eloquent/Casts/Json.php", "language": "php", "file_size": 1204, "cut_index": 518, "middle_length": 229}} {"prefix": "te\\Database\\Query\\Grammars;\n\nuse Illuminate\\Database\\Query\\Builder;\nuse Illuminate\\Database\\Query\\JoinLateralClause;\nuse RuntimeException;\n\nclass MariaDbGrammar extends MySqlGrammar\n{\n /**\n * Compile a \"lateral join\" clause.\n *\n * @param \\Illuminate\\Database\\Query\\JoinLateralClause $join\n * @param string $expression\n * @return string\n *\n * @throws \\RuntimeException\n */\n public function compileJoinLateral(JoinLateralClause $join, string $expression): string\n {\n ", "suffix": " public function compileJsonValueCast($value)\n {\n return \"json_query({$value}, '$')\";\n }\n\n /**\n * Compile a query to get the number of open connections for a database.\n *\n * @return string\n */\n public function compileThre", "middle": " throw new RuntimeException('This database engine does not support lateral joins.');\n }\n\n /**\n * Compile a \"JSON value cast\" statement into SQL.\n *\n * @param string $value\n * @return string\n */\n ", "meta": {"filepath": "src/Illuminate/Database/Query/Grammars/MariaDbGrammar.php", "language": "php", "file_size": 1732, "cut_index": 537, "middle_length": 229}} {"prefix": "issingInput;\nuse Illuminate\\Database\\Migrations\\MigrationCreator;\nuse Illuminate\\Support\\Composer;\nuse Illuminate\\Support\\Str;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\n\n#[AsCommand(name: 'make:migration')]\nclass MigrateMakeCommand extends BaseCommand implements PromptsForMissingInput\n{\n /**\n * The console command signature.\n *\n * @var string\n */\n protected $signature = 'make:migration {name : The name of the migration}\n {--create= : The table to be created}\n {--", "suffix": "tput the full path of the migration (Deprecated)}';\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected $description = 'Create a new migration file';\n\n /**\n * The migration creator instance.\n *\n *", "middle": "table= : The table to migrate}\n {--path= : The location where the migration file should be created}\n {--realpath : Indicate any provided migration file paths are pre-resolved absolute paths}\n {--fullpath : Ou", "meta": {"filepath": "src/Illuminate/Database/Console/Migrations/MigrateMakeCommand.php", "language": "php", "file_size": 4611, "cut_index": 614, "middle_length": 229}} {"prefix": "E_PATTERNS = [\n '/^create_(\\w+)_table$/',\n '/^create_(\\w+)$/',\n ];\n\n const CHANGE_PATTERNS = [\n '/.+_(to|from|in)_(\\w+)_table$/',\n '/.+_(to|from|in)_(\\w+)$/',\n ];\n\n /**\n * Attempt to guess the table name and \"creation\" status of the given migration.\n *\n * @param string $migration\n * @return array{string, bool}\n */\n public static function guess($migration)\n {\n foreach (self::CREATE_PATTERNS as $pattern) {\n if (preg_match($p", "suffix": "urn [$matches[1], $create = true];\n }\n }\n\n foreach (self::CHANGE_PATTERNS as $pattern) {\n if (preg_match($pattern, $migration, $matches)) {\n return [$matches[2], $create = false];\n }\n }\n ", "middle": "attern, $migration, $matches)) {\n ret", "meta": {"filepath": "src/Illuminate/Database/Console/Migrations/TableGuesser.php", "language": "php", "file_size": 921, "cut_index": 606, "middle_length": 52}} {"prefix": "Illuminate\\Support\\Str;\nuse Illuminate\\Support\\Stringable;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\nuse Symfony\\Component\\Console\\Input\\InputOption;\n\n#[AsCommand(name: 'make:factory')]\nclass FactoryMakeCommand extends GeneratorCommand\n{\n /**\n * The console command name.\n *\n * @var string\n */\n protected $name = 'make:factory';\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected $description = 'Create a new model factory';\n\n /**\n ", "suffix": ")\n {\n return $this->resolveStubPath('/stubs/factory.stub');\n }\n\n /**\n * Resolve the fully-qualified path to the stub.\n *\n * @param string $stub\n * @return string\n */\n protected function resolveStubPath($stub)\n {\n", "middle": " * The type of class being generated.\n *\n * @var string\n */\n protected $type = 'Factory';\n\n /**\n * Get the stub file for the generator.\n *\n * @return string\n */\n protected function getStub(", "meta": {"filepath": "src/Illuminate/Database/Console/Factories/FactoryMakeCommand.php", "language": "php", "file_size": 3724, "cut_index": 614, "middle_length": 229}} {"prefix": "hey have not been defined.\n if (isset($query->groupLimit)) {\n if (is_null($query->columns)) {\n $query->columns = ['*'];\n }\n\n return $this->compileGroupLimit($query);\n }\n\n // If the query does not have any columns set, we'll set the columns to the\n // * character to just get all of the columns from the database. Then we\n // can build the query and concatenate all the pieces together as one.\n $original = $query->columns;", "suffix": "ll just call the compiler\n // function for the component which is responsible for making the SQL.\n $sql = trim($this->concatenate(\n $this->compileComponents($query))\n );\n\n if ($query->unions) {\n $sql = $thi", "middle": "\n\n if (is_null($query->columns)) {\n $query->columns = ['*'];\n }\n\n // To compile the query, we'll spin through each component of the query and\n // see if that component exists. If it does we'", "meta": {"filepath": "src/Illuminate/Database/Query/Grammars/Grammar.php", "language": "php", "file_size": 47088, "cut_index": 2151, "middle_length": 229}} {"prefix": "s = [];\n\n /**\n * The grammar specific bitwise operators.\n *\n * @var array\n */\n protected $bitwiseOperators = [\n '~', '&', '|', '#', '<<', '>>', '<<=', '>>=',\n ];\n\n /**\n * Indicates if the cascade option should be used when truncating.\n *\n * @var bool\n */\n protected static $cascadeTruncate = true;\n\n /**\n * Compile a basic where clause.\n *\n * @param \\Illuminate\\Database\\Query\\Builder $query\n * @param array $where\n * @return strin", "suffix": "ap($where['column']),\n $where['operator'],\n $this->parameter($where['value'])\n );\n }\n\n return parent::whereBasic($query, $where);\n }\n\n /**\n * Compile a bitwise operator where clause.\n *\n ", "middle": "g\n */\n protected function whereBasic(Builder $query, $where)\n {\n if (str_contains(strtolower($where['operator']), 'like')) {\n return sprintf(\n '%s::text %s %s',\n $this->wr", "meta": {"filepath": "src/Illuminate/Database/Query/Grammars/PostgresGrammar.php", "language": "php", "file_size": 25332, "cut_index": 1331, "middle_length": 229}} {"prefix": "$operators = [\n '=', '<', '>', '<=', '>=', '!<', '!>', '<>', '!=',\n 'like', 'not like', 'ilike',\n '&', '&=', '|', '|=', '^', '^=',\n ];\n\n /**\n * The components that make up a select clause.\n *\n * @var string[]\n */\n protected $selectComponents = [\n 'aggregate',\n 'columns',\n 'from',\n 'indexHint',\n 'joins',\n 'wheres',\n 'groups',\n 'havings',\n 'orders',\n 'offset',\n 'limit',\n 'lock',\n ", "suffix": "lause is required for SQL Server offset to function...\n if ($query->offset && empty($query->orders)) {\n $query->orders[] = ['sql' => '(SELECT 0)'];\n }\n\n return parent::compileSelect($query);\n }\n\n /**\n * Compile the", "middle": " ];\n\n /**\n * Compile a select query into SQL.\n *\n * @param \\Illuminate\\Database\\Query\\Builder $query\n * @return string\n */\n public function compileSelect(Builder $query)\n {\n // An order by c", "meta": {"filepath": "src/Illuminate/Database/Query/Grammars/SqlServerGrammar.php", "language": "php", "file_size": 16060, "cut_index": 921, "middle_length": 229}} {"prefix": "cessor = $processor ?: $connection->getPostProcessor();\n }\n\n /**\n * Set the columns to be selected.\n *\n * @param mixed $columns\n * @return $this\n */\n public function select($columns = ['*'])\n {\n $this->columns = [];\n $this->bindings['select'] = [];\n\n $columns = is_array($columns) ? $columns : func_get_args();\n\n foreach ($columns as $as => $column) {\n if (is_string($as) && $this->isQueryable($column)) {\n $this->selectSub(", "suffix": "ate\\Database\\Query\\Builder|\\Illuminate\\Database\\Eloquent\\Builder<*>|string $query\n * @param string $as\n * @return $this\n *\n * @throws \\InvalidArgumentException\n */\n public function selectSub($query, $as)\n {\n [$query, $bi", "middle": "$column, $as);\n } else {\n $this->columns[] = $column;\n }\n }\n\n return $this;\n }\n\n /**\n * Add a subselect expression to the query.\n *\n * @param \\Closure|\\Illumin", "meta": {"filepath": "src/Illuminate/Database/Query/Builder.php", "language": "php", "file_size": 149234, "cut_index": 7068, "middle_length": 229}} {"prefix": " * The type of join being performed.\n *\n * @var string\n */\n public $type;\n\n /**\n * The table the join clause is joining to.\n *\n * @var \\Illuminate\\Contracts\\Database\\Query\\Expression|string\n */\n public $table;\n\n /**\n * The connection of the parent query builder.\n *\n * @var \\Illuminate\\Database\\ConnectionInterface\n */\n protected $parentConnection;\n\n /**\n * The grammar of the parent query builder.\n *\n * @var \\Illuminate\\Database\\Que", "suffix": "/**\n * The class name of the parent query builder.\n *\n * @var string\n */\n protected $parentClass;\n\n /**\n * Create a new join clause instance.\n *\n * @param \\Illuminate\\Database\\Query\\Builder $parentQuery\n * @param st", "middle": "ry\\Grammars\\Grammar\n */\n protected $parentGrammar;\n\n /**\n * The processor of the parent query builder.\n *\n * @var \\Illuminate\\Database\\Query\\Processors\\Processor\n */\n protected $parentProcessor;\n\n ", "meta": {"filepath": "src/Illuminate/Database/Query/JoinClause.php", "language": "php", "file_size": 3856, "cut_index": 614, "middle_length": 229}} {"prefix": "ect\\b/i',\n 'select /*+ MAX_EXECUTION_TIME('.$milliseconds.') */',\n $sql,\n 1\n );\n }\n\n /**\n * Compile a \"where like\" clause.\n *\n * @param \\Illuminate\\Database\\Query\\Builder $query\n * @param array $where\n * @return string\n */\n protected function whereLike(Builder $query, $where)\n {\n $where['operator'] = $where['not'] ? 'not ' : '';\n\n $where['operator'] .= $where['caseSensitive'] ? 'like binary' : 'like';\n\n retu", "suffix": " protected function whereNullSafeEquals(Builder $query, $where)\n {\n return $this->wrap($where['column']).' <=> '.$this->parameter($where['value']);\n }\n\n /**\n * Add a \"where null\" clause to the query.\n *\n * @param \\Illuminate\\D", "middle": "rn $this->whereBasic($query, $where);\n }\n\n /**\n * Compile a \"where null safe equals\" clause.\n *\n * @param \\Illuminate\\Database\\Query\\Builder $query\n * @param array $where\n * @return string\n */\n ", "meta": {"filepath": "src/Illuminate/Database/Query/Grammars/MySqlGrammar.php", "language": "php", "file_size": 17483, "cut_index": 1331, "middle_length": 229}} {"prefix": "param \\Illuminate\\Database\\Query\\Builder $query\n * @param string $sql\n * @param array $values\n * @param string|null $sequence\n * @return int\n */\n public function processInsertGetId(Builder $query, $sql, $values, $sequence = null)\n {\n $connection = $query->getConnection();\n\n $connection->recordsHaveBeenModified();\n\n $result = $connection->selectFromWriteConnection($sql, $values)[0];\n\n $sequence = $sequence ?: 'id';\n\n $id = is_object($result", "suffix": " $result = (object) $result;\n\n return [\n 'name' => $result->name,\n 'schema' => $result->schema,\n 'schema_qualified_name' => $result->schema.'.'.$result->name,\n 'implicit' => (bool)", "middle": ") ? $result->{$sequence} : $result[$sequence];\n\n return is_numeric($id) ? (int) $id : $id;\n }\n\n /** @inheritDoc */\n public function processTypes($results)\n {\n return array_map(function ($result) {\n ", "meta": {"filepath": "src/Illuminate/Database/Query/Processors/PostgresProcessor.php", "language": "php", "file_size": 5189, "cut_index": 716, "middle_length": 229}} {"prefix": "/** @inheritDoc */\n public function processColumns($results, $sql = '')\n {\n $hasPrimaryKey = array_sum(array_column($results, 'primary')) === 1;\n\n return array_map(function ($result) use ($hasPrimaryKey, $sql) {\n $result = (object) $result;\n\n $type = strtolower($result->type);\n\n $safeName = preg_quote($result->name, '/');\n\n $collation = preg_match(\n '/\\b'.$safeName.'\\b[^,(]+(?:\\([^()]+\\)[^,]*)?(?:(?:default|check|as)\\s*(?:\\(.*?\\)", "suffix": "Generated && preg_match(\n '/\\b'.$safeName.'\\b[^,]+\\s+as\\s+\\(((?:[^()]+|\\((?:[^()]+|\\([^()]*\\))*\\))*)\\)/i',\n $sql,\n $matches\n ) === 1 ? $matches[1] : null;\n\n return [\n 'name' ", "middle": ")?[^,]*)*collate\\s+[\"\\'`]?(\\w+)/i',\n $sql,\n $matches\n ) === 1 ? strtolower($matches[1]) : null;\n\n $isGenerated = in_array($result->extra, [2, 3]);\n\n $expression = $is", "meta": {"filepath": "src/Illuminate/Database/Query/Processors/SQLiteProcessor.php", "language": "php", "file_size": 3313, "cut_index": 614, "middle_length": 229}} {"prefix": " * The database connection resolver instance.\n *\n * @var \\Illuminate\\Database\\ConnectionResolverInterface\n */\n protected $resolver;\n\n /**\n * The name of the migration table.\n *\n * @var string\n */\n protected $table;\n\n /**\n * The name of the database connection to use.\n *\n * @var string\n */\n protected $connection;\n\n /**\n * Create a new database migration repository instance.\n *\n * @param \\Illuminate\\Database\\ConnectionResolverInterface", "suffix": "tions.\n *\n * @return string[]\n */\n public function getRan()\n {\n return $this->table()\n ->orderBy('batch', 'asc')\n ->orderBy('migration', 'asc')\n ->pluck('migration')->all();\n }\n\n /**\n * Ge", "middle": " $resolver\n * @param string $table\n */\n public function __construct(Resolver $resolver, $table)\n {\n $this->table = $table;\n $this->resolver = $resolver;\n }\n\n /**\n * Get the completed migra", "meta": {"filepath": "src/Illuminate/Database/Migrations/DatabaseMigrationRepository.php", "language": "php", "file_size": 5642, "cut_index": 716, "middle_length": 229}} {"prefix": "filesystem instance.\n *\n * @var \\Illuminate\\Filesystem\\Filesystem\n */\n protected $files;\n\n /**\n * The custom app stubs directory.\n *\n * @var string\n */\n protected $customStubPath;\n\n /**\n * The registered post create hooks.\n *\n * @var (\\Closure(string, string): void)[]\n */\n protected $postCreate = [];\n\n /**\n * Create a new migration creator instance.\n *\n * @param \\Illuminate\\Filesystem\\Filesystem $files\n * @param string $custom", "suffix": "path.\n *\n * @param string $name\n * @param string $path\n * @param string|null $table\n * @param bool $create\n * @return string\n *\n * @throws \\Exception\n */\n public function create($name, $path, $table = null, $c", "middle": "StubPath\n */\n public function __construct(Filesystem $files, $customStubPath)\n {\n $this->files = $files;\n $this->customStubPath = $customStubPath;\n }\n\n /**\n * Create a new migration at the given ", "meta": {"filepath": "src/Illuminate/Database/Migrations/MigrationCreator.php", "language": "php", "file_size": 6092, "cut_index": 716, "middle_length": 229}} {"prefix": "te\\Database\\Migrations;\n\ninterface MigrationRepositoryInterface\n{\n /**\n * Get the completed migrations.\n *\n * @return string[]\n */\n public function getRan();\n\n /**\n * Get the list of migrations.\n *\n * @param int $steps\n * @return object{id: int, migration: string, batch: int}[]\n */\n public function getMigrations($steps);\n\n /**\n * Get the list of the migrations by batch.\n *\n * @param int $batch\n * @return object{id: int, migration: string", "suffix": "\n\n /**\n * Get the completed migrations with their batch numbers.\n *\n * @return array\n */\n public function getMigrationBatches();\n\n /**\n * Log that a migration was run.\n *\n * @param string $file\n * @pa", "middle": ", batch: int}[]\n */\n public function getMigrationsByBatch($batch);\n\n /**\n * Get the last migration batch.\n *\n * @return object{id: int, migration: string, batch: int}[]\n */\n public function getLast();", "meta": {"filepath": "src/Illuminate/Database/Migrations/MigrationRepositoryInterface.php", "language": "php", "file_size": 2006, "cut_index": 537, "middle_length": 229}} {"prefix": " is in the past to the query.\n *\n * @param array|string $columns\n * @return $this\n */\n public function wherePast($columns)\n {\n return $this->wherePastOrFuture($columns, '<', 'and');\n }\n\n /**\n * Add a where clause to determine if a \"date\" column is in the past or now to the query.\n *\n * @param array|string $columns\n * @return $this\n */\n public function whereNowOrPast($columns)\n {\n return $this->wherePastOrFuture($columns, '<=', 'and');\n ", "suffix": " return $this->wherePastOrFuture($columns, '<', 'or');\n }\n\n /**\n * Add a where clause to determine if a \"date\" column is in the past or now to the query.\n *\n * @param array|string $columns\n * @return $this\n */\n public ", "middle": " }\n\n /**\n * Add an \"or where\" clause to determine if a \"date\" column is in the past to the query.\n *\n * @param array|string $columns\n * @return $this\n */\n public function orWherePast($columns)\n {\n", "meta": {"filepath": "src/Illuminate/Database/Concerns/BuildsWhereDateClauses.php", "language": "php", "file_size": 6761, "cut_index": 716, "middle_length": 229}} {"prefix": "te\\Database\\Concerns;\n\nuse Illuminate\\Support\\Collection;\nuse Illuminate\\Support\\Str;\n\ntrait CompilesJsonPaths\n{\n /**\n * Split the given JSON selector into the field and the optional path and wrap them separately.\n *\n * @param string $column\n * @return array\n */\n protected function wrapJsonFieldAndPath($column)\n {\n $parts = explode('->', $column, 2);\n\n $field = $this->wrap($parts[0]);\n\n $path = count($parts) > 1 ? ', '.$this->wrapJsonPath($parts[1], '->') ", "suffix": "e, $delimiter = '->')\n {\n $value = preg_replace(\"/([\\\\\\\\]+)?\\\\'/\", \"''\", $value);\n\n $jsonPath = (new Collection(explode($delimiter, $value)))\n ->map(fn ($segment) => $this->wrapJsonPathSegment($segment))\n ->join('.');", "middle": ": '';\n\n return [$field, $path];\n }\n\n /**\n * Wrap the given JSON path.\n *\n * @param string $value\n * @param string $delimiter\n * @return string\n */\n protected function wrapJsonPath($valu", "meta": {"filepath": "src/Illuminate/Database/Concerns/CompilesJsonPaths.php", "language": "php", "file_size": 1587, "cut_index": 537, "middle_length": 229}} {"prefix": ">', '!=',\n 'like', 'not like', 'ilike',\n '&', '|', '<<', '>>',\n ];\n\n /**\n * Compile the lock into SQL.\n *\n * @param \\Illuminate\\Database\\Query\\Builder $query\n * @param bool|string $value\n * @return string\n */\n protected function compileLock(Builder $query, $value)\n {\n return '';\n }\n\n /**\n * Wrap a union subquery in parentheses.\n *\n * @param string $sql\n * @return string\n */\n protected function wrapUnion($sql)\n {\n ", "suffix": "ted function whereLike(Builder $query, $where)\n {\n if ($where['caseSensitive'] == false) {\n return parent::whereLike($query, $where);\n }\n $where['operator'] = $where['not'] ? 'not glob' : 'glob';\n\n return $this->wh", "middle": " return 'select * from ('.$sql.')';\n }\n\n /**\n * Compile a \"where like\" clause.\n *\n * @param \\Illuminate\\Database\\Query\\Builder $query\n * @param array $where\n * @return string\n */\n protec", "meta": {"filepath": "src/Illuminate/Database/Query/Grammars/SQLiteGrammar.php", "language": "php", "file_size": 14451, "cut_index": 921, "middle_length": 229}} {"prefix": "ion;\nuse Illuminate\\Database\\Query\\Builder;\n\nclass SqlServerProcessor extends Processor\n{\n /**\n * Process an \"insert get ID\" query.\n *\n * @param \\Illuminate\\Database\\Query\\Builder $query\n * @param string $sql\n * @param array $values\n * @param string|null $sequence\n * @return int\n */\n public function processInsertGetId(Builder $query, $sql, $values, $sequence = null)\n {\n $connection = $query->getConnection();\n\n $connection->insert($sql, $values);", "suffix": "ric($id) ? (int) $id : $id;\n }\n\n /**\n * Process an \"insert get ID\" query for ODBC.\n *\n * @param \\Illuminate\\Database\\Connection $connection\n * @return int\n *\n * @throws \\Exception\n */\n protected function processInsert", "middle": "\n\n if ($connection->getConfig('odbc') === true) {\n $id = $this->processInsertGetIdForOdbc($connection);\n } else {\n $id = $connection->getPdo()->lastInsertId();\n }\n\n return is_nume", "meta": {"filepath": "src/Illuminate/Database/Query/Processors/SqlServerProcessor.php", "language": "php", "file_size": 4031, "cut_index": 614, "middle_length": 229}} {"prefix": "ble;\n\n /**\n * Chunk the results of the query.\n *\n * @param int $count\n * @param callable(\\Illuminate\\Support\\Collection, int): mixed $callback\n * @return bool\n */\n public function chunk($count, callable $callback)\n {\n $this->enforceOrderBy();\n\n $skip = $this->getOffset();\n $remaining = $this->getLimit();\n\n $page = 1;\n\n do {\n $offset = (($page - 1) * $count) + (int) $skip;\n\n $limit = is_null($remaining)", "suffix": " if ($countResults == 0) {\n break;\n }\n\n if (! is_null($remaining)) {\n $remaining = max($remaining - $countResults, 0);\n }\n\n if ($callback($results, $page) === false) {\n ", "middle": " ? $count : min($count, $remaining);\n\n if ($limit == 0) {\n break;\n }\n\n $results = $this->offset($offset)->limit($limit)->get();\n\n $countResults = $results->count();\n\n ", "meta": {"filepath": "src/Illuminate/Database/Concerns/BuildsQueries.php", "language": "php", "file_size": 20491, "cut_index": 1331, "middle_length": 229}} {"prefix": "Processor\n{\n /**\n * Process the results of a \"select\" query.\n *\n * @param \\Illuminate\\Database\\Query\\Builder $query\n * @param array $results\n * @return array\n */\n public function processSelect(Builder $query, $results)\n {\n return $results;\n }\n\n /**\n * Process an \"insert get ID\" query.\n *\n * @param \\Illuminate\\Database\\Query\\Builder $query\n * @param string $sql\n * @param array $values\n * @param string|null $sequence\n * @re", "suffix": "($sequence);\n\n return is_numeric($id) ? (int) $id : $id;\n }\n\n /**\n * Process the results of a schemas query.\n *\n * @param list> $results\n * @return listgetConnection()->insert($sql, $values);\n\n $id = $query->getConnection()->getPdo()->lastInsertId", "meta": {"filepath": "src/Illuminate/Database/Query/Processors/Processor.php", "language": "php", "file_size": 4701, "cut_index": 614, "middle_length": 229}} {"prefix": "ymfony\\Component\\Console\\Output\\OutputInterface;\n\nclass Migrator\n{\n /**\n * The event dispatcher instance.\n *\n * @var \\Illuminate\\Contracts\\Events\\Dispatcher\n */\n protected $events;\n\n /**\n * The migration repository implementation.\n *\n * @var \\Illuminate\\Database\\Migrations\\MigrationRepositoryInterface\n */\n protected $repository;\n\n /**\n * The filesystem instance.\n *\n * @var \\Illuminate\\Filesystem\\Filesystem\n */\n protected $files;\n\n /**\n ", "suffix": "minate\\Database\\ConnectionResolverInterface, ?string): \\Illuminate\\Database\\Connection)|null\n */\n protected static $connectionResolverCallback;\n\n /**\n * The name of the default connection.\n *\n * @var string\n */\n protected $conn", "middle": " * The connection resolver instance.\n *\n * @var \\Illuminate\\Database\\ConnectionResolverInterface\n */\n protected $resolver;\n\n /**\n * The custom connection resolver callback.\n *\n * @var (\\Closure(\\Illu", "meta": {"filepath": "src/Illuminate/Database/Migrations/Migrator.php", "language": "php", "file_size": 24412, "cut_index": 1331, "middle_length": 229}} {"prefix": "nnections;\nuse PDO;\nuse Throwable;\n\nclass Connector\n{\n use DetectsLostConnections;\n\n /**\n * The default PDO connection options.\n *\n * @var array\n */\n protected $options = [\n PDO::ATTR_CASE => PDO::CASE_NATURAL,\n PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,\n PDO::ATTR_ORACLE_NULLS => PDO::NULL_NATURAL,\n PDO::ATTR_STRINGIFY_FETCHES => false,\n PDO::ATTR_EMULATE_PREPARES => false,\n ];\n\n /**\n * Create a new PDO connection.\n *\n * @param", "suffix": "ername, $password] = [\n $config['username'] ?? null, $config['password'] ?? null,\n ];\n\n try {\n return $this->createPdoConnection(\n $dsn, $username, $password, $options\n );\n } catch (Excep", "middle": " string $dsn\n * @param array $config\n * @param array $options\n * @return \\PDO\n *\n * @throws \\Exception\n */\n public function createConnection($dsn, array $config, array $options)\n {\n [$us", "meta": {"filepath": "src/Illuminate/Database/Connectors/Connector.php", "language": "php", "file_size": 3134, "cut_index": 614, "middle_length": 229}} {"prefix": "hPath;\n\n /**\n * The default PDO connection options.\n *\n * @var array\n */\n protected $options = [\n PDO::ATTR_CASE => PDO::CASE_NATURAL,\n PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,\n PDO::ATTR_ORACLE_NULLS => PDO::NULL_NATURAL,\n PDO::ATTR_STRINGIFY_FETCHES => false,\n ];\n\n /**\n * Establish a database connection.\n *\n * @param array $config\n * @return \\PDO\n */\n public function connect(array $config)\n {\n // First we'll cre", "suffix": " $connection = $this->createConnection(\n $this->getDsn($config), $config, $this->getOptions($config)\n );\n\n $this->configureIsolationLevel($connection, $config);\n\n // Next, we will check to see if a timezone has been specif", "middle": "ate the basic DSN and connection instance connecting to the\n // using the configuration option specified by the developer. We will also\n // set the default character set on the connections to UTF-8 by default.\n ", "meta": {"filepath": "src/Illuminate/Database/Connectors/PostgresConnector.php", "language": "php", "file_size": 5945, "cut_index": 716, "middle_length": 229}} {"prefix": ".\n *\n * @var array\n */\n protected $options = [\n PDO::ATTR_CASE => PDO::CASE_NATURAL,\n PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,\n PDO::ATTR_ORACLE_NULLS => PDO::NULL_NATURAL,\n PDO::ATTR_STRINGIFY_FETCHES => false,\n ];\n\n /**\n * Establish a database connection.\n *\n * @param array $config\n * @return \\PDO\n */\n public function connect(array $config)\n {\n $options = $this->getOptions($config);\n\n $connection = $this->create", "suffix": "* https://learn.microsoft.com/en-us/sql/t-sql/statements/set-transaction-isolation-level-transact-sql\n *\n * @param \\PDO $connection\n * @param array $config\n * @return void\n */\n protected function configureIsolationLevel($connecti", "middle": "Connection($this->getDsn($config), $config, $options);\n\n $this->configureIsolationLevel($connection, $config);\n\n return $connection;\n }\n\n /**\n * Set the connection transaction isolation level.\n *\n ", "meta": {"filepath": "src/Illuminate/Database/Connectors/SqlServerConnector.php", "language": "php", "file_size": 6605, "cut_index": 716, "middle_length": 229}} {"prefix": "Illuminate\\Broadcasting\\PrivateChannel;\nuse Illuminate\\Contracts\\Broadcasting\\ShouldBroadcast;\nuse Illuminate\\Queue\\SerializesModels;\nuse Illuminate\\Support\\Collection as BaseCollection;\n\nclass BroadcastableModelEventOccurred implements ShouldBroadcast\n{\n use InteractsWithSockets, SerializesModels;\n\n /**\n * The model instance corresponding to the event.\n *\n * @var \\Illuminate\\Database\\Eloquent\\Model\n */\n public $model;\n\n /**\n * The event name (created, updated, etc.).\n *\n", "suffix": "be used to queue the broadcast job.\n *\n * @var string\n */\n public $connection;\n\n /**\n * The queue that should be used to queue the broadcast job.\n *\n * @var string\n */\n public $queue;\n\n /**\n * Indicates whether t", "middle": " * @var string\n */\n protected $event;\n\n /**\n * The channels that the event should be broadcast on.\n *\n * @var array\n */\n protected $channels = [];\n\n /**\n * The queue connection that should ", "meta": {"filepath": "src/Illuminate/Database/Eloquent/BroadcastableModelEventOccurred.php", "language": "php", "file_size": 3303, "cut_index": 614, "middle_length": 229}} {"prefix": " 'torawsql',\n ];\n\n /**\n * Applied global scopes.\n *\n * @var array\n */\n protected $scopes = [];\n\n /**\n * Removed global scopes.\n *\n * @var array\n */\n protected $removedScopes = [];\n\n /**\n * The callbacks that should be invoked after retrieving data from the database.\n *\n * @var array\n */\n protected $afterQueryCallbacks = [];\n\n /**\n * The callbacks that should be invoked on clone.\n *\n * @var array\n */\n protected $onC", "suffix": "query = $query;\n }\n\n /**\n * Create and return an un-saved model instance.\n *\n * @param array $attributes\n * @return TModel\n */\n public function make(array $attributes = [])\n {\n return $this->newModelInstance($attrib", "middle": "loneCallbacks = [];\n\n /**\n * Create a new Eloquent query builder instance.\n *\n * @param \\Illuminate\\Database\\Query\\Builder $query\n */\n public function __construct(QueryBuilder $query)\n {\n $this->", "meta": {"filepath": "src/Illuminate/Database/Eloquent/Builder.php", "language": "php", "file_size": 68428, "cut_index": 3790, "middle_length": 229}} {"prefix": "\n * @template TBuilder of \\Illuminate\\Database\\Eloquent\\Builder\n */\ntrait HasBuilder\n{\n /**\n * Begin querying the model.\n *\n * @return TBuilder\n */\n public static function query()\n {\n return parent::query();\n }\n\n /**\n * Create a new Eloquent query builder for the model.\n *\n * @param \\Illuminate\\Database\\Query\\Builder $query\n * @return TBuilder\n */\n public function newEloquentBuilder($query)\n {\n return parent::newEloquentBuilder($query)", "suffix": "hat doesn't have any global scopes or eager loading.\n *\n * @return TBuilder\n */\n public function newModelQuery()\n {\n return parent::newModelQuery();\n }\n\n /**\n * Get a new query builder with no relationships loaded.\n *", "middle": ";\n }\n\n /**\n * Get a new query builder for the model's table.\n *\n * @return TBuilder\n */\n public function newQuery()\n {\n return parent::newQuery();\n }\n\n /**\n * Get a new query builder t", "meta": {"filepath": "src/Illuminate/Database/Eloquent/HasBuilder.php", "language": "php", "file_size": 2662, "cut_index": 563, "middle_length": 229}} {"prefix": "Connection;\nuse Illuminate\\Database\\PostgresConnection;\nuse Illuminate\\Database\\SQLiteConnection;\nuse Illuminate\\Database\\SqlServerConnection;\nuse Illuminate\\Support\\Arr;\nuse InvalidArgumentException;\nuse PDOException;\n\nclass ConnectionFactory\n{\n /**\n * The IoC container instance.\n *\n * @var \\Illuminate\\Contracts\\Container\\Container\n */\n protected $container;\n\n /**\n * Create a new connection factory instance.\n *\n * @param \\Illuminate\\Contracts\\Container\\Container $cont", "suffix": " * @param string|null $name\n * @return \\Illuminate\\Database\\Connection\n */\n public function make(array $config, $name = null)\n {\n $config = $this->parseConfig($config, $name);\n\n if (isset($config['read'])) {\n retu", "middle": "ainer\n */\n public function __construct(Container $container)\n {\n $this->container = $container;\n }\n\n /**\n * Establish a PDO connection based on the configuration.\n *\n * @param array $config\n ", "meta": {"filepath": "src/Illuminate/Database/Connectors/ConnectionFactory.php", "language": "php", "file_size": 8133, "cut_index": 716, "middle_length": 229}} {"prefix": "ception;\n\nclass SQLiteConnector extends Connector implements ConnectorInterface\n{\n /**\n * Establish a database connection.\n *\n * @param array $config\n * @return \\PDO\n */\n public function connect(array $config)\n {\n $options = $this->getOptions($config);\n\n $path = $this->parseDatabasePath($config['database']);\n\n $connection = $this->createConnection(\"sqlite:{$path}\", $config, $options);\n\n $this->configurePragmas($connection, $config);\n $this->c", "suffix": "\n\n return $connection;\n }\n\n /**\n * Get the absolute database path.\n *\n * @param string $path\n * @return string\n *\n * @throws \\Illuminate\\Database\\SQLiteDatabaseDoesNotExistException\n */\n protected function pars", "middle": "onfigureForeignKeyConstraints($connection, $config);\n $this->configureBusyTimeout($connection, $config);\n $this->configureJournalMode($connection, $config);\n $this->configureSynchronous($connection, $config);", "meta": {"filepath": "src/Illuminate/Database/Connectors/SQLiteConnector.php", "language": "php", "file_size": 4354, "cut_index": 614, "middle_length": 229}} {"prefix": " function bootBroadcastsEvents()\n {\n static::created(function ($model) {\n $model->broadcastCreated();\n });\n\n static::updated(function ($model) {\n $model->broadcastUpdated();\n });\n\n if (method_exists(static::class, 'bootSoftDeletes')) {\n static::softDeleted(function ($model) {\n $model->broadcastTrashed();\n });\n\n static::restored(function ($model) {\n $model->broadcastRestored();\n ", "suffix": "\\Illuminate\\Contracts\\Broadcasting\\HasBroadcastChannel|array|null $channels\n * @return \\Illuminate\\Broadcasting\\PendingBroadcast\n */\n public function broadcastCreated($channels = null)\n {\n return $this->broadcastIfBroadcastChannelsExi", "middle": " });\n }\n\n static::deleted(function ($model) {\n $model->broadcastDeleted();\n });\n }\n\n /**\n * Broadcast that the model was created.\n *\n * @param \\Illuminate\\Broadcasting\\Channel|", "meta": {"filepath": "src/Illuminate/Database/Eloquent/BroadcastsEvents.php", "language": "php", "file_size": 5796, "cut_index": 716, "middle_length": 229}} {"prefix": "te\\Database\\Eloquent;\n\nuse Illuminate\\Database\\Eloquent\\Attributes\\CollectedBy;\nuse ReflectionClass;\n\n/**\n * @template TCollection of \\Illuminate\\Database\\Eloquent\\Collection\n */\ntrait HasCollection\n{\n /**\n * The resolved collection class names by model.\n *\n * @var array, class-string>\n */\n protected static array $resolvedCollectionClasses = [];\n\n /**\n * Create a new Eloquent Collection instance.\n *\n * @param arraywithRelationshipAutoloading();\n }\n\n ", "middle": "e\\Database\\Eloquent\\Model> $models\n * @return TCollection\n */\n public function newCollection(array $models = [])\n {\n static::$resolvedCollectionClasses[static::class] ??= ($this->resolveCollectionFromAttribu", "meta": {"filepath": "src/Illuminate/Database/Eloquent/HasCollection.php", "language": "php", "file_size": 1645, "cut_index": 537, "middle_length": 229}} {"prefix": " is (\\Illuminate\\Contracts\\Support\\Arrayable|array) ? static : TModel|TFindDefault)\n */\n public function find($key, $default = null)\n {\n if ($key instanceof Model) {\n $key = $key->getKey();\n }\n\n if ($key instanceof Arrayable) {\n $key = $key->toArray();\n }\n\n if (is_array($key)) {\n if ($this->isEmpty()) {\n return new static;\n }\n\n return $this->whereIn($this->first()->getK", "suffix": "d $key\n * @return TModel\n *\n * @throws \\Illuminate\\Database\\Eloquent\\ModelNotFoundException\n */\n public function findOrFail($key)\n {\n $result = $this->find($key);\n\n if (is_array($key) && count($result) === count(array_u", "middle": "eyName(), $key);\n }\n\n return Arr::first($this->items, fn ($model) => $model->getKey() == $key, $default);\n }\n\n /**\n * Find a model in the collection by key or throw an exception.\n *\n * @param mixe", "meta": {"filepath": "src/Illuminate/Database/Eloquent/Collection.php", "language": "php", "file_size": 26087, "cut_index": 1331, "middle_length": 229}} {"prefix": "lements ConnectorInterface\n{\n /**\n * Establish a database connection.\n *\n * @param array $config\n * @return \\PDO\n */\n public function connect(array $config)\n {\n $dsn = $this->getDsn($config);\n\n $options = $this->getOptions($config);\n\n // We need to grab the PDO options that should be used while making the brand\n // new connection instance. The PDO options control various aspects of the\n // connection's behavior, and some might be specified by", "suffix": "connecting'])) {\n $connection->exec(\"use `{$config['database']}`;\");\n }\n\n $this->configureConnection($connection, $config);\n\n return $connection;\n }\n\n /**\n * Create a DSN string from a configuration.\n *\n * ", "middle": " the developers.\n $connection = $this->createConnection($dsn, $config, $options);\n\n if (! empty($config['database']) &&\n (! isset($config['use_db_after_connecting']) ||\n $config['use_db_after_", "meta": {"filepath": "src/Illuminate/Database/Connectors/MySqlConnector.php", "language": "php", "file_size": 4538, "cut_index": 614, "middle_length": 229}} {"prefix": "e\\Eloquent;\n\nuse RuntimeException;\n\nclass InvalidCastException extends RuntimeException\n{\n /**\n * The name of the affected Eloquent model.\n *\n * @var string\n */\n public $model;\n\n /**\n * The name of the column.\n *\n * @var string\n */\n public $column;\n\n /**\n * The name of the cast type.\n *\n * @var string\n */\n public $castType;\n\n /**\n * Create a new exception instance.\n *\n * @param object $model\n * @param string $column\n ", "suffix": "ction __construct($model, $column, $castType)\n {\n $class = get_class($model);\n\n parent::__construct(\"Call to undefined cast [{$castType}] on column [{$column}] in model [{$class}].\");\n\n $this->model = $class;\n $this->column =", "middle": " * @param string $castType\n */\n public fun", "meta": {"filepath": "src/Illuminate/Database/Eloquent/InvalidCastException.php", "language": "php", "file_size": 910, "cut_index": 547, "middle_length": 52}} {"prefix": "\nnamespace Illuminate\\Database\\Eloquent;\n\nuse Illuminate\\Database\\Events\\ModelsPruned;\nuse LogicException;\n\ntrait MassPrunable\n{\n /**\n * Prune all prunable models in the database.\n *\n * @param int $chunkSize\n * @return int\n */\n public function pruneAll(int $chunkSize = 1000)\n {\n $query = tap($this->prunable(), function ($query) use ($chunkSize) {\n $query->when(! $query->getQuery()->limit, function ($query) use ($chunkSize) {\n $query->limit($chu", "suffix": "$query->delete();\n\n if ($count > 0) {\n event(new ModelsPruned(static::class, $total));\n }\n } while ($count > 0);\n\n return $total;\n }\n\n /**\n * Get the prunable model query.\n *\n * @return \\", "middle": "nkSize);\n });\n });\n\n $total = 0;\n\n $softDeletable = static::isSoftDeletable();\n\n do {\n $total += $count = $softDeletable\n ? $query->forceDelete()\n : ", "meta": {"filepath": "src/Illuminate/Database/Eloquent/MassPrunable.php", "language": "php", "file_size": 1228, "cut_index": 518, "middle_length": 229}} {"prefix": "yable;\nuse InvalidArgumentException;\nuse LogicException;\n\n/**\n * @implements Arrayable\n *\n * @internal\n */\nclass ModelInfo implements Arrayable, ArrayAccess\n{\n /**\n * @template TModel of \\Illuminate\\Database\\Eloquent\\Model\n *\n * @param class-string $class The model's fully-qualified class.\n * @param string $database The database connection name.\n * @param string $table The database table name.\n * @param class-string|null $policy The policy that a", "suffix": "g, related: class-string<\\Illuminate\\Database\\Eloquent\\Model>}> $relations The relations defined on the model.\n * @param \\Illuminate\\Support\\Collection $events The events that the model dispatches.\n * ", "middle": "pplies to the model.\n * @param \\Illuminate\\Support\\Collection> $attributes The attributes available on the model.\n * @param \\Illuminate\\Support\\Collection\n */\n protected $model;\n\n /**\n * The affected model IDs.\n *\n * @var array\n */\n prote", "suffix": "on setModel($model, $ids = [])\n {\n $this->model = $model;\n\n $this->ids = array_map(enum_value(...), Arr::wrap($ids));\n\n $this->message = \"No query results for model [{$model}]\";\n\n if ($this->ids !== []) {\n $this->m", "middle": "cted $ids;\n\n /**\n * Set the affected Eloquent model and instance ids.\n *\n * @param class-string $model\n * @param array|int|string $ids\n * @return $this\n */\n public functi", "meta": {"filepath": "src/Illuminate/Database/Eloquent/ModelNotFoundException.php", "language": "php", "file_size": 1489, "cut_index": 524, "middle_length": 229}} {"prefix": "te\\Database\\Eloquent;\n\nuse Illuminate\\Contracts\\Debug\\ExceptionHandler;\nuse Illuminate\\Database\\Events\\ModelsPruned;\nuse LogicException;\nuse Throwable;\n\ntrait Prunable\n{\n /**\n * Prune all prunable models in the database.\n *\n * @param int $chunkSize\n * @return int\n *\n * @throws \\Throwable\n */\n public function pruneAll(int $chunkSize = 1000)\n {\n $total = 0;\n\n $this->prunable()\n ->when(static::isSoftDeletable(), function ($query) {\n ", "suffix": " $total++;\n } catch (Throwable $e) {\n $handler = app(ExceptionHandler::class);\n\n if ($handler) {\n $handler->report($e);\n ", "middle": " $query->withTrashed();\n })->chunkById($chunkSize, function ($models) use (&$total) {\n $models->each(function ($model) use (&$total) {\n try {\n $model->prune();\n\n", "meta": {"filepath": "src/Illuminate/Database/Eloquent/Prunable.php", "language": "php", "file_size": 1946, "cut_index": 537, "middle_length": 229}} {"prefix": "atabase\\Eloquent\\Builder withTrashed(bool $withTrashed = true)\n * @method static \\Illuminate\\Database\\Eloquent\\Builder onlyTrashed()\n * @method static \\Illuminate\\Database\\Eloquent\\Builder withoutTrashed()\n * @method static static restoreOrCreate(array $attributes = [], array $values = [])\n * @method static static createOrRestore(array $attributes = [], array $values = [])\n */\ntrait SoftDeletes\n{\n /**\n * Indicates if ", "suffix": "bootSoftDeletes()\n {\n static::addGlobalScope(new SoftDeletingScope);\n }\n\n /**\n * Initialize the soft deleting trait for an instance.\n *\n * @return void\n */\n public function initializeSoftDeletes()\n {\n if (! isse", "middle": "the model is currently force deleting.\n *\n * @var bool\n */\n protected $forceDeleting = false;\n\n /**\n * Boot the soft deleting trait for a model.\n *\n * @return void\n */\n public static function ", "meta": {"filepath": "src/Illuminate/Database/Eloquent/SoftDeletes.php", "language": "php", "file_size": 7936, "cut_index": 716, "middle_length": 229}} {"prefix": "\\DatabaseManager;\nuse Illuminate\\Database\\Eloquent\\Model as Eloquent;\nuse Illuminate\\Support\\Traits\\CapsuleManagerTrait;\nuse PDO;\n\nclass Manager\n{\n use CapsuleManagerTrait;\n\n /**\n * The database manager instance.\n *\n * @var \\Illuminate\\Database\\DatabaseManager\n */\n protected $manager;\n\n /**\n * Create a new database capsule manager.\n *\n * @param \\Illuminate\\Container\\Container|null $container\n */\n public function __construct(?Container $container = null)\n {", "suffix": " // manager work correctly out of the box without extreme configuration.\n $this->setupDefaultConfiguration();\n\n $this->setupManager();\n }\n\n /**\n * Setup the default database configuration options.\n *\n * @return void\n ", "middle": "\n $this->setupContainer($container ?: new Container);\n\n // Once we have the container setup, we will setup the default configuration\n // options in the container \"config\" binding. This will make the database\n", "meta": {"filepath": "src/Illuminate/Database/Capsule/Manager.php", "language": "php", "file_size": 5357, "cut_index": 716, "middle_length": 229}} {"prefix": " /**\n * The number of models to return for pagination.\n *\n * @var int\n */\n protected $perPage = 15;\n\n /**\n * Indicates if the model exists.\n *\n * @var bool\n */\n public $exists = false;\n\n /**\n * Indicates if the model was inserted during the object's lifecycle.\n *\n * @var bool\n */\n public $wasRecentlyCreated = false;\n\n /**\n * Indicates that the object's string representation should be escaped when __toString is invoked.\n *\n * @var ", "suffix": "\n * The event dispatcher instance.\n *\n * @var \\Illuminate\\Contracts\\Events\\Dispatcher|null\n */\n protected static $dispatcher;\n\n /**\n * The models that are currently being booted.\n *\n * @var array\n */\n protected stat", "middle": "bool\n */\n protected $escapeWhenCastingToString = false;\n\n /**\n * The connection resolver instance.\n *\n * @var \\Illuminate\\Database\\ConnectionResolverInterface\n */\n protected static $resolver;\n\n /**", "meta": {"filepath": "src/Illuminate/Database/Eloquent/Model.php", "language": "php", "file_size": 79641, "cut_index": 3790, "middle_length": 229}} {"prefix": "oquent\\Relations\\HasMany;\nuse Illuminate\\Database\\Eloquent\\Relations\\MorphOneOrMany;\nuse Illuminate\\Support\\Str;\nuse Illuminate\\Support\\Stringable;\n\n/**\n * @template TIntermediateModel of \\Illuminate\\Database\\Eloquent\\Model\n * @template TDeclaringModel of \\Illuminate\\Database\\Eloquent\\Model\n * @template TLocalRelationship of \\Illuminate\\Database\\Eloquent\\Relations\\HasOneOrMany\n */\nclass PendingHasThroughRelationship\n{\n /**\n * The root model that the relationship e", "suffix": "ng has-many-through or has-one-through relationship.\n *\n * @param TDeclaringModel $rootModel\n * @param TLocalRelationship $localRelationship\n */\n public function __construct($rootModel, $localRelationship)\n {\n $this->rootMo", "middle": "xists on.\n *\n * @var TDeclaringModel\n */\n protected $rootModel;\n\n /**\n * The local relationship.\n *\n * @var TLocalRelationship\n */\n protected $localRelationship;\n\n /**\n * Create a pendi", "meta": {"filepath": "src/Illuminate/Database/Eloquent/PendingHasThroughRelationship.php", "language": "php", "file_size": 4750, "cut_index": 614, "middle_length": 229}} {"prefix": "model = $class;\n $instance->relation = $relation;\n\n return $instance;\n ", "middle": " */\n public static function make($model, $relation, $type = null)\n {\n $class = get_class($model);\n\n $instance = new static(\n is_null($type)\n ? \"Call to undefined relationship [{$r", "meta": {"filepath": "src/Illuminate/Database/Eloquent/RelationNotFoundException.php", "language": "php", "file_size": 1001, "cut_index": 512, "middle_length": 229}} {"prefix": "nt\\Model\n *\n * @implements \\Illuminate\\Database\\Eloquent\\Scope\n */\nclass SoftDeletingScope implements Scope\n{\n /**\n * All of the extensions to be added to the builder.\n *\n * @var string[]\n */\n protected $extensions = ['Restore', 'RestoreOrCreate', 'CreateOrRestore', 'WithTrashed', 'WithoutTrashed', 'OnlyTrashed'];\n\n /**\n * Apply the scope to a given Eloquent query builder.\n *\n * @param \\Illuminate\\Database\\Eloquent\\Builder $builder\n * @param TModel", "suffix": "ed functions.\n *\n * @param \\Illuminate\\Database\\Eloquent\\Builder<*> $builder\n * @return void\n */\n public function extend(Builder $builder)\n {\n foreach ($this->extensions as $extension) {\n $this->{\"add{$extension}\"}", "middle": " $model\n * @return void\n */\n public function apply(Builder $builder, Model $model)\n {\n $builder->whereNull($model->getQualifiedDeletedAtColumn());\n }\n\n /**\n * Extend the query builder with the need", "meta": {"filepath": "src/Illuminate/Database/Eloquent/SoftDeletingScope.php", "language": "php", "file_size": 4895, "cut_index": 614, "middle_length": 229}} {"prefix": "pace Illuminate\\Database\\Eloquent\\Casts;\n\nuse Illuminate\\Contracts\\Database\\Eloquent\\Castable;\nuse Illuminate\\Contracts\\Database\\Eloquent\\CastsAttributes;\n\nclass AsArrayObject implements Castable\n{\n /**\n * Get the caster class to use when casting from / to this cast target.\n *\n * @param array $arguments\n * @return \\Illuminate\\Contracts\\Database\\Eloquent\\CastsAttributes<\\Illuminate\\Database\\Eloquent\\Casts\\ArrayObject, iterable>\n */\n public static function castUsi", "suffix": " return;\n }\n\n $data = Json::decode($attributes[$key]);\n\n return is_array($data) ? new ArrayObject($data, ArrayObject::ARRAY_AS_PROPS) : null;\n }\n\n public function set($model, $key", "middle": "ng(array $arguments)\n {\n return new class implements CastsAttributes\n {\n public function get($model, $key, $value, $attributes)\n {\n if (! isset($attributes[$key])) {\n ", "meta": {"filepath": "src/Illuminate/Database/Eloquent/Casts/AsArrayObject.php", "language": "php", "file_size": 1296, "cut_index": 524, "middle_length": 229}} {"prefix": ";\n\nuse Illuminate\\Contracts\\Database\\Eloquent\\Castable;\nuse Illuminate\\Contracts\\Database\\Eloquent\\CastsAttributes;\nuse Illuminate\\Support\\BinaryCodec;\nuse InvalidArgumentException;\n\nclass AsBinary implements Castable\n{\n /**\n * Get the caster class to use when casting from / to this cast target.\n *\n * @param array{string} $arguments\n * @return \\Illuminate\\Contracts\\Database\\Eloquent\\CastsAttributes\n *\n * @throws \\InvalidArgumentException\n */\n public static function castUs", "suffix": " $this->format = $this->arguments[0]\n ?? throw new InvalidArgumentException('The binary codec format is required.');\n\n if (! in_array($this->format, BinaryCodec::formats(), true)) {\n throw new I", "middle": "ing(array $arguments)\n {\n return new class($arguments) implements CastsAttributes\n {\n protected string $format;\n\n public function __construct(protected array $arguments)\n {\n ", "meta": {"filepath": "src/Illuminate/Database/Eloquent/Casts/AsBinary.php", "language": "php", "file_size": 2188, "cut_index": 563, "middle_length": 229}} {"prefix": "ble;\nuse Illuminate\\Contracts\\Database\\Eloquent\\CastsAttributes;\nuse Illuminate\\Support\\Collection;\nuse Illuminate\\Support\\Facades\\Crypt;\nuse Illuminate\\Support\\Str;\nuse InvalidArgumentException;\n\nclass AsEncryptedCollection implements Castable\n{\n /**\n * Get the caster class to use when casting from / to this cast target.\n *\n * @param array $arguments\n * @return \\Illuminate\\Contracts\\Database\\Eloquent\\CastsAttributes<\\Illuminate\\Support\\Collection, iterable>\n *\n ", "suffix": "d array $arguments)\n {\n $this->arguments = array_pad(array_values($this->arguments), 2, '');\n }\n\n public function get($model, $key, $value, $attributes)\n {\n $collectionClass = empty(", "middle": " * @throws \\InvalidArgumentException\n */\n public static function castUsing(array $arguments)\n {\n return new class($arguments) implements CastsAttributes\n {\n public function __construct(protecte", "meta": {"filepath": "src/Illuminate/Database/Eloquent/Casts/AsEncryptedCollection.php", "language": "php", "file_size": 3051, "cut_index": 614, "middle_length": 229}} {"prefix": ";\n\nuse BackedEnum;\nuse Illuminate\\Contracts\\Database\\Eloquent\\Castable;\nuse Illuminate\\Contracts\\Database\\Eloquent\\CastsAttributes;\nuse Illuminate\\Support\\Collection;\n\nuse function Illuminate\\Support\\enum_value;\n\nclass AsEnumCollection implements Castable\n{\n /**\n * Get the caster class to use when casting from / to this cast target.\n *\n * @template TEnum of \\UnitEnum\n *\n * @param array{class-string} $arguments\n * @return \\Illuminate\\Contracts\\Database\\Eloquent\\CastsAttrib", "suffix": "otected $arguments;\n\n public function __construct(array $arguments)\n {\n $this->arguments = $arguments;\n }\n\n public function get($model, $key, $value, $attributes)\n {\n if (", "middle": "utes<\\Illuminate\\Support\\Collection, iterable>\n */\n public static function castUsing(array $arguments)\n {\n return new class($arguments) implements CastsAttributes\n {\n pr", "meta": {"filepath": "src/Illuminate/Database/Eloquent/Casts/AsEnumCollection.php", "language": "php", "file_size": 2770, "cut_index": 563, "middle_length": 229}} {"prefix": "ontracts\\Database\\Eloquent\\Castable;\nuse Illuminate\\Contracts\\Database\\Eloquent\\CastsAttributes;\nuse Illuminate\\Support\\Fluent;\n\nclass AsFluent implements Castable\n{\n /**\n * Get the caster class to use when casting from / to this cast target.\n *\n * @param array $arguments\n * @return \\Illuminate\\Contracts\\Database\\Eloquent\\CastsAttributes<\\Illuminate\\Support\\Fluent, string>\n */\n public static function castUsing(array $arguments)\n {\n return new class implements CastsAttri", "suffix": "el, $key, $value, $attributes)\n {\n return isset($value) ? new Fluent(Json::decode($value)) : null;\n }\n\n public function set($model, $key, $value, $attributes)\n {\n return isset($value", "middle": "butes\n {\n public function get($mod", "meta": {"filepath": "src/Illuminate/Database/Eloquent/Casts/AsFluent.php", "language": "php", "file_size": 966, "cut_index": 582, "middle_length": 52}} {"prefix": "nt\\Castable;\nuse Illuminate\\Contracts\\Database\\Eloquent\\CastsAttributes;\nuse Illuminate\\Support\\Uri;\n\nclass AsUri implements Castable\n{\n /**\n * Get the caster class to use when casting from / to this cast target.\n *\n * @param array $arguments\n * @return \\Illuminate\\Contracts\\Database\\Eloquent\\CastsAttributes<\\Illuminate\\Support\\Uri, string|Uri>\n */\n public static function castUsing(array $arguments)\n {\n return new class implements CastsAttributes\n {\n p", "suffix": ")\n {\n return isset($value) ? new Uri($value) : null;\n }\n\n public function set($model, $key, $value, $attributes)\n {\n return isset($value) ? (string) $value : null;\n }\n ", "middle": "ublic function get($model, $key, $value, $attributes", "meta": {"filepath": "src/Illuminate/Database/Eloquent/Casts/AsUri.php", "language": "php", "file_size": 929, "cut_index": 606, "middle_length": 52}} {"prefix": "delInspector\n{\n /**\n * The methods that can be called in a model to indicate a relation.\n *\n * @var list\n */\n protected $relationMethods = [\n 'hasMany',\n 'hasManyThrough',\n 'hasOneThrough',\n 'belongsToMany',\n 'hasOne',\n 'belongsTo',\n 'morphOne',\n 'morphTo',\n 'morphMany',\n 'morphToMany',\n 'morphedByMany',\n ];\n\n /**\n * Create a new model inspector instance.\n *\n * @param \\Illuminate\\Con", "suffix": "m class-string<\\Illuminate\\Database\\Eloquent\\Model>|string $model\n * @param string|null $connection\n * @return \\Illuminate\\Database\\Eloquent\\ModelInfo\n *\n * @throws \\Illuminate\\Contracts\\Container\\BindingResolutionException\n */\n ", "middle": "tracts\\Foundation\\Application $app The Laravel application instance.\n */\n public function __construct(protected Application $app)\n {\n }\n\n /**\n * Extract model details for the given model.\n *\n * @para", "meta": {"filepath": "src/Illuminate/Database/Eloquent/ModelInspector.php", "language": "php", "file_size": 13363, "cut_index": 921, "middle_length": 229}} {"prefix": "pace Illuminate\\Database\\Eloquent;\n\nuse RuntimeException;\n\nclass JsonEncodingException extends RuntimeException\n{\n /**\n * Create a new JSON encoding exception for the model.\n *\n * @param mixed $model\n * @param string $message\n * @return static\n */\n public static function forModel($model, $message)\n {\n return new static('Error encoding model ['.get_class($model).'] with ID ['.$model->getKey().'] to JSON: '.$message);\n }\n\n /**\n * Create a new JSON encoding", "suffix": " {\n $model = $resource->resource;\n\n return new static('Error encoding resource ['.get_class($resource).'] with model ['.get_class($model).'] with ID ['.$model->getKey().'] to JSON: '.$message);\n }\n\n /**\n * Create a new JSON encod", "middle": " exception for the resource.\n *\n * @param \\Illuminate\\Http\\Resources\\Json\\JsonResource $resource\n * @param string $message\n * @return static\n */\n public static function forResource($resource, $message)\n", "meta": {"filepath": "src/Illuminate/Database/Eloquent/JsonEncodingException.php", "language": "php", "file_size": 1389, "cut_index": 524, "middle_length": 229}} {"prefix": ";\n\nuse Illuminate\\Contracts\\Database\\Eloquent\\Castable;\nuse Illuminate\\Contracts\\Database\\Eloquent\\CastsAttributes;\nuse Illuminate\\Support\\Collection;\nuse Illuminate\\Support\\Str;\nuse InvalidArgumentException;\n\nclass AsCollection implements Castable\n{\n /**\n * Get the caster class to use when casting from / to this cast target.\n *\n * @param array $arguments\n * @return \\Illuminate\\Contracts\\Database\\Eloquent\\CastsAttributes<\\Illuminate\\Support\\Collection, iterable>\n *", "suffix": "ected array $arguments)\n {\n $this->arguments = array_pad(array_values($this->arguments), 2, '');\n }\n\n public function get($model, $key, $value, $attributes)\n {\n if (! isset($attribut", "middle": "\n * @throws \\InvalidArgumentException\n */\n public static function castUsing(array $arguments)\n {\n return new class($arguments) implements CastsAttributes\n {\n public function __construct(prot", "meta": {"filepath": "src/Illuminate/Database/Eloquent/Casts/AsCollection.php", "language": "php", "file_size": 2992, "cut_index": 563, "middle_length": 229}} {"prefix": ";\n\nuse BackedEnum;\nuse Illuminate\\Contracts\\Database\\Eloquent\\Castable;\nuse Illuminate\\Contracts\\Database\\Eloquent\\CastsAttributes;\nuse Illuminate\\Support\\Collection;\n\nuse function Illuminate\\Support\\enum_value;\n\nclass AsEnumArrayObject implements Castable\n{\n /**\n * Get the caster class to use when casting from / to this cast target.\n *\n * @template TEnum of \\UnitEnum\n *\n * @param array{class-string} $arguments\n * @return \\Illuminate\\Contracts\\Database\\Eloquent\\CastsAttri", "suffix": " {\n protected $arguments;\n\n public function __construct(array $arguments)\n {\n $this->arguments = $arguments;\n }\n\n public function get($model, $key, $value, $attributes)\n {\n ", "middle": "butes<\\Illuminate\\Database\\Eloquent\\Casts\\ArrayObject, iterable>\n */\n public static function castUsing(array $arguments)\n {\n return new class($arguments) implements CastsAttributes\n ", "meta": {"filepath": "src/Illuminate/Database/Eloquent/Casts/AsEnumArrayObject.php", "language": "php", "file_size": 2854, "cut_index": 563, "middle_length": 229}} {"prefix": "ontracts\\Database\\Eloquent\\Castable;\nuse Illuminate\\Contracts\\Database\\Eloquent\\CastsAttributes;\nuse Illuminate\\Support\\HtmlString;\n\nclass AsHtmlString implements Castable\n{\n /**\n * Get the caster class to use when casting from / to this cast target.\n *\n * @param array $arguments\n * @return \\Illuminate\\Contracts\\Database\\Eloquent\\CastsAttributes<\\Illuminate\\Support\\HtmlString, string|HtmlString>\n */\n public static function castUsing(array $arguments)\n {\n return new clas", "suffix": "ublic function get($model, $key, $value, $attributes)\n {\n return isset($value) ? new HtmlString($value) : null;\n }\n\n public function set($model, $key, $value, $attributes)\n {\n return", "middle": "s implements CastsAttributes\n {\n p", "meta": {"filepath": "src/Illuminate/Database/Eloquent/Casts/AsHtmlString.php", "language": "php", "file_size": 964, "cut_index": 582, "middle_length": 52}} {"prefix": "e Illuminate\\Database\\Eloquent\\Model;\nuse Illuminate\\Support\\Str;\n\n/**\n * @template TRelatedModel of \\Illuminate\\Database\\Eloquent\\Model\n * @template TDeclaringModel of \\Illuminate\\Database\\Eloquent\\Model\n * @template TResult\n *\n * @extends \\Illuminate\\Database\\Eloquent\\Relations\\HasOneOrMany\n */\nabstract class MorphOneOrMany extends HasOneOrMany\n{\n /**\n * The foreign key type for the relationship.\n *\n * @var string\n */\n protected $morphType;\n\n ", "suffix": "ram \\Illuminate\\Database\\Eloquent\\Builder $query\n * @param TDeclaringModel $parent\n * @param string $type\n * @param string $id\n * @param string $localKey\n */\n public function __construct(Builder $query, Model", "middle": " /**\n * The morph class of the parent model.\n *\n * @var class-string|string\n */\n protected $morphClass;\n\n /**\n * Create a new morph one or many relationship instance.\n *\n * @pa", "meta": {"filepath": "src/Illuminate/Database/Eloquent/Relations/MorphOneOrMany.php", "language": "php", "file_size": 4804, "cut_index": 614, "middle_length": 229}} {"prefix": "pace Illuminate\\Database\\Eloquent\\Factories;\n\nuse Countable;\n\nclass Sequence implements Countable\n{\n /**\n * The sequence of return values.\n *\n * @var array\n */\n protected $sequence;\n\n /**\n * The count of the sequence items.\n *\n * @var int\n */\n public $count;\n\n /**\n * The current index of the sequence iteration.\n *\n * @var int\n */\n public $index = 0;\n\n /**\n * Create a new sequence instance.\n *\n * @param mixed ...$sequence\n ", "suffix": " */\n public function count(): int\n {\n return $this->count;\n }\n\n /**\n * Get the next value in the sequence.\n *\n * @param array $attributes\n * @param \\Illuminate\\Database\\Eloquent\\Model|null $parent\n ", "middle": " */\n public function __construct(...$sequence)\n {\n $this->sequence = $sequence;\n $this->count = count($sequence);\n }\n\n /**\n * Get the current count of the sequence items.\n *\n * @return int\n ", "meta": {"filepath": "src/Illuminate/Database/Eloquent/Factories/Sequence.php", "language": "php", "file_size": 1284, "cut_index": 524, "middle_length": 229}} {"prefix": "pace Illuminate\\Database\\Eloquent\\Casts;\n\nuse Illuminate\\Contracts\\Database\\Eloquent\\Castable;\nuse Illuminate\\Contracts\\Database\\Eloquent\\CastsAttributes;\nuse Illuminate\\Support\\Facades\\Crypt;\n\nclass AsEncryptedArrayObject implements Castable\n{\n /**\n * Get the caster class to use when casting from / to this cast target.\n *\n * @param array $arguments\n * @return \\Illuminate\\Contracts\\Database\\Eloquent\\CastsAttributes<\\Illuminate\\Database\\Eloquent\\Casts\\ArrayObject, itera", "suffix": " if (isset($attributes[$key])) {\n return new ArrayObject(Json::decode(Crypt::decryptString($attributes[$key])), ArrayObject::ARRAY_AS_PROPS);\n }\n\n return null;\n }\n\n public function s", "middle": "ble>\n */\n public static function castUsing(array $arguments)\n {\n return new class implements CastsAttributes\n {\n public function get($model, $key, $value, $attributes)\n {\n ", "meta": {"filepath": "src/Illuminate/Database/Eloquent/Casts/AsEncryptedArrayObject.php", "language": "php", "file_size": 1453, "cut_index": 524, "middle_length": 229}} {"prefix": "te\\Database\\Eloquent\\Casts;\n\nclass Attribute\n{\n /**\n * The attribute accessor.\n *\n * @var callable\n */\n public $get;\n\n /**\n * The attribute mutator.\n *\n * @var callable\n */\n public $set;\n\n /**\n * Indicates if caching is enabled for this attribute.\n *\n * @var bool\n */\n public $withCaching = false;\n\n /**\n * Indicates if caching of objects is enabled for this attribute.\n *\n * @var bool\n */\n public $withObjectCaching = true;", "suffix": " $this->get = $get;\n $this->set = $set;\n }\n\n /**\n * Create a new attribute accessor / mutator.\n *\n * @param callable|null $get\n * @param callable|null $set\n * @return static\n */\n public static function mak", "middle": "\n\n /**\n * Create a new attribute accessor / mutator.\n *\n * @param callable|null $get\n * @param callable|null $set\n */\n public function __construct(?callable $get = null, ?callable $set = null)\n {\n", "meta": {"filepath": "src/Illuminate/Database/Eloquent/Casts/Attribute.php", "language": "php", "file_size": 1954, "cut_index": 537, "middle_length": 229}} {"prefix": "tes\\Initialize;\nuse Illuminate\\Database\\Eloquent\\Attributes\\Unguarded;\n\ntrait GuardsAttributes\n{\n /**\n * The attributes that are mass assignable.\n *\n * @var array\n */\n protected $fillable = [];\n\n /**\n * The attributes that aren't mass assignable.\n *\n * @var array\n */\n protected $guarded = ['*'];\n\n /**\n * Indicates if all mass assignment is enabled.\n *\n * @var bool\n */\n protected static $unguarded = false;\n\n /**\n * ", "suffix": " *\n * @return void\n */\n #[Initialize]\n public function initializeGuardsAttributes()\n {\n $this->mergeFillable(static::resolveClassAttribute(Fillable::class, 'columns') ?? []);\n\n if ($this->guarded === ['*']) {\n if ", "middle": "The actual columns that exist on the database and can be guarded.\n *\n * @var array>\n */\n protected static $guardableColumns = [];\n\n /**\n * Initialize the GuardsAttributes trait.\n ", "meta": {"filepath": "src/Illuminate/Database/Eloquent/Concerns/GuardsAttributes.php", "language": "php", "file_size": 7081, "cut_index": 716, "middle_length": 229}} {"prefix": "l.\n *\n * Allows for object-based events for native Eloquent events.\n *\n * @var array\n */\n protected $dispatchesEvents = [];\n\n /**\n * User exposed observable events.\n *\n * These are extra user-defined events observers may subscribe to.\n *\n * @var string[]\n */\n protected $observables = [];\n\n /**\n * Boot the has event trait for a model.\n *\n * @return void\n */\n public static function bootHasEvents()\n {\n st", "suffix": "rveAttributes()\n {\n $reflectionClass = new ReflectionClass(static::class);\n\n $isEloquentGrandchild = is_subclass_of(static::class, Model::class)\n && get_parent_class(static::class) !== Model::class;\n\n return (new Collecti", "middle": "atic::whenBooted(fn () => static::observe(static::resolveObserveAttributes()));\n }\n\n /**\n * Resolve the observe class names from the attributes.\n *\n * @return array\n */\n public static function resolveObse", "meta": {"filepath": "src/Illuminate/Database/Eloquent/Concerns/HasEvents.php", "language": "php", "file_size": 12215, "cut_index": 921, "middle_length": 229}} {"prefix": "ontracts\\Database\\Eloquent\\Castable;\nuse Illuminate\\Contracts\\Database\\Eloquent\\CastsAttributes;\nuse Illuminate\\Support\\Stringable;\n\nclass AsStringable implements Castable\n{\n /**\n * Get the caster class to use when casting from / to this cast target.\n *\n * @param array $arguments\n * @return \\Illuminate\\Contracts\\Database\\Eloquent\\CastsAttributes<\\Illuminate\\Support\\Stringable, string|\\Stringable>\n */\n public static function castUsing(array $arguments)\n {\n return new cla", "suffix": "public function get($model, $key, $value, $attributes)\n {\n return isset($value) ? new Stringable($value) : null;\n }\n\n public function set($model, $key, $value, $attributes)\n {\n retur", "middle": "ss implements CastsAttributes\n {\n ", "meta": {"filepath": "src/Illuminate/Database/Eloquent/Casts/AsStringable.php", "language": "php", "file_size": 965, "cut_index": 582, "middle_length": 52}} {"prefix": "rray',\n 'encrypted:collection',\n 'encrypted:json',\n 'encrypted:object',\n 'float',\n 'hashed',\n 'immutable_date',\n 'immutable_datetime',\n 'immutable_custom_datetime',\n 'int',\n 'integer',\n 'json',\n 'json:unicode',\n 'object',\n 'real',\n 'string',\n 'timestamp',\n ];\n\n /**\n * The storage format of the model's date columns.\n *\n * @var string|null\n */\n protected $dateFormat;\n\n /*", "suffix": " public static $snakeAttributes = true;\n\n /**\n * The cache of the mutated attributes for each class.\n *\n * @var array\n */\n protected static $mutatorCache = [];\n\n /**\n * The cache of the \"Attribute\" return type marked mutated at", "middle": "*\n * The accessors to append to the model's array form.\n *\n * @var array\n */\n protected $appends = [];\n\n /**\n * Indicates whether attributes are snake cased on arrays.\n *\n * @var bool\n */\n ", "meta": {"filepath": "src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php", "language": "php", "file_size": 75926, "cut_index": 3790, "middle_length": 229}} {"prefix": "te\\Database\\Schema\\Grammars;\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Support\\Fluent;\n\nclass MariaDbGrammar extends MySqlGrammar\n{\n /** @inheritDoc */\n public function compileRenameColumn(Blueprint $blueprint, Fluent $command)\n {\n if (version_compare($this->connection->getServerVersion(), '10.5.2', '<')) {\n return $this->compileLegacyRenameColumn($blueprint, $command);\n }\n\n return parent::compileRenameColumn($blueprint, $command);\n }\n\n /**\n ", "suffix": "nection->getServerVersion(), '10.7.0', '<')) {\n return 'char(36)';\n }\n\n return 'uuid';\n }\n\n /**\n * Create the column definition for a spatial Geometry type.\n *\n * @param \\Illuminate\\Support\\Fluent $column\n *", "middle": " * Create the column definition for a uuid type.\n *\n * @param \\Illuminate\\Support\\Fluent $column\n * @return string\n */\n protected function typeUuid(Fluent $column)\n {\n if (version_compare($this->con", "meta": {"filepath": "src/Illuminate/Database/Schema/Grammars/MariaDbGrammar.php", "language": "php", "file_size": 1798, "cut_index": 537, "middle_length": 229}} {"prefix": "\\Attributes\\ScopedBy;\nuse Illuminate\\Database\\Eloquent\\Model;\nuse Illuminate\\Database\\Eloquent\\Scope;\nuse Illuminate\\Support\\Arr;\nuse Illuminate\\Support\\Collection;\nuse InvalidArgumentException;\nuse ReflectionAttribute;\nuse ReflectionClass;\n\ntrait HasGlobalScopes\n{\n /**\n * Boot the has global scopes trait for a model.\n *\n * @return void\n */\n public static function bootHasGlobalScopes()\n {\n static::addGlobalScopes(static::resolveGlobalScopeAttributes());\n }\n\n /**\n * ", "suffix": " $attributes = (new Collection($reflectionClass->getAttributes(ScopedBy::class, ReflectionAttribute::IS_INSTANCEOF)));\n\n foreach ($reflectionClass->getTraits() as $trait) {\n $attributes->push(...$trait->getAttributes(ScopedBy::class, Refl", "middle": "Resolve the global scope class names from the attributes.\n *\n * @return array\n */\n public static function resolveGlobalScopeAttributes()\n {\n $reflectionClass = new ReflectionClass(static::class);\n\n ", "meta": {"filepath": "src/Illuminate/Database/Eloquent/Concerns/HasGlobalScopes.php", "language": "php", "file_size": 4865, "cut_index": 614, "middle_length": 229}} {"prefix": " * @var mixed\n */\n protected $relationAutoloadContext = null;\n\n /**\n * The many to many relationship methods.\n *\n * @var string[]\n */\n public static $manyMethods = [\n 'belongsToMany', 'morphToMany', 'morphedByMany',\n ];\n\n /**\n * The relation resolver callbacks.\n *\n * @var array\n */\n protected static $relationResolvers = [];\n\n /**\n * Initialize the HasRelationships trait.\n *\n * @return void\n */\n #[Initialize]\n public func", "suffix": "resolver if defined or inherited, or return null.\n *\n * @template TRelatedModel of \\Illuminate\\Database\\Eloquent\\Model\n *\n * @param class-string $class\n * @param string $key\n * @return Closure|null\n */\n pub", "middle": "tion initializeHasRelationships()\n {\n if (empty($this->touches)) {\n $this->touches = static::resolveClassAttribute(Touches::class, 'relations') ?? [];\n }\n }\n\n /**\n * Get the dynamic relation ", "meta": {"filepath": "src/Illuminate/Database/Eloquent/Concerns/HasRelationships.php", "language": "php", "file_size": 40155, "cut_index": 2151, "middle_length": 229}} {"prefix": "idden;\nuse Illuminate\\Database\\Eloquent\\Attributes\\Initialize;\nuse Illuminate\\Database\\Eloquent\\Attributes\\Visible;\n\ntrait HidesAttributes\n{\n /**\n * The attributes that should be hidden for serialization.\n *\n * @var array\n */\n protected $hidden = [];\n\n /**\n * The attributes that should be visible in serialization.\n *\n * @var array\n */\n protected $visible = [];\n\n /**\n * Initialize the HidesAttributes trait.\n *\n * @return void\n */\n", "suffix": ":class, 'columns') ?? []);\n }\n\n /**\n * Get the hidden attributes for the model.\n *\n * @return array\n */\n public function getHidden()\n {\n return $this->hidden;\n }\n\n /**\n * Set the hidden attributes for th", "middle": " #[Initialize]\n public function initializeHidesAttributes()\n {\n $this->mergeHidden(static::resolveClassAttribute(Hidden::class, 'columns') ?? []);\n $this->mergeVisible(static::resolveClassAttribute(Visible:", "meta": {"filepath": "src/Illuminate/Database/Eloquent/Concerns/HidesAttributes.php", "language": "php", "file_size": 4235, "cut_index": 614, "middle_length": 229}} {"prefix": "n, $operator, $count, $boolean, $callback);\n }\n\n $relation = $this->getRelationWithoutConstraints($relation);\n }\n\n if ($relation instanceof MorphTo) {\n return $this->hasMorph($relation, ['*'], $operator, $count, $boolean, $callback);\n }\n\n // If we only need to check for the existence of the relation, then we can optimize\n // the subquery to only run a \"where exists\" clause instead of this full \"count\"\n // clause. This will make these", "suffix": "y = $relation->{$method}(\n $relation->getRelated()->newQueryWithoutRelationships(), $this\n );\n\n // Next we will call any given callback as an \"anonymous\" scope so they can get the\n // proper logical grouping of the where cla", "middle": " queries run much faster compared with a count.\n $method = $this->canUseExistsForExistenceCheck($operator, $count)\n ? 'getRelationExistenceQuery'\n : 'getRelationExistenceCountQuery';\n\n $hasQuer", "meta": {"filepath": "src/Illuminate/Database/Eloquent/Concerns/QueriesRelationships.php", "language": "php", "file_size": 45114, "cut_index": 2151, "middle_length": 229}} {"prefix": "rns;\n\nuse Illuminate\\Database\\Eloquent\\Attributes\\UseResource;\nuse Illuminate\\Http\\Resources\\Json\\JsonResource;\nuse Illuminate\\Support\\Str;\nuse LogicException;\nuse ReflectionClass;\n\ntrait TransformsToResource\n{\n /**\n * Create a new resource object for the given resource.\n *\n * @param class-string<\\Illuminate\\Http\\Resources\\Json\\JsonResource>|null $resourceClass\n * @return \\Illuminate\\Http\\Resources\\Json\\JsonResource\n */\n public function toResource(?string $resourceClass = null): ", "suffix": " * @return \\Illuminate\\Http\\Resources\\Json\\JsonResource\n *\n * @throws \\LogicException\n */\n protected function guessResource(): JsonResource\n {\n $resourceClass = $this->resolveResourceFromAttribute(static::class);\n\n if ($reso", "middle": "JsonResource\n {\n if ($resourceClass === null) {\n return $this->guessResource();\n }\n\n return $resourceClass::make($this);\n }\n\n /**\n * Guess the resource class for the model.\n *\n ", "meta": {"filepath": "src/Illuminate/Database/Eloquent/Concerns/TransformsToResource.php", "language": "php", "file_size": 3031, "cut_index": 563, "middle_length": 229}} {"prefix": "tes\\WithoutTimestamps;\nuse Illuminate\\Support\\Arr;\nuse Illuminate\\Support\\Facades\\Date;\n\ntrait HasTimestamps\n{\n /**\n * Indicates if the model should be timestamped.\n *\n * @var bool\n */\n public $timestamps = true;\n\n /**\n * The list of models classes that have timestamps temporarily disabled.\n *\n * @var array\n */\n protected static $ignoreTimestampsOn = [];\n\n /**\n * Initialize the HasTimestamps trait.\n *\n * @return void\n */\n #[Initialize]\n pu", "suffix": "elseif (($table = static::resolveClassAttribute(Table::class)) && $table->timestamps !== null) {\n $this->timestamps = $table->timestamps;\n }\n }\n }\n\n /**\n * Update the model's update timestamp.\n *\n * @param", "middle": "blic function initializeHasTimestamps()\n {\n if ($this->timestamps === true) {\n if (static::resolveClassAttribute(WithoutTimestamps::class) !== null) {\n $this->timestamps = false;\n } ", "meta": {"filepath": "src/Illuminate/Database/Eloquent/Concerns/HasTimestamps.php", "language": "php", "file_size": 6104, "cut_index": 716, "middle_length": 229}} {"prefix": "rns;\n\nuse Illuminate\\Database\\Eloquent\\ModelNotFoundException;\n\ntrait HasUniqueStringIds\n{\n /**\n * Generate a new unique key for the model.\n *\n * @return mixed\n */\n abstract public function newUniqueId();\n\n /**\n * Determine if given key is valid.\n *\n * @param mixed $value\n * @return bool\n */\n abstract protected function isValidUniqueId($value): bool;\n\n /**\n * Initialize the trait.\n *\n * @return void\n */\n public function initializeHasUni", "suffix": "is->usesUniqueIds() ? [$this->getKeyName()] : parent::uniqueIds();\n }\n\n /**\n * Retrieve the model for a bound value.\n *\n * @param \\Illuminate\\Database\\Eloquent\\Model|\\Illuminate\\Database\\Eloquent\\Relations\\Relation<*, *, *> $query\n ", "middle": "queStringIds()\n {\n $this->usesUniqueIds = true;\n }\n\n /**\n * Get the columns that should receive a unique identifier.\n *\n * @return array\n */\n public function uniqueIds()\n {\n return $th", "meta": {"filepath": "src/Illuminate/Database/Eloquent/Concerns/HasUniqueStringIds.php", "language": "php", "file_size": 2746, "cut_index": 563, "middle_length": 229}} {"prefix": "ions;\n\nuse Illuminate\\Database\\Eloquent\\Builder;\nuse Illuminate\\Database\\Eloquent\\Collection as EloquentCollection;\nuse Illuminate\\Database\\Eloquent\\Relations\\Concerns\\InteractsWithDictionary;\n\n/**\n * @template TRelatedModel of \\Illuminate\\Database\\Eloquent\\Model\n * @template TIntermediateModel of \\Illuminate\\Database\\Eloquent\\Model\n * @template TDeclaringModel of \\Illuminate\\Database\\Eloquent\\Model\n *\n * @extends \\Illuminate\\Database\\Eloquent\\Relations\\HasOneOrManyThrough\n */\n public function one()\n {\n return HasOneThrough::noConstraints(fn () => new HasOneThrough(", "middle": " TDeclaringModel, \\Illuminate\\Database\\Eloquent\\Collection>\n */\nclass HasManyThrough extends HasOneOrManyThrough\n{\n use InteractsWithDictionary;\n\n /**\n * Convert the relationship to a \"has one throug", "meta": {"filepath": "src/Illuminate/Database/Eloquent/Relations/HasManyThrough.php", "language": "php", "file_size": 2626, "cut_index": 563, "middle_length": 229}} {"prefix": "sInverseRelations;\n\n /**\n * The foreign key of the parent model.\n *\n * @var string\n */\n protected $foreignKey;\n\n /**\n * The local key of the parent model.\n *\n * @var string\n */\n protected $localKey;\n\n /**\n * Create a new has one or many relationship instance.\n *\n * @param \\Illuminate\\Database\\Eloquent\\Builder $query\n * @param TDeclaringModel $parent\n * @param string $foreignKey\n * @param string $localKey\n */\n ", "suffix": "*\n * Create and return an un-saved instance of the related model.\n *\n * @param array $attributes\n * @return TRelatedModel\n */\n public function make(array $attributes = [])\n {\n return tap($this->related->newInstance($attri", "middle": " public function __construct(Builder $query, Model $parent, $foreignKey, $localKey)\n {\n $this->localKey = $localKey;\n $this->foreignKey = $foreignKey;\n\n parent::__construct($query, $parent);\n }\n\n /*", "meta": {"filepath": "src/Illuminate/Database/Eloquent/Relations/HasOneOrMany.php", "language": "php", "file_size": 18590, "cut_index": 1331, "middle_length": 229}} {"prefix": "upportsPartialRelations;\nuse Illuminate\\Database\\Eloquent\\Builder;\nuse Illuminate\\Database\\Eloquent\\Collection as EloquentCollection;\nuse Illuminate\\Database\\Eloquent\\Model;\nuse Illuminate\\Database\\Eloquent\\Relations\\Concerns\\CanBeOneOfMany;\nuse Illuminate\\Database\\Eloquent\\Relations\\Concerns\\ComparesRelatedModels;\nuse Illuminate\\Database\\Eloquent\\Relations\\Concerns\\InteractsWithDictionary;\nuse Illuminate\\Database\\Eloquent\\Relations\\Concerns\\SupportsDefaultModels;\nuse Illuminate\\Database\\Query\\JoinClause;\n\n", "suffix": "minate\\Database\\Eloquent\\Relations\\HasOneOrManyThrough\n */\nclass HasOneThrough extends HasOneOrManyThrough implements SupportsPartialRelations\n{\n use ComparesRelatedModels, CanBeOneOfMa", "middle": "/**\n * @template TRelatedModel of \\Illuminate\\Database\\Eloquent\\Model\n * @template TIntermediateModel of \\Illuminate\\Database\\Eloquent\\Model\n * @template TDeclaringModel of \\Illuminate\\Database\\Eloquent\\Model\n *\n * @extends \\Illu", "meta": {"filepath": "src/Illuminate/Database/Eloquent/Relations/HasOneThrough.php", "language": "php", "file_size": 4126, "cut_index": 614, "middle_length": 229}} {"prefix": "upportsPartialRelations;\nuse Illuminate\\Database\\Eloquent\\Builder;\nuse Illuminate\\Database\\Eloquent\\Collection as EloquentCollection;\nuse Illuminate\\Database\\Eloquent\\Model;\nuse Illuminate\\Database\\Eloquent\\Relations\\Concerns\\CanBeOneOfMany;\nuse Illuminate\\Database\\Eloquent\\Relations\\Concerns\\ComparesRelatedModels;\nuse Illuminate\\Database\\Eloquent\\Relations\\Concerns\\SupportsDefaultModels;\nuse Illuminate\\Database\\Query\\JoinClause;\n\n/**\n * @template TRelatedModel of \\Illuminate\\Database\\Eloquent\\Model\n * @tem", "suffix": "ts SupportsPartialRelations\n{\n use CanBeOneOfMany, ComparesRelatedModels, SupportsDefaultModels;\n\n /** @inheritDoc */\n public function getResults()\n {\n if (is_null($this->getParentKey())) {\n return $this->getDefaultFor($this->", "middle": "plate TDeclaringModel of \\Illuminate\\Database\\Eloquent\\Model\n *\n * @extends \\Illuminate\\Database\\Eloquent\\Relations\\MorphOneOrMany\n */\nclass MorphOne extends MorphOneOrMany implemen", "meta": {"filepath": "src/Illuminate/Database/Eloquent/Relations/MorphOne.php", "language": "php", "file_size": 3973, "cut_index": 614, "middle_length": 229}} {"prefix": "pport\\Onceable;\nuse WeakMap;\n\ntrait PreventsCircularRecursion\n{\n /**\n * The cache of objects processed to prevent infinite recursion.\n *\n * @var WeakMap>\n */\n protected static $recursionCache;\n\n /**\n * Prevent a method from being called multiple times on the same object within the same call stack.\n *\n * @param callable $callback\n * @param mixed $default\n * @return mixed\n */\n protected function withoutRecursion($callback, $d", "suffix": "ack);\n }\n\n $stack = static::getRecursiveCallStack($this);\n\n if (array_key_exists($onceable->hash, $stack)) {\n return is_callable($stack[$onceable->hash])\n ? static::setRecursiveCallValue($this, $onceable->hash", "middle": "efault = null)\n {\n $trace = debug_backtrace(DEBUG_BACKTRACE_PROVIDE_OBJECT, 2);\n\n $onceable = Onceable::tryFromTrace($trace, $callback);\n\n if (is_null($onceable)) {\n return call_user_func($callb", "meta": {"filepath": "src/Illuminate/Database/Eloquent/Concerns/PreventsCircularRecursion.php", "language": "php", "file_size": 3142, "cut_index": 614, "middle_length": 229}} {"prefix": "s\\SupportsDefaultModels;\n\nuse function Illuminate\\Support\\enum_value;\n\n/**\n * @template TRelatedModel of \\Illuminate\\Database\\Eloquent\\Model\n * @template TDeclaringModel of \\Illuminate\\Database\\Eloquent\\Model\n *\n * @extends \\Illuminate\\Database\\Eloquent\\Relations\\Relation\n */\nclass BelongsTo extends Relation\n{\n use ComparesRelatedModels,\n InteractsWithDictionary,\n SupportsDefaultModels;\n\n /**\n * The child model instance of the relation.", "suffix": "model.\n *\n * @var string\n */\n protected $ownerKey;\n\n /**\n * The name of the relationship.\n *\n * @var string\n */\n protected $relationName;\n\n /**\n * Create a new belongs to relationship instance.\n *\n * @par", "middle": "\n *\n * @var TDeclaringModel\n */\n protected $child;\n\n /**\n * The foreign key of the parent model.\n *\n * @var string\n */\n protected $foreignKey;\n\n /**\n * The associated key on the parent ", "meta": {"filepath": "src/Illuminate/Database/Eloquent/Relations/BelongsTo.php", "language": "php", "file_size": 10878, "cut_index": 921, "middle_length": 229}} {"prefix": "te\\Database\\Eloquent\\Relations;\n\nuse Illuminate\\Database\\Eloquent\\Collection as EloquentCollection;\n\n/**\n * @template TRelatedModel of \\Illuminate\\Database\\Eloquent\\Model\n * @template TDeclaringModel of \\Illuminate\\Database\\Eloquent\\Model\n *\n * @extends \\Illuminate\\Database\\Eloquent\\Relations\\HasOneOrMany>\n */\nclass HasMany extends HasOneOrMany\n{\n /**\n * Convert the relationship to a \"has one\" relationship.\n ", "suffix": " $this->getQuery(),\n $this->parent,\n $this->foreignKey,\n $this->localKey\n ),\n function ($hasOne) {\n if ($inverse = $this->getInverseRelationship()) {\n $ha", "middle": " *\n * @return \\Illuminate\\Database\\Eloquent\\Relations\\HasOne\n */\n public function one()\n {\n return HasOne::noConstraints(fn () => tap(\n new HasOne(\n ", "meta": {"filepath": "src/Illuminate/Database/Eloquent/Relations/HasMany.php", "language": "php", "file_size": 1722, "cut_index": 537, "middle_length": 229}} {"prefix": "tions\\Relation\n */\nabstract class HasOneOrManyThrough extends Relation\n{\n use InteractsWithDictionary;\n\n /**\n * The \"through\" parent model instance.\n *\n * @var TIntermediateModel\n */\n protected $throughParent;\n\n /**\n * The far parent model instance.\n *\n * @var TDeclaringModel\n */\n protected $farParent;\n\n /**\n * The near key on the relationship.\n *\n * @var string\n */\n protected $firstKey;\n\n /**", "suffix": "e local key on the intermediary model.\n *\n * @var string\n */\n protected $secondLocalKey;\n\n /**\n * Create a new has many through relationship instance.\n *\n * @param \\Illuminate\\Database\\Eloquent\\Builder $query\n", "middle": "\n * The far key on the relationship.\n *\n * @var string\n */\n protected $secondKey;\n\n /**\n * The local key on the relationship.\n *\n * @var string\n */\n protected $localKey;\n\n /**\n * Th", "meta": {"filepath": "src/Illuminate/Database/Eloquent/Relations/HasOneOrManyThrough.php", "language": "php", "file_size": 25953, "cut_index": 1331, "middle_length": 229}} {"prefix": "key of the parent model.\n *\n * @var string\n */\n protected $foreignPivotKey;\n\n /**\n * The associated key of the relation.\n *\n * @var string\n */\n protected $relatedPivotKey;\n\n /**\n * The key name of the parent model.\n *\n * @var string\n */\n protected $parentKey;\n\n /**\n * The key name of the related model.\n *\n * @var string\n */\n protected $relatedKey;\n\n /**\n * The \"name\" of the relationship.\n *\n * @var string\n */", "suffix": "ot table restrictions for where clauses.\n *\n * @var array\n */\n protected $pivotWheres = [];\n\n /**\n * Any pivot table restrictions for whereIn clauses.\n *\n * @var array\n */\n protected $pivotWhereIns = [];\n\n /**\n *", "middle": "\n protected $relationName;\n\n /**\n * The pivot table columns to retrieve.\n *\n * @var array\n */\n protected $pivotColumns = [];\n\n /**\n * Any piv", "meta": {"filepath": "src/Illuminate/Database/Eloquent/Relations/BelongsToMany.php", "language": "php", "file_size": 50852, "cut_index": 2151, "middle_length": 229}} {"prefix": "upportsPartialRelations;\nuse Illuminate\\Database\\Eloquent\\Builder;\nuse Illuminate\\Database\\Eloquent\\Collection as EloquentCollection;\nuse Illuminate\\Database\\Eloquent\\Model;\nuse Illuminate\\Database\\Eloquent\\Relations\\Concerns\\CanBeOneOfMany;\nuse Illuminate\\Database\\Eloquent\\Relations\\Concerns\\ComparesRelatedModels;\nuse Illuminate\\Database\\Eloquent\\Relations\\Concerns\\SupportsDefaultModels;\nuse Illuminate\\Database\\Query\\JoinClause;\n\n/**\n * @template TRelatedModel of \\Illuminate\\Database\\Eloquent\\Model\n * @tem", "suffix": "portsPartialRelations\n{\n use ComparesRelatedModels, CanBeOneOfMany, SupportsDefaultModels;\n\n /** @inheritDoc */\n public function getResults()\n {\n if (is_null($this->getParentKey())) {\n return $this->getDefaultFor($this->parent", "middle": "plate TDeclaringModel of \\Illuminate\\Database\\Eloquent\\Model\n *\n * @extends \\Illuminate\\Database\\Eloquent\\Relations\\HasOneOrMany\n */\nclass HasOne extends HasOneOrMany implements Sup", "meta": {"filepath": "src/Illuminate/Database/Eloquent/Relations/HasOne.php", "language": "php", "file_size": 3724, "cut_index": 614, "middle_length": 229}} {"prefix": "te\\Database\\Eloquent\\Relations;\n\nuse Illuminate\\Database\\Eloquent\\Collection as EloquentCollection;\n\n/**\n * @template TRelatedModel of \\Illuminate\\Database\\Eloquent\\Model\n * @template TDeclaringModel of \\Illuminate\\Database\\Eloquent\\Model\n *\n * @extends \\Illuminate\\Database\\Eloquent\\Relations\\MorphOneOrMany>\n */\nclass MorphMany extends MorphOneOrMany\n{\n /**\n * Convert the relationship to a \"morph one\" relatio", "suffix": " $this->getQuery(),\n $this->getParent(),\n $this->morphType,\n $this->foreignKey,\n $this->localKey\n ),\n function ($morphOne) {\n if ($inverse = $th", "middle": "nship.\n *\n * @return \\Illuminate\\Database\\Eloquent\\Relations\\MorphOne\n */\n public function one()\n {\n return MorphOne::noConstraints(fn () => tap(\n new MorphOne(\n", "meta": {"filepath": "src/Illuminate/Database/Eloquent/Relations/MorphMany.php", "language": "php", "file_size": 1985, "cut_index": 537, "middle_length": 229}} {"prefix": " * The type of the polymorphic relation.\n *\n * Explicitly define this so it's not included in saved attributes.\n *\n * @var string\n */\n protected $morphType;\n\n /**\n * The value of the polymorphic relation.\n *\n * Explicitly define this so it's not included in saved attributes.\n *\n * @var class-string|string\n */\n protected $morphClass;\n\n /**\n * Set the keys for a save update query.\n *\n * @param \\Illuminate\\Database\\Eloquent\\Builder ", "suffix": "veQuery($query);\n }\n\n /**\n * Set the keys for a select query.\n *\n * @param \\Illuminate\\Database\\Eloquent\\Builder $query\n * @return \\Illuminate\\Database\\Eloquent\\Builder\n */\n protected function setKeysForSelect", "middle": "$query\n * @return \\Illuminate\\Database\\Eloquent\\Builder\n */\n protected function setKeysForSaveQuery($query)\n {\n $query->where($this->morphType, $this->morphClass);\n\n return parent::setKeysForSa", "meta": {"filepath": "src/Illuminate/Database/Eloquent/Relations/MorphPivot.php", "language": "php", "file_size": 4598, "cut_index": 614, "middle_length": 229}} {"prefix": "/**\n * @template TRelatedModel of \\Illuminate\\Database\\Eloquent\\Model\n * @template TDeclaringModel of \\Illuminate\\Database\\Eloquent\\Model\n * @template TPivotModel of \\Illuminate\\Database\\Eloquent\\Relations\\Pivot = \\Illuminate\\Database\\Eloquent\\Relations\\MorphPivot\n * @template TAccessor of string = 'pivot'\n *\n * @extends \\Illuminate\\Database\\Eloquent\\Relations\\BelongsToMany\n */\nclass MorphToMany extends BelongsToMany\n{\n /**\n * The type of the po", "suffix": " * Indicates if we are connecting the inverse of the relation.\n *\n * This primarily affects the morphClass constraint.\n *\n * @var bool\n */\n protected $inverse;\n\n /**\n * Create a new morph to many relationship instance.\n *\n", "middle": "lymorphic relation.\n *\n * @var string\n */\n protected $morphType;\n\n /**\n * The morph class of the morph type constraint.\n *\n * @var class-string|string\n */\n protected $morphClass;\n\n /**\n ", "meta": {"filepath": "src/Illuminate/Database/Eloquent/Relations/MorphToMany.php", "language": "php", "file_size": 6348, "cut_index": 716, "middle_length": 229}} {"prefix": "\n * @var \\Illuminate\\Database\\Eloquent\\Model\n */\n public $pivotRelated;\n\n /**\n * The name of the foreign key column.\n *\n * @var string\n */\n protected $foreignKey;\n\n /**\n * The name of the \"other key\" column.\n *\n * @var string\n */\n protected $relatedKey;\n\n /**\n * Create a new pivot model instance.\n *\n * @param \\Illuminate\\Database\\Eloquent\\Model $parent\n * @param array $attributes\n * @param string $table\n * @param bool ", "suffix": "tributes($attributes);\n\n // The pivot model is a \"dynamic\" model since we will set the tables dynamically\n // for the instance. This allows it work for any intermediate tables for the\n // many to many relationship that are defined by t", "middle": "$exists\n * @return static\n */\n public static function fromAttributes(Model $parent, $attributes, $table, $exists = false)\n {\n $instance = new static;\n\n $instance->timestamps = $instance->hasTimestampAt", "meta": {"filepath": "src/Illuminate/Database/Eloquent/Relations/Concerns/AsPivot.php", "language": "php", "file_size": 9367, "cut_index": 921, "middle_length": 229}} {"prefix": "ions\\Concerns;\n\nuse Illuminate\\Contracts\\Database\\Eloquent\\SupportsPartialRelations;\nuse Illuminate\\Database\\Eloquent\\Model;\n\ntrait ComparesRelatedModels\n{\n /**\n * Determine if the model is the related instance of the relationship.\n *\n * @param \\Illuminate\\Database\\Eloquent\\Model|null $model\n * @return bool\n */\n public function is($model)\n {\n $match = ! is_null($model) &&\n $this->compareKeys($this->getParentKey(), $this->getRelatedKeyFrom($model)) &&\n ", "suffix": "Many()) {\n return $this->query\n ->whereKey($model->getKey())\n ->exists();\n }\n\n return $match;\n }\n\n /**\n * Determine if the model is not the related instance of the relationship.\n *\n *", "middle": " $this->related->getTable() === $model->getTable() &&\n $this->related->getConnectionName() === $model->getConnectionName();\n\n if ($match && $this instanceof SupportsPartialRelations && $this->isOneOf", "meta": {"filepath": "src/Illuminate/Database/Eloquent/Relations/Concerns/ComparesRelatedModels.php", "language": "php", "file_size": 2071, "cut_index": 563, "middle_length": 229}} {"prefix": " removed from the join table by\n // checking which of the given ID/records is in the list of current records\n // and removing all of those rows from this \"intermediate\" joining table.\n $detach = array_values(array_intersect(\n $this->newPivotQuery()->pluck($this->relatedPivotKey)->all(),\n array_keys($records)\n ));\n\n if ($detach !== []) {\n $this->detach($detach, false);\n\n $changes['detached'] = $this->castKeys($detach);\n }\n\n", "suffix": "results to the callers.\n $attach = array_diff_key($records, array_flip($detach));\n\n if ($attach !== []) {\n $this->attach($attach, [], false);\n\n $changes['attached'] = array_keys($attach);\n }\n\n // Once we ha", "middle": " // Finally, for all of the records which were not \"detached\", we'll attach the\n // records into the intermediate table. Then, we will add those attaches to\n // this change list and get ready to return these ", "meta": {"filepath": "src/Illuminate/Database/Eloquent/Relations/Concerns/InteractsWithPivotTable.php", "language": "php", "file_size": 24656, "cut_index": 1331, "middle_length": 229}} {"prefix": "te\\Database\\Eloquent\\Relations\\Concerns;\n\nuse Illuminate\\Database\\Eloquent\\Model;\n\ntrait SupportsDefaultModels\n{\n /**\n * Indicates if a default model instance should be used.\n *\n * Alternatively, may be a Closure or array.\n *\n * @var \\Closure|array|bool\n */\n protected $withDefault;\n\n /**\n * Make a new related instance for the given model.\n *\n * @param \\Illuminate\\Database\\Eloquent\\Model $parent\n * @return \\Illuminate\\Database\\Eloquent\\Model\n */\n abst", "suffix": " public function withDefault($callback = true)\n {\n $this->withDefault = $callback;\n\n return $this;\n }\n\n /**\n * Get the default value for this relation.\n *\n * @param \\Illuminate\\Database\\Eloquent\\Model $parent\n * ", "middle": "ract protected function newRelatedInstanceFor(Model $parent);\n\n /**\n * Return a new model instance in case the relationship does not exist.\n *\n * @param \\Closure|array|bool $callback\n * @return $this\n */\n", "meta": {"filepath": "src/Illuminate/Database/Eloquent/Relations/Concerns/SupportsDefaultModels.php", "language": "php", "file_size": 1553, "cut_index": 537, "middle_length": 229}} {"prefix": "ries;\n\nuse Illuminate\\Database\\Eloquent\\Model;\nuse Illuminate\\Database\\Eloquent\\Relations\\MorphTo;\n\nclass BelongsToRelationship\n{\n /**\n * The related factory instance.\n *\n * @var \\Illuminate\\Database\\Eloquent\\Factories\\Factory|\\Illuminate\\Database\\Eloquent\\Model\n */\n protected $factory;\n\n /**\n * The relationship name.\n *\n * @var string\n */\n protected $relationship;\n\n /**\n * The cached, resolved parent instance ID.\n *\n * @var mixed\n */\n protec", "suffix": "nship\n */\n public function __construct($factory, $relationship)\n {\n $this->factory = $factory;\n $this->relationship = $relationship;\n }\n\n /**\n * Get the parent model attributes and resolvers for the given child model.\n ", "middle": "ted $resolved;\n\n /**\n * Create a new \"belongs to\" relationship definition.\n *\n * @param \\Illuminate\\Database\\Eloquent\\Factories\\Factory|\\Illuminate\\Database\\Eloquent\\Model $factory\n * @param string $relatio", "meta": {"filepath": "src/Illuminate/Database/Eloquent/Factories/BelongsToRelationship.php", "language": "php", "file_size": 2721, "cut_index": 563, "middle_length": 229}} {"prefix": " * The model instances to always use when creating relationships.\n *\n * @var \\Illuminate\\Support\\Collection\n */\n protected $recycle;\n\n /**\n * The \"after making\" callbacks that will be applied to the model.\n *\n * @var \\Illuminate\\Support\\Collection\n */\n protected $afterMaking;\n\n /**\n * The \"after creating\" callbacks that will be applied to the model.\n *\n * @var \\Illuminate\\Support\\Collection\n */\n protected $afterCreating;\n\n /**\n * Whether ", "suffix": " */\n protected $excludeRelationships = [];\n\n /**\n * The name of the database connection that will be used to create the models.\n *\n * @var \\UnitEnum|string|null\n */\n protected $connection;\n\n /**\n * The current Faker instan", "middle": "relationships should not be automatically created.\n *\n * @var bool\n */\n protected $expandRelationships = true;\n\n /**\n * The relationships that should not be automatically created.\n *\n * @var array\n ", "meta": {"filepath": "src/Illuminate/Database/Eloquent/Factories/Factory.php", "language": "php", "file_size": 35733, "cut_index": 2151, "middle_length": 229}} {"prefix": "usesUniqueIds;\n }\n\n /**\n * Generate unique keys for the model.\n *\n * @return void\n */\n public function setUniqueIds()\n {\n ", "suffix": " * @return string\n */\n public function newUniqueId()\n {\n return null;\n }\n\n /**\n * Get the columns that should receive a unique identifier.\n *\n * @return array\n */\n public function uniqueIds()\n {\n retu", "middle": "foreach ($this->uniqueIds() as $column) {\n if (empty($this->{$column})) {\n $this->{$column} = $this->newUniqueId();\n }\n }\n }\n\n /**\n * Generate a new key for the model.\n *\n", "meta": {"filepath": "src/Illuminate/Database/Eloquent/Concerns/HasUniqueIds.php", "language": "php", "file_size": 1012, "cut_index": 512, "middle_length": 229}} {"prefix": "luminate\\Database\\Query\\Expression;\nuse Illuminate\\Support\\Collection as BaseCollection;\nuse Illuminate\\Support\\Traits\\ForwardsCalls;\nuse Illuminate\\Support\\Traits\\Macroable;\n\n/**\n * @template TRelatedModel of \\Illuminate\\Database\\Eloquent\\Model\n * @template TDeclaringModel of \\Illuminate\\Database\\Eloquent\\Model\n * @template TResult\n *\n * @mixin \\Illuminate\\Database\\Eloquent\\Builder\n */\nabstract class Relation implements BuilderContract\n{\n use ForwardsCalls, Macroable {\n Macroable::", "suffix": " *\n * @var TDeclaringModel\n */\n protected $parent;\n\n /**\n * The related model instance.\n *\n * @var TRelatedModel\n */\n protected $related;\n\n /**\n * Indicates whether the eagerly loaded relation should implicitly retur", "middle": "__call as macroCall;\n }\n\n /**\n * The Eloquent query builder instance.\n *\n * @var \\Illuminate\\Database\\Eloquent\\Builder\n */\n protected $query;\n\n /**\n * The parent model instance.\n ", "meta": {"filepath": "src/Illuminate/Database/Eloquent/Relations/Relation.php", "language": "php", "file_size": 14930, "cut_index": 921, "middle_length": 229}} {"prefix": "?php\n\nnamespace Illuminate\\Database\\Eloquent\\Relations\\Concerns;\n\nuse InvalidArgumentException;\nuse UnitEnum;\n\nuse function Illuminate\\Support\\enum_value;\n\ntrait InteractsWithDictionary\n{\n /**\n * Get a dictionary key attribute - casting it to a string if necessary.\n *\n * @param mixed $attribute\n * @return string|int|null\n *\n * @throws \\InvalidArgumentException\n */\n protected function getDictionaryKey($attribute)\n {\n if (is_null($attribute) || is_string($attribut", "suffix": "\n if ($attribute instanceof UnitEnum) {\n return enum_value($attribute);\n }\n\n throw new InvalidArgumentException('Model attribute value is an object but does not have a __toString method.');\n }\n\n ", "middle": "e) || is_int($attribute)) {\n return $attribute;\n }\n\n if (is_object($attribute)) {\n if (method_exists($attribute, '__toString')) {\n return $attribute->__toString();\n }\n", "meta": {"filepath": "src/Illuminate/Database/Eloquent/Relations/Concerns/InteractsWithDictionary.php", "language": "php", "file_size": 1035, "cut_index": 513, "middle_length": 229}} {"prefix": "del;\nuse Illuminate\\Database\\Eloquent\\RelationNotFoundException;\nuse Illuminate\\Support\\Arr;\nuse Illuminate\\Support\\Str;\n\ntrait SupportsInverseRelations\n{\n /**\n * The name of the inverse relationship.\n *\n * @var string|null\n */\n protected ?string $inverseRelationship = null;\n\n /**\n * Instruct Eloquent to link the related models back to the parent after the relationship query has run.\n *\n * Alias of \"chaperone\".\n *\n * @param string|null $relation\n * @return ", "suffix": "ery has run.\n *\n * @param string|null $relation\n * @return $this\n */\n public function chaperone(?string $relation = null)\n {\n $relation ??= $this->guessInverseRelation();\n\n if (! $relation || ! $this->getModel()->isRel", "middle": "$this\n */\n public function inverse(?string $relation = null)\n {\n return $this->chaperone($relation);\n }\n\n /**\n * Instruct Eloquent to link the related models back to the parent after the relationship qu", "meta": {"filepath": "src/Illuminate/Database/Eloquent/Relations/Concerns/SupportsInverseRelations.php", "language": "php", "file_size": 4393, "cut_index": 614, "middle_length": 229}} {"prefix": "ries;\n\nuse Illuminate\\Database\\Eloquent\\Model;\nuse Illuminate\\Database\\Eloquent\\Relations\\BelongsToMany;\nuse Illuminate\\Database\\Eloquent\\Relations\\HasOneOrMany;\nuse Illuminate\\Database\\Eloquent\\Relations\\MorphOneOrMany;\n\nclass Relationship\n{\n /**\n * The related factory instance.\n *\n * @var \\Illuminate\\Database\\Eloquent\\Factories\\Factory\n */\n protected $factory;\n\n /**\n * The relationship name.\n *\n * @var string\n */\n protected $relationship;\n\n /**\n * Create ", "suffix": "{\n $this->factory = $factory;\n $this->relationship = $relationship;\n }\n\n /**\n * Create the child relationship for the given parent model.\n *\n * @param \\Illuminate\\Database\\Eloquent\\Model $parent\n * @return void\n */", "middle": "a new child relationship instance.\n *\n * @param \\Illuminate\\Database\\Eloquent\\Factories\\Factory $factory\n * @param string $relationship\n */\n public function __construct(Factory $factory, $relationship)\n ", "meta": {"filepath": "src/Illuminate/Database/Eloquent/Factories/Relationship.php", "language": "php", "file_size": 2342, "cut_index": 563, "middle_length": 229}} {"prefix": "l\n * @template TDeclaringModel of \\Illuminate\\Database\\Eloquent\\Model\n *\n * @extends \\Illuminate\\Database\\Eloquent\\Relations\\BelongsTo\n */\nclass MorphTo extends BelongsTo\n{\n use InteractsWithDictionary;\n\n /**\n * The type of the polymorphic relation.\n *\n * @var string\n */\n protected $morphType;\n\n /**\n * The associated key on the parent model.\n *\n * @var string|null\n */\n protected $ownerKey;\n\n /**\n * The models whose relatio", "suffix": "cted $dictionary = [];\n\n /**\n * A buffer of dynamic calls to query macros.\n *\n * @var array\n */\n protected $macroBuffer = [];\n\n /**\n * A map of relations to load for each individual morph type.\n *\n * @var array\n */\n", "middle": "ns are being eager loaded.\n *\n * @var \\Illuminate\\Database\\Eloquent\\Collection\n */\n protected $models;\n\n /**\n * All of the models keyed by ID.\n *\n * @var array\n */\n prote", "meta": {"filepath": "src/Illuminate/Database/Eloquent/Relations/MorphTo.php", "language": "php", "file_size": 12742, "cut_index": 921, "middle_length": 229}} {"prefix": "ries;\n\nuse Illuminate\\Database\\Eloquent\\Model;\nuse Illuminate\\Support\\Collection;\n\nclass BelongsToManyRelationship\n{\n /**\n * The related factory instance.\n *\n * @var \\Illuminate\\Database\\Eloquent\\Factories\\Factory|\\Illuminate\\Support\\Collection|\\Illuminate\\Database\\Eloquent\\Model|array\n */\n protected $factory;\n\n /**\n * The pivot attributes / attribute resolver.\n *\n * @var callable|array\n */\n protected $pivot;\n\n /**\n * The relationship name.\n *\n * @v", "suffix": "se\\Eloquent\\Model|array $factory\n * @param callable|array $pivot\n * @param string $relationship\n */\n public function __construct($factory, $pivot, $relationship)\n {\n $this->factory = $factory;\n $this->pivot = $pivot;\n ", "middle": "ar string\n */\n protected $relationship;\n\n /**\n * Create a new attached relationship definition.\n *\n * @param \\Illuminate\\Database\\Eloquent\\Factories\\Factory|\\Illuminate\\Support\\Collection|\\Illuminate\\Databa", "meta": {"filepath": "src/Illuminate/Database/Eloquent/Factories/BelongsToManyRelationship.php", "language": "php", "file_size": 2267, "cut_index": 563, "middle_length": 229}} {"prefix": "te\\Database\\Schema;\n\nuse Illuminate\\Support\\Stringable;\n\nclass ForeignIdColumnDefinition extends ColumnDefinition\n{\n /**\n * The schema builder blueprint instance.\n *\n * @var \\Illuminate\\Database\\Schema\\Blueprint\n */\n protected $blueprint;\n\n /**\n * Create a new foreign ID column definition.\n *\n * @param \\Illuminate\\Database\\Schema\\Blueprint $blueprint\n * @param array $attributes\n */\n public function __construct(Blueprint $blueprint, $attributes = [])\n {\n", "suffix": " @param string|null $table\n * @param string|null $column\n * @param string|null $indexName\n * @return \\Illuminate\\Database\\Schema\\ForeignKeyDefinition\n */\n public function constrained($table = null, $column = null, $indexName = null", "middle": " parent::__construct($attributes);\n\n $this->blueprint = $blueprint;\n }\n\n /**\n * Create a foreign key constraint on this column referencing the \"id\" column of the conventionally related table.\n *\n *", "meta": {"filepath": "src/Illuminate/Database/Schema/ForeignIdColumnDefinition.php", "language": "php", "file_size": 1655, "cut_index": 537, "middle_length": 229}} {"prefix": "te\\Database\\Eloquent\\Factories;\n\nuse Illuminate\\Database\\Eloquent\\Attributes\\UseFactory;\n\n/**\n * @template TFactory of \\Illuminate\\Database\\Eloquent\\Factories\\Factory\n */\ntrait HasFactory\n{\n /**\n * Get a new factory instance for the model.\n *\n * @param (callable(array, static|null): array)|array|int|null $count\n * @param (callable(array, static|null): array)|array $state\n * @return TFactory\n ", "suffix": "unt : null)\n ->state(is_callable($count) || is_array($count) ? $count : $state);\n }\n\n /**\n * Create a new factory instance for the model.\n *\n * @return TFactory|null\n */\n protected static function newFactory()\n {\n ", "middle": " */\n public static function factory($count = null, $state = [])\n {\n $factory = static::newFactory() ?? Factory::factoryForModel(static::class);\n\n return $factory\n ->count(is_numeric($count) ? $co", "meta": {"filepath": "src/Illuminate/Database/Eloquent/Factories/HasFactory.php", "language": "php", "file_size": 1724, "cut_index": 537, "middle_length": 229}} {"prefix": "/**\n * The column to add new columns after.\n *\n * @var string\n */\n public $after;\n\n /**\n * The blueprint state instance.\n *\n * @var \\Illuminate\\Database\\Schema\\BlueprintState|null\n */\n protected $state;\n\n /**\n * Create a new schema blueprint.\n *\n * @param \\Illuminate\\Database\\Connection $connection\n * @param string $table\n * @param (\\Closure(self): void)|null $callback\n */\n public function __construct(Connection $connection, $table", "suffix": ");\n }\n }\n\n /**\n * Execute the blueprint against the database.\n *\n * @return void\n */\n public function build()\n {\n foreach ($this->toSql() as $statement) {\n $this->connection->statement($statement);\n ", "middle": ", ?Closure $callback = null)\n {\n $this->connection = $connection;\n $this->grammar = $connection->getSchemaGrammar();\n $this->table = $table;\n\n if (! is_null($callback)) {\n $callback($this", "meta": {"filepath": "src/Illuminate/Database/Schema/Blueprint.php", "language": "php", "file_size": 56651, "cut_index": 2151, "middle_length": 229}} {"prefix": " * The default string length for migrations.\n *\n * @var non-negative-int|null\n */\n public static $defaultStringLength = 255;\n\n /**\n * The default time precision for migrations.\n */\n public static ?int $defaultTimePrecision = 0;\n\n /**\n * The default relationship morph key type.\n *\n * @var 'int'|'uuid'|'ulid'\n */\n public static $defaultMorphKeyType = 'int';\n\n /**\n * Create a new database Schema manager.\n *\n * @param \\Illuminate\\Database\\Connec", "suffix": "ng length for migrations.\n *\n * @param non-negative-int $length\n * @return void\n */\n public static function defaultStringLength($length)\n {\n static::$defaultStringLength = $length;\n }\n\n /**\n * Set the default time p", "middle": "tion $connection\n */\n public function __construct(Connection $connection)\n {\n $this->connection = $connection;\n $this->grammar = $connection->getSchemaGrammar();\n }\n\n /**\n * Set the default stri", "meta": {"filepath": "src/Illuminate/Database/Schema/Builder.php", "language": "php", "file_size": 21899, "cut_index": 1331, "middle_length": 229}} {"prefix": "lluminate\\Support\\Fluent;\n\n/**\n * @method $this after(string $column) Place the column \"after\" another column (MySQL)\n * @method $this always(bool $value = true) Used as a modifier for generatedAs() (PostgreSQL)\n * @method $this autoIncrement() Set INTEGER columns as auto-increment (primary key)\n * @method $this change() Change the column\n * @method $this charset(string $charset) Specify a character set for the column (MySQL)\n * @method $this collation(string $collation) Specify a collation for the column\n ", "suffix": "e (MySQL)\n * @method $this from(int $startingValue) Set the starting value of an auto-incrementing field (MySQL/PostgreSQL)\n * @method $this fulltext(bool|string $indexName = null) Add a fulltext index\n * @method $this generatedAs(string|\\Illuminate\\Contra", "middle": "* @method $this comment(string $comment) Add a comment to the column (MySQL/PostgreSQL)\n * @method $this default(mixed $value) Specify a \"default\" value for the column\n * @method $this first() Place the column \"first\" in the tabl", "meta": {"filepath": "src/Illuminate/Database/Schema/ColumnDefinition.php", "language": "php", "file_size": 2860, "cut_index": 563, "middle_length": 229}} {"prefix": "lluminate\\Support\\Fluent;\n\n/**\n * @method ForeignKeyDefinition deferrable(bool $value = true) Set the foreign key as deferrable (PostgreSQL)\n * @method ForeignKeyDefinition initiallyImmediate(bool $value = true) Set the default time to check the constraint (PostgreSQL)\n * @method ForeignKeyDefinition lock(('none'|'shared'|'default'|'exclusive') $value) Specify the DDL lock mode for the foreign key operation (MySQL)\n * @method ForeignKeyDefinition on(string $table) Specify the referenced table\n * @method For", "suffix": "referenced column(s)\n */\nclass ForeignKeyDefinition extends Fluent\n{\n /**\n * Indicate that updates should cascade.\n *\n * @return $this\n */\n public function cascadeOnUpdate()\n {\n return $this->onUpdate('cascade');\n }\n\n ", "middle": "eignKeyDefinition onDelete(string $action) Add an ON DELETE action\n * @method ForeignKeyDefinition onUpdate(string $action) Add an ON UPDATE action\n * @method ForeignKeyDefinition references(string|string[] $columns) Specify the ", "meta": {"filepath": "src/Illuminate/Database/Schema/ForeignKeyDefinition.php", "language": "php", "file_size": 2414, "cut_index": 563, "middle_length": 229}} {"prefix": "te\\Database\\Schema;\n\nuse Symfony\\Component\\Process\\Exception\\ProcessFailedException;\n\nclass MariaDbSchemaState extends MySqlSchemaState\n{\n /**\n * Load the given schema file into the database.\n *\n * @param string $path\n * @return void\n */\n public function load($path)\n {\n $versionInfo = $this->detectClientVersion();\n\n $command = 'mariadb '.$this->connectionString($versionInfo).' --database=\"${:LARAVEL_LOAD_DATABASE}\" < \"${:LARAVEL_LOAD_PATH}\"';\n\n $process = ", "suffix": " the base dump command arguments for MariaDB as a string.\n *\n * @return string\n */\n protected function baseDumpCommand()\n {\n $versionInfo = $this->detectClientVersion();\n\n $command = 'mariadb-dump '.$this->connectionString($", "middle": "$this->makeProcess($command)->setTimeout(null);\n\n $process->mustRun(null, array_merge($this->baseVariables($this->connection->getConfig()), [\n 'LARAVEL_LOAD_PATH' => $path,\n ]));\n }\n\n /**\n * Get", "meta": {"filepath": "src/Illuminate/Database/Schema/MariaDbSchemaState.php", "language": "php", "file_size": 1862, "cut_index": 537, "middle_length": 229}} {"prefix": "use Symfony\\Component\\Process\\Process;\n\nclass MySqlSchemaState extends SchemaState\n{\n /**\n * Dump the database's schema into a file.\n *\n * @param \\Illuminate\\Database\\Connection $connection\n * @param string $path\n * @return void\n */\n public function dump(Connection $connection, $path)\n {\n $this->executeDumpProcess($this->makeProcess(\n $this->baseDumpCommand().' --routines --result-file=\"${:LARAVEL_LOAD_PATH}\" --no-data'\n ), $this->output, array_m", "suffix": ">appendMigrationData($path);\n }\n }\n\n /**\n * Remove the auto-incrementing state from the given schema dump.\n *\n * @param string $path\n * @return void\n */\n protected function removeAutoIncrementingState(string $path)\n ", "middle": "erge($this->baseVariables($this->connection->getConfig()), [\n 'LARAVEL_LOAD_PATH' => $path,\n ]));\n\n $this->removeAutoIncrementingState($path);\n\n if ($this->hasMigrationTable()) {\n $this-", "meta": {"filepath": "src/Illuminate/Database/Schema/MySqlSchemaState.php", "language": "php", "file_size": 7504, "cut_index": 716, "middle_length": 229}} {"prefix": "rt\\Collection;\n\nclass PostgresSchemaState extends SchemaState\n{\n /**\n * Dump the database's schema into a file.\n *\n * @param \\Illuminate\\Database\\Connection $connection\n * @param string $path\n * @return void\n */\n public function dump(Connection $connection, $path)\n {\n $commands = new Collection([\n $this->baseDumpCommand().' --schema-only > '.$path,\n ]);\n\n if ($this->hasMigrationTable()) {\n $commands->push($this->baseDumpCommand(", "suffix": "->connection->getConfig()), [\n 'LARAVEL_LOAD_PATH' => $path,\n ]));\n });\n }\n\n /**\n * Load the given schema file into the database.\n *\n * @param string $path\n * @return void\n */\n public function", "middle": ").' -t '.$this->getMigrationTable().' --data-only >> '.$path);\n }\n\n $commands->map(function ($command, $path) {\n $this->makeProcess($command)->mustRun($this->output, array_merge($this->baseVariables($this", "meta": {"filepath": "src/Illuminate/Database/Schema/PostgresSchemaState.php", "language": "php", "file_size": 3120, "cut_index": 614, "middle_length": 229}} {"prefix": "ystem\\Filesystem;\nuse Symfony\\Component\\Process\\Process;\n\nabstract class SchemaState\n{\n /**\n * The connection instance.\n *\n * @var \\Illuminate\\Database\\Connection\n */\n protected $connection;\n\n /**\n * The filesystem instance.\n *\n * @var \\Illuminate\\Filesystem\\Filesystem\n */\n protected $files;\n\n /**\n * The name of the application's migration table.\n *\n * @var string\n */\n protected $migrationTable = 'migrations';\n\n /**\n * The process fact", "suffix": "e.\n *\n * @param \\Illuminate\\Database\\Connection $connection\n * @param \\Illuminate\\Filesystem\\Filesystem|null $files\n * @param callable|null $processFactory\n */\n public function __construct(Connection $connection, ?Filesystem $f", "middle": "ory callback.\n *\n * @var callable\n */\n protected $processFactory;\n\n /**\n * The output callable instance.\n *\n * @var callable\n */\n protected $output;\n\n /**\n * Create a new dumper instanc", "meta": {"filepath": "src/Illuminate/Database/Schema/SchemaState.php", "language": "php", "file_size": 3227, "cut_index": 614, "middle_length": 229}} {"prefix": "lluminate\\Database\\Connection;\nuse Illuminate\\Support\\Collection;\n\nclass SqliteSchemaState extends SchemaState\n{\n /**\n * Dump the database's schema into a file.\n *\n * @param \\Illuminate\\Database\\Connection $connection\n * @param string $path\n * @return void\n */\n public function dump(Connection $connection, $path)\n {\n $process = $this->makeProcess($this->baseCommand().' \".schema --indent\"')\n ->setTimeout(null)\n ->mustRun(null, array_merge($this", "suffix": "grations.PHP_EOL);\n\n if ($this->hasMigrationTable()) {\n $this->appendMigrationData($path);\n }\n }\n\n /**\n * Append the migration data to the schema dump.\n *\n * @param string $path\n * @return void\n */\n p", "middle": "->baseVariables($this->connection->getConfig()), [\n //\n ]));\n\n $migrations = preg_replace('/CREATE TABLE sqlite_.+?\\);[\\r\\n]+/is', '', $process->getOutput());\n\n $this->files->put($path, $mi", "meta": {"filepath": "src/Illuminate/Database/Schema/SqliteSchemaState.php", "language": "php", "file_size": 2873, "cut_index": 563, "middle_length": 229}} {"prefix": "false;\n\n /**\n * The name of the relationship.\n *\n * @var string\n */\n protected $relationName;\n\n /**\n * The one of many inner join subselect query builder instance.\n *\n * @var \\Illuminate\\Database\\Eloquent\\Builder<*>|null\n */\n protected $oneOfManySubQuery;\n\n /**\n * Add constraints for inner join subselect for one of many relationships.\n *\n * @param \\Illuminate\\Database\\Eloquent\\Builder<*> $query\n * @param string|null $column\n * @param st", "suffix": "ups.\n *\n * @return array|string\n */\n abstract public function getOneOfManySubQuerySelectColumns();\n\n /**\n * Add join query constraints for one of many relationships.\n *\n * @param \\Illuminate\\Database\\Query\\JoinClause $join\n ", "middle": "ring|null $aggregate\n * @return void\n */\n abstract public function addOneOfManySubQueryConstraints(Builder $query, $column = null, $aggregate = null);\n\n /**\n * Get the columns the determine the relationship gro", "meta": {"filepath": "src/Illuminate/Database/Eloquent/Relations/Concerns/CanBeOneOfMany.php", "language": "php", "file_size": 9896, "cut_index": 921, "middle_length": 229}} {"prefix": "\\Support\\Str;\n\nclass BlueprintState\n{\n /**\n * The blueprint instance.\n *\n * @var \\Illuminate\\Database\\Schema\\Blueprint\n */\n protected $blueprint;\n\n /**\n * The connection instance.\n *\n * @var \\Illuminate\\Database\\Connection\n */\n protected $connection;\n\n /**\n * The columns.\n *\n * @var \\Illuminate\\Database\\Schema\\ColumnDefinition[]\n */\n private $columns;\n\n /**\n * The primary key.\n *\n * @var \\Illuminate\\Database\\Schema\\IndexDefinit", "suffix": "e\\Database\\Schema\\ForeignKeyDefinition[]\n */\n private $foreignKeys;\n\n /**\n * Create a new blueprint state instance.\n *\n * @param \\Illuminate\\Database\\Schema\\Blueprint $blueprint\n * @param \\Illuminate\\Database\\Connection $conne", "middle": "ion|null\n */\n private $primaryKey;\n\n /**\n * The indexes.\n *\n * @var \\Illuminate\\Database\\Schema\\IndexDefinition[]\n */\n private $indexes;\n\n /**\n * The foreign keys.\n *\n * @var \\Illuminat", "meta": {"filepath": "src/Illuminate/Database/Schema/BlueprintState.php", "language": "php", "file_size": 7166, "cut_index": 716, "middle_length": 229}} {"prefix": "luent;\n\n/**\n * @method $this algorithm(string $algorithm) Specify an algorithm for the index (MySQL/PostgreSQL)\n * @method $this deferrable(bool $value = true) Specify that the unique index is deferrable (PostgreSQL)\n * @method $this initiallyImmediate(bool $value = true) Specify the default time to check the unique index constraint (PostgreSQL)\n * @method $this language(string $language) Specify a language for the full text index (PostgreSQL)\n * @method $this lock(('none'|'shared'|'default'|'exclusive') $v", "suffix": "ion (MySQL)\n * @method $this nullsNotDistinct(bool $value = true) Specify that the null values should not be treated as distinct (PostgreSQL)\n * @method $this online(bool $value = true) Specify that index creation should not lock the table (PostgreSQL/SqlS", "middle": "alue) Specify the DDL lock mode for the index operat", "meta": {"filepath": "src/Illuminate/Database/Schema/IndexDefinition.php", "language": "php", "file_size": 949, "cut_index": 582, "middle_length": 52}} {"prefix": "lluminate\\Database\\Concerns\\ParsesSearchPath;\n\nclass PostgresBuilder extends Builder\n{\n use ParsesSearchPath;\n\n /**\n * Drop all tables from the database.\n *\n * @return void\n */\n public function dropAllTables()\n {\n $tables = [];\n\n $excludedTables = $this->connection->getConfig('dont_drop') ?? ['spatial_ref_sys'];\n\n foreach ($this->getTables($this->getCurrentSchemaListing()) as $table) {\n if (empty(array_intersect([$table['name'], $table['schema_qual", "suffix": " $this->grammar->compileDropAllTables($tables)\n );\n }\n\n /**\n * Drop all views from the database.\n *\n * @return void\n */\n public function dropAllViews()\n {\n $views = array_column($this->getViews($this->getCurrent", "middle": "ified_name']], $excludedTables))) {\n $tables[] = $table['schema_qualified_name'];\n }\n }\n\n if (empty($tables)) {\n return;\n }\n\n $this->connection->statement(\n ", "meta": {"filepath": "src/Illuminate/Database/Schema/PostgresBuilder.php", "language": "php", "file_size": 2570, "cut_index": 563, "middle_length": 229}} {"prefix": "se Illuminate\\Support\\Arr;\n\nclass SqlServerBuilder extends Builder\n{\n /**\n * Drop all tables from the database.\n *\n * @return void\n */\n public function dropAllTables()\n {\n $this->connection->statement($this->grammar->compileDropAllForeignKeys());\n\n $this->connection->statement($this->grammar->compileDropAllTables());\n }\n\n /**\n * Drop all views from the database.\n *\n * @return void\n */\n public function dropAllViews()\n {\n $this->connect", "suffix": ");\n }\n\n /**\n * Get the default schema name for the connection.\n *\n * @return string|null\n */\n public function getCurrentSchemaName()\n {\n return Arr::first($this->getSchemas(), fn ($schema) => $schema['default'])['name'];\n", "middle": "ion->statement($this->grammar->compileDropAllViews()", "meta": {"filepath": "src/Illuminate/Database/Schema/SqlServerBuilder.php", "language": "php", "file_size": 875, "cut_index": 559, "middle_length": 52}} {"prefix": "\\Envelope;\nuse Symfony\\Component\\Mailer\\Exception\\TransportException;\nuse Symfony\\Component\\Mailer\\SentMessage;\nuse Symfony\\Component\\Mailer\\Transport\\AbstractTransport;\nuse Symfony\\Component\\Mime\\Address;\nuse Symfony\\Component\\Mime\\Email;\nuse Symfony\\Component\\Mime\\MessageConverter;\nuse Symfony\\Contracts\\HttpClient\\HttpClientInterface;\n\nclass CloudflareTransport extends AbstractTransport\n{\n /**\n * The HTTP Client instance.\n */\n protected HttpClientInterface $client;\n\n /**\n * Create a n", "suffix": "ent::__construct();\n\n $this->client = $client ?? HttpClient::create();\n }\n\n /**\n * {@inheritDoc}\n *\n * @throws TransportException\n */\n protected function doSend(SentMessage $message): void\n {\n try {\n $re", "middle": "ew Cloudflare transport instance.\n */\n public function __construct(\n protected string $accountId,\n #[SensitiveParameter] protected string $key,\n ?HttpClientInterface $client = null,\n ) {\n par", "meta": {"filepath": "src/Illuminate/Mail/Transport/CloudflareTransport.php", "language": "php", "file_size": 5653, "cut_index": 716, "middle_length": 229}} {"prefix": "lve the middleware name to a class name(s) preserving passed parameters.\n *\n * @param \\Closure|string $name\n * @param array $map\n * @param array $middlewareGroups\n * @return \\Closure|string|array\n */\n public static function resolve($name, $map, $middlewareGroups)\n {\n // When the middleware is simply a Closure, we will return this Closure instance\n // directly so that Closures can be registered as middleware inline, which is\n // convenient on occasions", "suffix": " }\n\n // If the middleware is the name of a middleware group, we will return the array\n // of middlewares that belong to the group. This allows developers to group a\n // set of middleware under single keys that can be conveniently ", "middle": " when the developers are experimenting with them.\n if ($name instanceof Closure) {\n return $name;\n }\n\n if (isset($map[$name]) && $map[$name] instanceof Closure) {\n return $map[$name];\n ", "meta": {"filepath": "src/Illuminate/Routing/MiddlewareNameResolver.php", "language": "php", "file_size": 3178, "cut_index": 614, "middle_length": 229}} {"prefix": "espace Illuminate\\Container\\Attributes;\n\nuse Attribute;\nuse Illuminate\\Contracts\\Container\\Container;\nuse Illuminate\\Contracts\\Container\\ContextualAttribute;\nuse UnitEnum;\n\n#[Attribute(Attribute::TARGET_PARAMETER)]\nclass Auth implements ContextualAttribute\n{\n /**\n * Create a new class instance.\n */\n public function __construct(public UnitEnum|string|null $guard = null)\n {\n }\n\n /**\n * Resolve the authentication guard.\n *\n * @param self $attribute\n * @param \\Illuminat", "suffix": "ntainer\\Container $container\n * @return \\Illuminate\\Contracts\\Auth\\Guard|\\Illuminate\\Contracts\\Auth\\StatefulGuard\n */\n public static function resolve(self $attribute, Container $container)\n {\n return $container->make('auth')->guard($a", "middle": "e\\Contracts\\Co", "meta": {"filepath": "src/Illuminate/Container/Attributes/Auth.php", "language": "php", "file_size": 818, "cut_index": 522, "middle_length": 14}} {"prefix": "upport\\Arr;\nuse Illuminate\\Support\\Facades\\File;\n\nclass SQLiteBuilder extends Builder\n{\n /**\n * Create a database in the schema.\n *\n * @param string $name\n * @return bool\n */\n public function createDatabase($name)\n {\n return File::put($name, '') !== false;\n }\n\n /**\n * Drop a database from the schema if the database exists.\n *\n * @param string $name\n * @return bool\n */\n public function dropDatabaseIfExists($name)\n {\n return ! File", "suffix": " } catch (QueryException) {\n $withSize = false;\n }\n\n if (version_compare($this->connection->getServerVersion(), '3.37.0', '<')) {\n $schema ??= array_column($this->getSchemas(), 'name');\n\n $tables = [];\n\n ", "middle": "::exists($name) || File::delete($name);\n }\n\n /** @inheritDoc */\n public function getTables($schema = null)\n {\n try {\n $withSize = $this->connection->scalar($this->grammar->compileDbstatExists());\n ", "meta": {"filepath": "src/Illuminate/Database/Schema/SQLiteBuilder.php", "language": "php", "file_size": 4902, "cut_index": 614, "middle_length": 229}} {"prefix": " use CompilesJsonPaths;\n\n /**\n * The possible column modifiers.\n *\n * @var string[]\n */\n protected $modifiers = [];\n\n /**\n * If this Grammar supports schema changes wrapped in a transaction.\n *\n * @var bool\n */\n protected $transactions = false;\n\n /**\n * The commands to be executed outside of create or alter command.\n *\n * @var array\n */\n protected $fluentCommands = [];\n\n /**\n * Compile a create database command.\n *\n * @param ", "suffix": "database if exists command.\n *\n * @param string $name\n * @return string\n */\n public function compileDropDatabaseIfExists($name)\n {\n return sprintf('drop database if exists %s',\n $this->wrapValue($name)\n );\n ", "middle": "string $name\n * @return string\n */\n public function compileCreateDatabase($name)\n {\n return sprintf('create database %s',\n $this->wrapValue($name),\n );\n }\n\n /**\n * Compile a drop ", "meta": {"filepath": "src/Illuminate/Database/Schema/Grammars/Grammar.php", "language": "php", "file_size": 15049, "cut_index": 921, "middle_length": 229}} {"prefix": " public function compileSchemas()\n {\n return 'select schema_name as name, schema_name = schema() as `default` from information_schema.schemata where '\n .$this->compileSchemaWhereClause(null, 'schema_name')\n .' order by schema_name';\n }\n\n /**\n * Compile the query to determine if the given table exists.\n *\n * @param string|null $schema\n * @param string $table\n * @return string\n */\n public function compileTableExists($schema, $table)\n {\n ", "suffix": " $schema ? $this->quoteString($schema) : 'schema()',\n $this->quoteString($table)\n );\n }\n\n /**\n * Compile the query to determine the tables.\n *\n * @param string|string[]|null $schema\n * @return string\n */\n pu", "middle": " return sprintf(\n 'select exists (select 1 from information_schema.tables where '\n .\"table_schema = %s and table_name = %s and table_type in ('BASE TABLE', 'SYSTEM VERSIONED')) as `exists`\",\n ", "meta": {"filepath": "src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php", "language": "php", "file_size": 43048, "cut_index": 2151, "middle_length": 229}} {"prefix": "'\n .$this->compileSchemaWhereClause(null, 'nspname')\n .' order by nspname';\n }\n\n /**\n * Compile the query to determine if the given table exists.\n *\n * @param string|null $schema\n * @param string $table\n * @return string\n */\n public function compileTableExists($schema, $table)\n {\n return sprintf(\n 'select exists (select 1 from pg_class c, pg_namespace n where '\n .\"n.nspname = %s and c.relname = %s and c.relkind in ('r", "suffix": " *\n * @param string|string[]|null $schema\n * @return string\n */\n public function compileTables($schema)\n {\n return 'select c.relname as name, n.nspname as schema, pg_total_relation_size(c.oid) as size, '\n .\"obj_descrip", "middle": "', 'p') and n.oid = c.relnamespace)\",\n $schema ? $this->quoteString($schema) : 'current_schema()',\n $this->quoteString($table)\n );\n }\n\n /**\n * Compile the query to determine the tables.\n ", "meta": {"filepath": "src/Illuminate/Database/Schema/Grammars/PostgresGrammar.php", "language": "php", "file_size": 41031, "cut_index": 2151, "middle_length": 229}} {"prefix": "\nnamespace Illuminate\\Database\\Schema;\n\nclass MySqlBuilder extends Builder\n{\n /**\n * Drop all tables from the database.\n *\n * @return void\n */\n public function dropAllTables()\n {\n $tables = $this->getTableListing($this->getCurrentSchemaListing());\n\n if (empty($tables)) {\n return;\n }\n\n $this->disableForeignKeyConstraints();\n\n try {\n $this->connection->statement(\n $this->grammar->compileDropAllTables($tables)\n ", "suffix": " $views = array_column($this->getViews($this->getCurrentSchemaListing()), 'schema_qualified_name');\n\n if (empty($views)) {\n return;\n }\n\n $this->connection->statement(\n $this->grammar->compileDropAllViews($views)\n", "middle": " );\n } finally {\n $this->enableForeignKeyConstraints();\n }\n }\n\n /**\n * Drop all views from the database.\n *\n * @return void\n */\n public function dropAllViews()\n {\n ", "meta": {"filepath": "src/Illuminate/Database/Schema/MySqlBuilder.php", "language": "php", "file_size": 1243, "cut_index": 518, "middle_length": 229}} {"prefix": "\\Database\\Events\\MigrationEvent as MigrationEventContract;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nabstract class MigrationEvent implements MigrationEventContract\n{\n /**\n * A migration instance.\n *\n * @var \\Illuminate\\Database\\Migrations\\Migration\n */\n public $migration;\n\n /**\n * The migration method that was called.\n *\n * @var string\n */\n public $method;\n\n /**\n * The migration name.\n *\n * @var string|null\n */\n public $name;\n\n /**\n ", "suffix": "ram \\Illuminate\\Database\\Migrations\\Migration $migration\n * @param string $method\n * @param string|null $name\n */\n public function __construct(Migration $migration, $method, $name = null)\n {\n $this->method = $method;\n ", "middle": " * Create a new event instance.\n *\n * @pa", "meta": {"filepath": "src/Illuminate/Database/Events/MigrationEvent.php", "language": "php", "file_size": 958, "cut_index": 582, "middle_length": 52}} {"prefix": "te\\Database\\Events;\n\nclass QueryExecuted\n{\n /**\n * The SQL query that was executed.\n *\n * @var string\n */\n public $sql;\n\n /**\n * The array of query bindings.\n *\n * @var array\n */\n public $bindings;\n\n /**\n * The number of milliseconds it took to execute the query.\n *\n * @var float\n */\n public $time;\n\n /**\n * The database connection instance.\n *\n * @var \\Illuminate\\Database\\Connection\n */\n public $connection;\n\n /**\n ", "suffix": "Type;\n\n /**\n * Create a new event instance.\n *\n * @param string $sql\n * @param array $bindings\n * @param float|null $time\n * @param \\Illuminate\\Database\\Connection $connection\n * @param null|'read'|'write' $readWrit", "middle": " * The database connection name.\n *\n * @var string\n */\n public $connectionName;\n\n /**\n * The PDO read / write type for the executed query.\n *\n * @var null|'read'|'write'\n */\n public $readWrite", "meta": {"filepath": "src/Illuminate/Database/Events/QueryExecuted.php", "language": "php", "file_size": 1734, "cut_index": 537, "middle_length": 229}} {"prefix": "Method\n{\n /**\n * Call the given Closure / class@method and inject its dependencies.\n *\n * @param \\Illuminate\\Container\\Container $container\n * @param callable|string $callback\n * @param array $parameters\n * @param string|null $defaultMethod\n * @return mixed\n *\n * @throws \\ReflectionException\n * @throws \\InvalidArgumentException\n */\n public static function call($container, $callback, array $parameters = [], $defaultMethod = null)\n {\n if (is_", "suffix": "ic::callClass($container, $callback, $parameters, $defaultMethod);\n }\n\n return static::callBoundMethod($container, $callback, function () use ($container, $callback, $parameters) {\n return $callback(...array_values(static::getMetho", "middle": "string($callback) && ! $defaultMethod && method_exists($callback, '__invoke')) {\n $defaultMethod = '__invoke';\n }\n\n if (static::isCallableWithAtSign($callback) || $defaultMethod) {\n return stat", "meta": {"filepath": "src/Illuminate/Container/BoundMethod.php", "language": "php", "file_size": 7736, "cut_index": 716, "middle_length": 229}} {"prefix": "hp\n\nnamespace Illuminate\\Container;\n\nuse Countable;\nuse IteratorAggregate;\nuse Traversable;\n\nclass RewindableGenerator implements Countable, IteratorAggregate\n{\n /**\n * The generator callback.\n *\n * @var callable\n */\n protected $generator;\n\n /**\n * The number of tagged services.\n *\n * @var callable|int\n */\n protected $count;\n\n /**\n * Create a new generator instance.\n *\n * @param callable $generator\n * @param callable|int $count\n */\n p", "suffix": " */\n public function getIterator(): Traversable\n {\n return ($this->generator)();\n }\n\n /**\n * Get the total number of tagged services.\n *\n * @return int\n */\n public function count(): int\n {\n if (is_callable($c", "middle": "ublic function __construct(callable $generator, $count)\n {\n $this->count = $count;\n $this->generator = $generator;\n }\n\n /**\n * Get an iterator from the generator.\n *\n * @return \\Traversable\n ", "meta": {"filepath": "src/Illuminate/Container/RewindableGenerator.php", "language": "php", "file_size": 1109, "cut_index": 515, "middle_length": 229}} {"prefix": "space Illuminate\\Container\\Attributes;\n\nuse Attribute;\nuse Illuminate\\Contracts\\Container\\Container;\nuse Illuminate\\Contracts\\Container\\ContextualAttribute;\nuse UnitEnum;\n\n#[Attribute(Attribute::TARGET_PARAMETER)]\nclass Authenticated implements ContextualAttribute\n{\n /**\n * Create a new class instance.\n */\n public function __construct(public UnitEnum|string|null $guard = null)\n {\n }\n\n /**\n * Resolve the currently authenticated user.\n *\n * @param self $attribute\n * @p", "suffix": "ntainer\n * @return \\Illuminate\\Contracts\\Auth\\Authenticatable|null\n */\n public static function resolve(self $attribute, Container $container)\n {\n return call_user_func($container->make('auth')->userResolver(), $attribute->guard);\n }", "middle": "aram \\Illuminate\\Contracts\\Container\\Container $co", "meta": {"filepath": "src/Illuminate/Container/Attributes/Authenticated.php", "language": "php", "file_size": 834, "cut_index": 523, "middle_length": 52}} {"prefix": "eString($name)\n );\n }\n\n /**\n * Compile the query to determine if the dbstat table is available.\n *\n * @return string\n */\n public function compileDbstatExists()\n {\n return \"select exists (select 1 from pragma_compile_options where compile_options = 'ENABLE_DBSTAT_VTAB') as enabled\";\n }\n\n /**\n * Compile the query to determine the schemas.\n *\n * @return string\n */\n public function compileSchemas()\n {\n return 'select name, file as path", "suffix": " * @return string\n */\n public function compileTableExists($schema, $table)\n {\n return sprintf(\n 'select exists (select 1 from %s.sqlite_master where name = %s and type = \\'table\\') as \"exists\"',\n $this->wrapValue($sc", "middle": ", name = \\'main\\' as \"default\" from pragma_database_list order by name';\n }\n\n /**\n * Compile the query to determine if the given table exists.\n *\n * @param string|null $schema\n * @param string $table\n ", "meta": {"filepath": "src/Illuminate/Database/Schema/Grammars/SQLiteGrammar.php", "language": "php", "file_size": 36147, "cut_index": 2151, "middle_length": 229}} {"prefix": "amespace Illuminate\\Database\\Events;\n\nuse Illuminate\\Database\\Connection;\n\nclass MigrationsPruned\n{\n /**\n * The database connection instance.\n *\n * @var \\Illuminate\\Database\\Connection\n */\n public $connection;\n\n /**\n * The database connection name.\n *\n * @var string|null\n */\n public $connectionName;\n\n /**\n * The path to the directory where migrations were pruned.\n *\n * @var string\n */\n public $path;\n\n /**\n * Create a new event instance", "suffix": "ion $connection\n * @param string $path\n */\n public function __construct(Connection $connection, string $path)\n {\n $this->connection = $connection;\n $this->connectionName = $connection->getName();\n $this->path = $path;\n", "middle": ".\n *\n * @param \\Illuminate\\Database\\Connect", "meta": {"filepath": "src/Illuminate/Database/Events/MigrationsPruned.php", "language": "php", "file_size": 836, "cut_index": 520, "middle_length": 52}} {"prefix": " [];\n\n /**\n * The registered aliases keyed by the abstract name.\n *\n * @var array[]\n */\n protected $abstractAliases = [];\n\n /**\n * The extension closures for services.\n *\n * @var array[]\n */\n protected $extenders = [];\n\n /**\n * All of the registered tags.\n *\n * @var array[]\n */\n protected $tags = [];\n\n /**\n * The stack of concretions currently being built.\n *\n * @var array[]\n */\n protected $buildStack = [];\n\n /**\n ", "suffix": "ual attribute handlers.\n *\n * @var array[]\n */\n public $contextualAttributes = [];\n\n /**\n * Whether an abstract class has already had its attributes checked for bindings.\n *\n * @var array\n */\n protec", "middle": " * The parameter override stack.\n *\n * @var array[]\n */\n protected $with = [];\n\n /**\n * The contextual binding map.\n *\n * @var array[]\n */\n public $contextual = [];\n\n /**\n * The context", "meta": {"filepath": "src/Illuminate/Container/Container.php", "language": "php", "file_size": 52456, "cut_index": 2151, "middle_length": 229}} {"prefix": ";\nuse Illuminate\\Contracts\\Container\\ContextualAttribute;\nuse ReflectionAttribute;\nuse ReflectionNamedType;\n\n/**\n * @internal\n */\nclass Util\n{\n /**\n * If the given value is not an array and not null, wrap it in one.\n *\n * From Arr::wrap() in Illuminate\\Support.\n *\n * @param mixed $value\n * @return array\n */\n public static function arrayWrap($value)\n {\n if (is_null($value)) {\n return [];\n }\n\n return is_array($value) ? $value : [$value];\n ", "suffix": " public static function unwrapIfClosure($value, ...$args)\n {\n return $value instanceof Closure ? $value(...$args) : $value;\n }\n\n /**\n * Get the class name of the given parameter's type, if possible.\n *\n * From Reflector::getPara", "middle": " }\n\n /**\n * Return the default value of the given value.\n *\n * From global value() helper in Illuminate\\Support.\n *\n * @param mixed $value\n * @param mixed ...$args\n * @return mixed\n */\n ", "meta": {"filepath": "src/Illuminate/Container/Util.php", "language": "php", "file_size": 2140, "cut_index": 563, "middle_length": 229}} {"prefix": "ate\\Contracts\\Container\\Container;\nuse Illuminate\\Contracts\\Container\\ContextualBindingBuilder as ContextualBindingBuilderContract;\n\nclass ContextualBindingBuilder implements ContextualBindingBuilderContract\n{\n /**\n * The underlying container instance.\n *\n * @var \\Illuminate\\Contracts\\Container\\Container\n */\n protected $container;\n\n /**\n * The concrete instance.\n *\n * @var string|array\n */\n protected $concrete;\n\n /**\n * The abstract target.\n *\n * @v", "suffix": "c function __construct(Container $container, $concrete)\n {\n $this->concrete = $concrete;\n $this->container = $container;\n }\n\n /**\n * Define the abstract target that depends on the context.\n *\n * @param string $abstract\n", "middle": "ar string\n */\n protected $needs;\n\n /**\n * Create a new contextual binding builder.\n *\n * @param \\Illuminate\\Contracts\\Container\\Container $container\n * @param string|array $concrete\n */\n publi", "meta": {"filepath": "src/Illuminate/Container/ContextualBindingBuilder.php", "language": "php", "file_size": 2364, "cut_index": 563, "middle_length": 229}} {"prefix": "tring[]\n */\n protected $fluentCommands = ['Default'];\n\n /**\n * Compile the query to determine the schemas.\n *\n * @return string\n */\n public function compileSchemas()\n {\n return 'select name, iif(schema_id = schema_id(), 1, 0) as [default] from sys.schemas '\n .\"where name not in ('information_schema', 'sys') and name not like 'db[_]%' order by name\";\n }\n\n /**\n * Compile the query to determine if the given table exists.\n *\n * @param string|n", "suffix": "e 1 end) as [exists]',\n $this->quoteString($schema ? $schema.'.'.$table : $table)\n );\n }\n\n /**\n * Compile the query to determine the tables.\n *\n * @param string|string[]|null $schema\n * @return string\n */\n p", "middle": "ull $schema\n * @param string $table\n * @return string\n */\n public function compileTableExists($schema, $table)\n {\n return sprintf(\n 'select (case when object_id(%s, \\'U\\') is null then 0 els", "meta": {"filepath": "src/Illuminate/Database/Schema/Grammars/SqlServerGrammar.php", "language": "php", "file_size": 31505, "cut_index": 1331, "middle_length": 229}} {"prefix": "pace Illuminate\\Container\\Attributes;\n\nuse Attribute;\nuse InvalidArgumentException;\nuse UnitEnum;\n\nuse function Illuminate\\Support\\enum_value;\n\n#[Attribute(Attribute::TARGET_CLASS | Attribute::IS_REPEATABLE)]\nclass Bind\n{\n /**\n * The concrete class to bind to.\n *\n * @var class-string\n */\n public string $concrete;\n\n /**\n * The environments the binding should apply for.\n *\n * @var non-empty-array\n */\n public array $environments = [];\n\n /**\n * Cre", "suffix": "\n */\n public function __construct(\n string $concrete,\n string|array|UnitEnum $environments = ['*'],\n ) {\n $environments = array_filter(is_array($environments) ? $environments : [$environments]);\n\n if ($environments ===", "middle": "ate a new attribute instance.\n *\n * @param class-string $concrete\n * @param non-empty-array|non-empty-string|\\UnitEnum $environments\n *\n * @throws \\InvalidArgumentException", "meta": {"filepath": "src/Illuminate/Container/Attributes/Bind.php", "language": "php", "file_size": 1320, "cut_index": 524, "middle_length": 229}} {"prefix": "tainer\\Container;\nuse Illuminate\\Contracts\\Container\\ContextualAttribute;\nuse UnitEnum;\n\n#[Attribute(Attribute::TARGET_PARAMETER)]\nclass Cache implements ContextualAttribute\n{\n /**\n * Create a new class instance.\n */\n public function __construct(\n public UnitEnum|string|null $store = null,\n public bool $memo = false,\n ) {\n }\n\n /**\n * Resolve the cache store.\n *\n * @param self $attribute\n * @param \\Illuminate\\Contracts\\Container\\Container $container\n ", "suffix": " */\n public static function resolve(self $attribute, Container $container)\n {\n return $attribute->memo\n ? $container->make('cache')->memo($attribute->store)\n : $container->make('cache')->store($attribute->store);\n ", "middle": " * @return \\Illuminate\\Contracts\\Cache\\Repository\n", "meta": {"filepath": "src/Illuminate/Container/Attributes/Cache.php", "language": "php", "file_size": 918, "cut_index": 606, "middle_length": 52}} {"prefix": "php\n\nnamespace Illuminate\\Container\\Attributes;\n\nuse Attribute;\nuse Illuminate\\Contracts\\Container\\Container;\nuse Illuminate\\Contracts\\Container\\ContextualAttribute;\nuse UnitEnum;\n\n#[Attribute(Attribute::TARGET_PARAMETER)]\nclass Database implements ContextualAttribute\n{\n /**\n * Create a new class instance.\n */\n public function __construct(public UnitEnum|string|null $connection = null)\n {\n }\n\n /**\n * Resolve the database connection.\n *\n * @param self $attribute\n * @p", "suffix": "ate\\Contracts\\Container\\Container $container\n * @return \\Illuminate\\Database\\Connection\n */\n public static function resolve(self $attribute, Container $container)\n {\n return $container->make('db')->connection($attribute->connection);\n", "middle": "aram \\Illumin", "meta": {"filepath": "src/Illuminate/Container/Attributes/Database.php", "language": "php", "file_size": 792, "cut_index": 514, "middle_length": 14}} {"prefix": "\nnamespace Illuminate\\Container\\Attributes;\n\nuse Attribute;\nuse Illuminate\\Contracts\\Container\\Container;\nuse Illuminate\\Contracts\\Container\\ContextualAttribute;\nuse UnitEnum;\n\nuse function Illuminate\\Support\\enum_value;\n\n#[Attribute(Attribute::TARGET_PARAMETER)]\nclass Log implements ContextualAttribute\n{\n /**\n * Create a new class instance.\n *\n * @param UnitEnum|string|null $channel The log configuration's channel name.\n * @param UnitEnum|string|null $name The name to prefix all lo", "suffix": "the log channel.\n *\n * @param self $attribute\n * @param \\Illuminate\\Contracts\\Container\\Container $container\n * @return \\Psr\\Log\\LoggerInterface\n */\n public static function resolve(self $attribute, Container $container)\n {\n ", "middle": "gs with. Only to be used with Monolog drivers.\n */\n public function __construct(\n public UnitEnum|string|null $channel = null,\n public UnitEnum|string|null $name = null,\n ) {\n }\n\n /**\n * Resolve ", "meta": {"filepath": "src/Illuminate/Container/Attributes/Log.php", "language": "php", "file_size": 1241, "cut_index": 518, "middle_length": 229}} {"prefix": "rt\\Facades\\Storage;\nuse Illuminate\\Support\\Str;\nuse Illuminate\\Support\\Traits\\Macroable;\nuse InvalidArgumentException;\nuse RuntimeException;\n\nclass Attachment\n{\n use Macroable;\n\n /**\n * The attached file's filename.\n *\n * @var string|null\n */\n public $as;\n\n /**\n * The attached file's MIME type.\n *\n * @var string|null\n */\n public $mime;\n\n /**\n * A callback that attaches the attachment to the mail message.\n *\n * @var \\Closure\n */\n protected ", "suffix": "mail attachment from a path.\n *\n * @param string $path\n * @return static\n */\n public static function fromPath($path)\n {\n return new static(fn ($attachment, $pathStrategy) => $pathStrategy($path, $attachment));\n }\n\n /**\n", "middle": "$resolver;\n\n /**\n * Create a mail attachment.\n *\n * @param \\Closure $resolver\n */\n private function __construct(Closure $resolver)\n {\n $this->resolver = $resolver;\n }\n\n /**\n * Create a ", "meta": {"filepath": "src/Illuminate/Mail/Attachment.php", "language": "php", "file_size": 6425, "cut_index": 716, "middle_length": 229}} {"prefix": "ostmarkTransportFactory;\nuse Symfony\\Component\\Mailer\\Transport\\Dsn;\nuse Symfony\\Component\\Mailer\\Transport\\FailoverTransport;\nuse Symfony\\Component\\Mailer\\Transport\\RoundRobinTransport;\nuse Symfony\\Component\\Mailer\\Transport\\SendmailTransport;\nuse Symfony\\Component\\Mailer\\Transport\\Smtp\\EsmtpTransport;\nuse Symfony\\Component\\Mailer\\Transport\\Smtp\\EsmtpTransportFactory;\nuse Symfony\\Component\\Mailer\\Transport\\Smtp\\Stream\\SocketStream;\n\nuse function Illuminate\\Support\\enum_value;\n\n/**\n * @mixin \\Illuminate\\Mai", "suffix": "d mailers.\n *\n * @var array\n */\n protected $mailers = [];\n\n /**\n * The registered custom driver creators.\n *\n * @var array\n */\n protected $customCreators = [];\n\n /**\n * Create a new Mail manager instance.\n *\n", "middle": "l\\Mailer\n */\nclass MailManager implements FactoryContract\n{\n /**\n * The application instance.\n *\n * @var \\Illuminate\\Contracts\\Foundation\\Application\n */\n protected $app;\n\n /**\n * The array of resolve", "meta": {"filepath": "src/Illuminate/Mail/MailManager.php", "language": "php", "file_size": 19154, "cut_index": 1331, "middle_length": 229}} {"prefix": " [];\n\n /**\n * The \"to\" recipients of the message.\n *\n * @var array\n */\n public $to = [];\n\n /**\n * The \"cc\" recipients of the message.\n *\n * @var array\n */\n public $cc = [];\n\n /**\n * The \"bcc\" recipients of the message.\n *\n * @var array\n */\n public $bcc = [];\n\n /**\n * The \"reply to\" recipients of the message.\n *\n * @var array\n */\n public $replyTo = [];\n\n /**\n * The subject of the message.\n *\n * @var string\n", "suffix": "g\n */\n protected $html;\n\n /**\n * The view to use for the message.\n *\n * @var string\n */\n public $view;\n\n /**\n * The plain text view to use for the message.\n *\n * @var string\n */\n public $textView;\n\n /**", "middle": " */\n public $subject;\n\n /**\n * The Markdown template for the message (if applicable).\n *\n * @var string\n */\n public $markdown;\n\n /**\n * The HTML to use for the message.\n *\n * @var strin", "meta": {"filepath": "src/Illuminate/Mail/Mailable.php", "language": "php", "file_size": 51798, "cut_index": 2151, "middle_length": 229}} {"prefix": " Mailer implements MailerContract, MailQueueContract\n{\n use Macroable;\n\n /**\n * The name that is configured for the mailer.\n *\n * @var string\n */\n protected $name;\n\n /**\n * The view factory instance.\n *\n * @var \\Illuminate\\Contracts\\View\\Factory\n */\n protected $views;\n\n /**\n * The Symfony Transport instance.\n *\n * @var \\Symfony\\Component\\Mailer\\Transport\\TransportInterface\n */\n protected $transport;\n\n /**\n * The event dispatcher ins", "suffix": "bal reply-to address and name.\n *\n * @var array\n */\n protected $replyTo;\n\n /**\n * The global return path address.\n *\n * @var array\n */\n protected $returnPath;\n\n /**\n * The global to address and name.\n *\n ", "middle": "tance.\n *\n * @var \\Illuminate\\Contracts\\Events\\Dispatcher|null\n */\n protected $events;\n\n /**\n * The global from address and name.\n *\n * @var array\n */\n protected $from;\n\n /**\n * The glo", "meta": {"filepath": "src/Illuminate/Mail/Mailer.php", "language": "php", "file_size": 18825, "cut_index": 1331, "middle_length": 229}} {"prefix": " ForwardsCalls;\n\n /**\n * The Symfony Email instance.\n *\n * @var \\Symfony\\Component\\Mime\\Email\n */\n protected $message;\n\n /**\n * CIDs of files embedded in the message.\n *\n * @deprecated Will be removed in a future Laravel version.\n *\n * @var array\n */\n protected $embeddedFiles = [];\n\n /**\n * Create a new message instance.\n *\n * @param \\Symfony\\Component\\Mime\\Email $message\n */\n public function __construct(Email $message)\n {\n ", "suffix": ", $name = null)\n {\n is_array($address)\n ? $this->message->from(...$this->ensureAddressesAreSafe($address))\n : $this->message->from($this->createAddress($address, (string) $name));\n\n return $this;\n }\n\n /**\n *", "middle": " $this->message = $message;\n }\n\n /**\n * Add a \"from\" address to the message.\n *\n * @param string|array $address\n * @param string|null $name\n * @return $this\n */\n public function from($address", "meta": {"filepath": "src/Illuminate/Mail/Message.php", "language": "php", "file_size": 11716, "cut_index": 921, "middle_length": 229}} {"prefix": "upport\\Collection;\nuse Illuminate\\Support\\Traits\\ForwardsCalls;\nuse Symfony\\Component\\Mailer\\SentMessage as SymfonySentMessage;\n\n/**\n * @mixin \\Symfony\\Component\\Mailer\\SentMessage\n */\nclass SentMessage\n{\n use ForwardsCalls;\n\n /**\n * The Symfony SentMessage instance.\n *\n * @var \\Symfony\\Component\\Mailer\\SentMessage\n */\n protected $sentMessage;\n\n /**\n * Create a new SentMessage instance.\n *\n * @param \\Symfony\\Component\\Mailer\\SentMessage $sentMessage\n */\n publ", "suffix": "e\n */\n public function getSymfonySentMessage()\n {\n return $this->sentMessage;\n }\n\n /**\n * Dynamically pass missing methods to the Symfony instance.\n *\n * @param string $method\n * @param array $parameters\n * @r", "middle": "ic function __construct(SymfonySentMessage $sentMessage)\n {\n $this->sentMessage = $sentMessage;\n }\n\n /**\n * Get the underlying Symfony Email instance.\n *\n * @return \\Symfony\\Component\\Mailer\\SentMessag", "meta": {"filepath": "src/Illuminate/Mail/SentMessage.php", "language": "php", "file_size": 2044, "cut_index": 563, "middle_length": 229}} {"prefix": "ml PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\ngetLocale()) }}\">\n\n{{ config('app.name') }}\n\n\n\n\n\n{!! $head ?? '' !!}\nmake(Repository::class);\n\n return match ($attribute->hidden) {\n true => $repository->getHidden($attribute->key, $attribute->default),\n false => $repository->get($attribute->key, $attribute->d", "middle": "value.\n *\n * @param self $attribute\n * @param \\Illuminate\\Contracts\\Container\\Container $container\n * @return mixed\n */\n public static function resolve(self $attribute, Container $container): mixed\n ", "meta": {"filepath": "src/Illuminate/Container/Attributes/Context.php", "language": "php", "file_size": 1025, "cut_index": 512, "middle_length": 229}} {"prefix": "?php\n\nnamespace Illuminate\\Container\\Attributes;\n\nuse Attribute;\nuse Illuminate\\Contracts\\Container\\Container;\nuse Illuminate\\Contracts\\Container\\ContextualAttribute;\nuse UnitEnum;\n\n#[Attribute(Attribute::TARGET_PARAMETER)]\nclass Storage implements ContextualAttribute\n{\n /**\n * Create a new class instance.\n */\n public function __construct(public UnitEnum|string|null $disk = null)\n {\n }\n\n /**\n * Resolve the storage disk.\n *\n * @param self $attribute\n * @param \\Illumi", "suffix": "\\Container\\Container $container\n * @return \\Illuminate\\Contracts\\Filesystem\\Filesystem\n */\n public static function resolve(self $attribute, Container $container)\n {\n return $container->make('filesystem')->disk($attribute->disk);\n }", "middle": "nate\\Contracts", "meta": {"filepath": "src/Illuminate/Container/Attributes/Storage.php", "language": "php", "file_size": 786, "cut_index": 513, "middle_length": 14}} {"prefix": "te\\Mail;\n\nuse Illuminate\\Contracts\\Support\\DeferrableProvider;\nuse Illuminate\\Support\\ServiceProvider;\n\nclass MailServiceProvider extends ServiceProvider implements DeferrableProvider\n{\n /**\n * Register the service provider.\n *\n * @return void\n */\n public function register()\n {\n $this->registerIlluminateMailer();\n $this->registerMarkdownRenderer();\n }\n\n /**\n * Register the Illuminate mailer instance.\n *\n * @return void\n */\n protected function r", "suffix": "make('mail.manager')->mailer();\n });\n }\n\n /**\n * Register the Markdown renderer instance.\n *\n * @return void\n */\n protected function registerMarkdownRenderer()\n {\n if ($this->app->runningInConsole()) {\n ", "middle": "egisterIlluminateMailer()\n {\n $this->app->singleton('mail.manager', function ($app) {\n return new MailManager($app);\n });\n\n $this->app->bind('mailer', function ($app) {\n return $app->", "meta": {"filepath": "src/Illuminate/Mail/MailServiceProvider.php", "language": "php", "file_size": 1843, "cut_index": 537, "middle_length": 229}} {"prefix": "uminate\\Contracts\\Mail\\Mailer as MailerContract;\nuse Illuminate\\Contracts\\Translation\\HasLocalePreference;\nuse Illuminate\\Support\\Traits\\Conditionable;\n\nclass PendingMail\n{\n use Conditionable;\n\n /**\n * The mailer instance.\n *\n * @var \\Illuminate\\Contracts\\Mail\\Mailer\n */\n protected $mailer;\n\n /**\n * The locale of the message.\n *\n * @var string\n */\n protected $locale;\n\n /**\n * The \"to\" recipients of the message.\n *\n * @var array\n */\n protec", "suffix": " [];\n\n /**\n * Create a new mailable mailer instance.\n *\n * @param \\Illuminate\\Contracts\\Mail\\Mailer $mailer\n */\n public function __construct(MailerContract $mailer)\n {\n $this->mailer = $mailer;\n }\n\n /**\n * Set th", "middle": "ted $to = [];\n\n /**\n * The \"cc\" recipients of the message.\n *\n * @var array\n */\n protected $cc = [];\n\n /**\n * The \"bcc\" recipients of the message.\n *\n * @var array\n */\n protected $bcc =", "meta": {"filepath": "src/Illuminate/Mail/PendingMail.php", "language": "php", "file_size": 3852, "cut_index": 614, "middle_length": 229}} {"prefix": "pace Illuminate\\Mail;\n\nuse Illuminate\\Support\\Traits\\ForwardsCalls;\n\n/**\n * @mixin \\Illuminate\\Mail\\Message\n */\nclass TextMessage\n{\n use ForwardsCalls;\n\n /**\n * The underlying message instance.\n *\n * @var \\Illuminate\\Mail\\Message\n */\n protected $message;\n\n /**\n * Create a new text message instance.\n *\n * @param \\Illuminate\\Mail\\Message $message\n */\n public function __construct($message)\n {\n $this->message = $message;\n }\n\n /**\n * Embed a fi", "suffix": "}\n\n /**\n * Embed in-memory data in the message and get the CID.\n *\n * @param string|resource $data\n * @param string $name\n * @param string|null $contentType\n * @return string\n */\n public function embedData($data, $na", "middle": "le in the message and get the CID.\n *\n * @param string|\\Illuminate\\Contracts\\Mail\\Attachable|\\Illuminate\\Mail\\Attachment $file\n * @return string\n */\n public function embed($file)\n {\n return '';\n ", "meta": {"filepath": "src/Illuminate/Mail/TextMessage.php", "language": "php", "file_size": 1398, "cut_index": 524, "middle_length": 229}} {"prefix": "\\CommonMark\\Environment\\Environment;\nuse League\\CommonMark\\Extension\\CommonMark\\CommonMarkCoreExtension;\nuse League\\CommonMark\\Extension\\Table\\TableExtension;\nuse League\\CommonMark\\MarkdownConverter;\nuse TijsVerkoyen\\CssToInlineStyles\\CssToInlineStyles;\n\nclass Markdown\n{\n /**\n * The view factory implementation.\n *\n * @var \\Illuminate\\Contracts\\View\\Factory\n */\n protected $view;\n\n /**\n * The current theme being used when generating emails.\n *\n * @var string\n */\n pr", "suffix": "ool\n */\n protected static $withSecuredEncoding = false;\n\n /**\n * The registered CommonMark extensions.\n *\n * @var array>\n */\n protected static $extensions = [];", "middle": "otected $theme = 'default';\n\n /**\n * The registered component paths.\n *\n * @var array\n */\n protected $componentPaths = [];\n\n /**\n * Indicates if secure encoding should be enabled.\n *\n * @var b", "meta": {"filepath": "src/Illuminate/Mail/Markdown.php", "language": "php", "file_size": 7987, "cut_index": 716, "middle_length": 229}} {"prefix": "pace Illuminate\\Mail\\Transport;\n\nuse Illuminate\\Support\\Collection;\nuse Stringable;\nuse Symfony\\Component\\Mailer\\Envelope;\nuse Symfony\\Component\\Mailer\\SentMessage;\nuse Symfony\\Component\\Mailer\\Transport\\TransportInterface;\nuse Symfony\\Component\\Mime\\RawMessage;\n\nclass ArrayTransport implements Stringable, TransportInterface\n{\n /**\n * The collection of Symfony Messages.\n *\n * @var \\Illuminate\\Support\\Collection\n */\n protected $messages;\n\n /**\n * Create a new array transport inst", "suffix": " {\n return $this->messages[] = new SentMessage($message, $envelope ?? Envelope::create($message));\n }\n\n /**\n * Retrieve the collection of messages.\n *\n * @return \\Illuminate\\Support\\Collection\n */\n public function messages", "middle": "ance.\n */\n public function __construct()\n {\n $this->messages = new Collection;\n }\n\n /**\n * {@inheritdoc}\n */\n public function send(RawMessage $message, ?Envelope $envelope = null): ?SentMessage\n ", "meta": {"filepath": "src/Illuminate/Mail/Transport/ArrayTransport.php", "language": "php", "file_size": 1455, "cut_index": 524, "middle_length": 229}} {"prefix": "luminate\\Support\\Str;\nuse Psr\\Log\\LoggerInterface;\nuse Stringable;\nuse Symfony\\Component\\Mailer\\Envelope;\nuse Symfony\\Component\\Mailer\\SentMessage;\nuse Symfony\\Component\\Mailer\\Transport\\TransportInterface;\nuse Symfony\\Component\\Mime\\RawMessage;\n\nclass LogTransport implements Stringable, TransportInterface\n{\n /**\n * The Logger instance.\n *\n * @var \\Psr\\Log\\LoggerInterface\n */\n protected $logger;\n\n /**\n * Create a new log transport instance.\n *\n * @param \\Psr\\Log\\LoggerI", "suffix": "pe = null): ?SentMessage\n {\n $string = Str::of($message->toString());\n\n if ($string->contains('Content-Type: multipart/')) {\n $boundary = $string\n ->after('boundary=')\n ->before(\"\\r\\n\")\n ", "middle": "nterface $logger\n */\n public function __construct(LoggerInterface $logger)\n {\n $this->logger = $logger;\n }\n\n /**\n * {@inheritdoc}\n */\n public function send(RawMessage $message, ?Envelope $envelo", "meta": {"filepath": "src/Illuminate/Mail/Transport/LogTransport.php", "language": "php", "file_size": 2446, "cut_index": 563, "middle_length": 229}} {"prefix": "Exception\\TransportException;\nuse Symfony\\Component\\Mailer\\SentMessage;\nuse Symfony\\Component\\Mailer\\Transport\\AbstractTransport;\nuse Symfony\\Component\\Mime\\Address;\nuse Symfony\\Component\\Mime\\Email;\nuse Symfony\\Component\\Mime\\MessageConverter;\n\n/*\nMIT License\n\nCopyright (c) 2023 Jayan Ratna\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitati", "suffix": "yright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTAB", "middle": "on the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above cop", "meta": {"filepath": "src/Illuminate/Mail/Transport/ResendTransport.php", "language": "php", "file_size": 5362, "cut_index": 716, "middle_length": 229}} {"prefix": ";\nuse Illuminate\\Support\\Collection;\nuse Stringable;\nuse Symfony\\Component\\Mailer\\Exception\\TransportException;\nuse Symfony\\Component\\Mailer\\Header\\MetadataHeader;\nuse Symfony\\Component\\Mailer\\SentMessage;\nuse Symfony\\Component\\Mailer\\Transport\\AbstractTransport;\nuse Symfony\\Component\\Mime\\Message;\n\nclass SesV2Transport extends AbstractTransport implements Stringable\n{\n /**\n * The Amazon SES V2 instance.\n *\n * @var \\Aws\\SesV2\\SesV2Client\n */\n protected $ses;\n\n /**\n * The Amazon ", "suffix": " */\n public function __construct(SesV2Client $ses, $options = [])\n {\n $this->ses = $ses;\n $this->options = $options;\n\n parent::__construct();\n }\n\n /**\n * {@inheritDoc}\n *\n * @throws \\Symfony\\Component\\Mailer\\Ex", "middle": "SES transmission options.\n *\n * @var array\n */\n protected $options = [];\n\n /**\n * Create a new SES V2 transport instance.\n *\n * @param \\Aws\\SesV2\\SesV2Client $ses\n * @param array $options\n ", "meta": {"filepath": "src/Illuminate/Mail/Transport/SesV2Transport.php", "language": "php", "file_size": 4653, "cut_index": 614, "middle_length": 229}} {"prefix": "luminate\\Support\\Collection;\nuse Illuminate\\Support\\Str;\nuse Illuminate\\Support\\Traits\\Conditionable;\n\nclass Headers\n{\n use Conditionable;\n\n /**\n * The message's message ID.\n *\n * @var string|null\n */\n public $messageId;\n\n /**\n * The message IDs that are referenced by the message.\n *\n * @var array\n */\n public $references;\n\n /**\n * The message's text headers.\n *\n * @var array\n */\n public $text;\n\n /**\n * Create a new instance of heade", "suffix": "ull, array $references = [], array $text = [])\n {\n $this->messageId = $messageId;\n $this->references = $references;\n $this->text = $text;\n }\n\n /**\n * Set the message ID.\n *\n * @param string $messageId\n * @ret", "middle": "rs for a message.\n *\n * @param string|null $messageId\n * @param array $references\n * @param array $text\n *\n * @named-arguments-supported\n */\n public function __construct(?string $messageId = n", "meta": {"filepath": "src/Illuminate/Mail/Mailables/Headers.php", "language": "php", "file_size": 2047, "cut_index": 563, "middle_length": 229}} {"prefix": "e Symfony\\Component\\HttpKernel\\Exception\\MethodNotAllowedHttpException;\nuse Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException;\nuse Symfony\\Component\\Routing\\Matcher\\Dumper\\CompiledUrlMatcherDumper;\nuse Symfony\\Component\\Routing\\RouteCollection as SymfonyRouteCollection;\nuse Traversable;\n\nabstract class AbstractRouteCollection implements Countable, IteratorAggregate, RouteCollectionInterface\n{\n /**\n * Handle the matched route.\n *\n * @param \\Illuminate\\Http\\Request $request\n * ", "suffix": " $request, $route)\n {\n if (! is_null($route)) {\n return $route->bind($request);\n }\n\n // If no route was found we will now check if a matching route is specified by\n // another HTTP verb. If it is we will need to th", "middle": "@param \\Illuminate\\Routing\\Route|null $route\n * @return \\Illuminate\\Routing\\Route\n *\n * @throws \\Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException\n */\n protected function handleMatchedRoute(Request", "meta": {"filepath": "src/Illuminate/Routing/AbstractRouteCollection.php", "language": "php", "file_size": 8861, "cut_index": 716, "middle_length": 229}} {"prefix": "n;\nuse Symfony\\Component\\Routing\\Matcher\\CompiledUrlMatcher;\nuse Symfony\\Component\\Routing\\RequestContext;\n\nclass CompiledRouteCollection extends AbstractRouteCollection\n{\n /**\n * The compiled routes collection.\n *\n * @var array\n */\n protected $compiled = [];\n\n /**\n * An array of the route attributes keyed by name.\n *\n * @var array\n */\n protected $attributes = [];\n\n /**\n * The dynamically added routes that were added after loading the cached, compiled route", "suffix": " /**\n * The container instance used by the route.\n *\n * @var \\Illuminate\\Container\\Container\n */\n protected $container;\n\n /**\n * A cache of resolved Route instances keyed by route name.\n *\n * @var arraymiddleware;\n }\n\n /**\n * Execute an action on the controller.\n *\n * @param string $meth", "middle": "ware as $m) {\n $this->middleware[] = [\n 'middleware' => $m,\n 'options' => &$options,\n ];\n }\n\n return new ControllerMiddlewareOptions($options);\n }\n\n /**\n ", "meta": {"filepath": "src/Illuminate/Routing/Controller.php", "language": "php", "file_size": 1684, "cut_index": 537, "middle_length": 229}} {"prefix": "e\\Container\\Container;\nuse Illuminate\\Routing\\Contracts\\ControllerDispatcher as ControllerDispatcherContract;\nuse Illuminate\\Support\\Collection;\n\nclass ControllerDispatcher implements ControllerDispatcherContract\n{\n use FiltersControllerMiddleware, ResolvesRouteDependencies;\n\n /**\n * The container instance.\n *\n * @var \\Illuminate\\Container\\Container\n */\n protected $container;\n\n /**\n * Create a new controller dispatcher instance.\n *\n * @param \\Illuminate\\Container\\Con", "suffix": "inate\\Routing\\Route $route\n * @param mixed $controller\n * @param string $method\n * @return mixed\n */\n public function dispatch(Route $route, $controller, $method)\n {\n $parameters = $this->resolveParameters($route, $control", "middle": "tainer $container\n */\n public function __construct(Container $container)\n {\n $this->container = $container;\n }\n\n /**\n * Dispatch a request to a given controller and method.\n *\n * @param \\Illum", "meta": {"filepath": "src/Illuminate/Routing/ControllerDispatcher.php", "language": "php", "file_size": 2269, "cut_index": 563, "middle_length": 229}} {"prefix": "abase\\Eloquent\\ModelNotFoundException;\nuse Illuminate\\Routing\\Exceptions\\BackedEnumCaseNotFoundException;\nuse Illuminate\\Support\\Reflector;\nuse Illuminate\\Support\\Str;\n\nclass ImplicitRouteBinding\n{\n /**\n * Resolve the implicit route bindings for the given route.\n *\n * @param \\Illuminate\\Container\\Container $container\n * @param \\Illuminate\\Routing\\Route $route\n * @return void\n *\n * @throws \\Illuminate\\Database\\Eloquent\\ModelNotFoundException<\\Illuminate\\Database\\Eloquent\\Mo", "suffix": ":resolveBackedEnumsForRoute($route, $parameters);\n\n foreach ($route->signatureParameters(['subClass' => UrlRoutable::class]) as $parameter) {\n if (! $parameterName = static::getParameterName($parameter->getName(), $parameters)) {\n ", "middle": "del>\n * @throws \\Illuminate\\Routing\\Exceptions\\BackedEnumCaseNotFoundException\n */\n public static function resolveForRoute($container, $route)\n {\n $parameters = $route->parameters();\n\n $route = static:", "meta": {"filepath": "src/Illuminate/Routing/ImplicitRouteBinding.php", "language": "php", "file_size": 4424, "cut_index": 614, "middle_length": 229}} {"prefix": " as MailFactory;\nuse Illuminate\\Contracts\\Mail\\Mailable as MailableContract;\nuse Illuminate\\Contracts\\Queue\\ShouldBeEncrypted;\nuse Illuminate\\Contracts\\Queue\\ShouldQueueAfterCommit;\nuse Illuminate\\Queue\\Attributes\\Backoff;\nuse Illuminate\\Queue\\Attributes\\Connection;\nuse Illuminate\\Queue\\Attributes\\MaxExceptions;\nuse Illuminate\\Queue\\Attributes\\Queue as QueueAttribute;\nuse Illuminate\\Queue\\Attributes\\ReadsQueueAttributes;\nuse Illuminate\\Queue\\Attributes\\Timeout;\nuse Illuminate\\Queue\\Attributes\\Tries;\nuse Ill", "suffix": " */\n public $mailable;\n\n /**\n * The number of times the job may be attempted.\n *\n * @var int\n */\n public $tries;\n\n /**\n * The number of seconds the job can run before timing out.\n *\n * @var int\n */\n public $ti", "middle": "uminate\\Queue\\InteractsWithQueue;\n\nclass SendQueuedMailable\n{\n use InteractsWithQueue, Queueable, ReadsQueueAttributes;\n\n /**\n * The mailable message instance.\n *\n * @var \\Illuminate\\Contracts\\Mail\\Mailable\n ", "meta": {"filepath": "src/Illuminate/Mail/SendQueuedMailable.php", "language": "php", "file_size": 4035, "cut_index": 614, "middle_length": 229}} {"prefix": "e Illuminate\\Support\\Collection;\nuse Stringable;\nuse Symfony\\Component\\Mailer\\Exception\\TransportException;\nuse Symfony\\Component\\Mailer\\Header\\MetadataHeader;\nuse Symfony\\Component\\Mailer\\SentMessage;\nuse Symfony\\Component\\Mailer\\Transport\\AbstractTransport;\nuse Symfony\\Component\\Mime\\Message;\n\nclass SesTransport extends AbstractTransport implements Stringable\n{\n /**\n * The Amazon SES instance.\n *\n * @var \\Aws\\Ses\\SesClient\n */\n protected $ses;\n\n /**\n * The Amazon SES transmiss", "suffix": "tion __construct(SesClient $ses, $options = [])\n {\n $this->ses = $ses;\n $this->options = $options;\n\n parent::__construct();\n }\n\n /**\n * {@inheritDoc}\n *\n * @throws \\Symfony\\Component\\Mailer\\Exception\\TransportExcep", "middle": "ion options.\n *\n * @var array\n */\n protected $options = [];\n\n /**\n * Create a new SES transport instance.\n *\n * @param \\Aws\\Ses\\SesClient $ses\n * @param array $options\n */\n public func", "meta": {"filepath": "src/Illuminate/Mail/Transport/SesTransport.php", "language": "php", "file_size": 4454, "cut_index": 614, "middle_length": 229}} {"prefix": "@var array\n */\n public $to;\n\n /**\n * The recipients receiving a copy of the message.\n *\n * @var array\n */\n public $cc;\n\n /**\n * The recipients receiving a blind copy of the message.\n *\n * @var array\n */\n public $bcc;\n\n /**\n * The recipients that should be replied to.\n *\n * @var array\n */\n public $replyTo;\n\n /**\n * The subject of the message.\n *\n * @var string|null\n */\n public $subject;\n\n /**\n * The message'", "suffix": "acks.\n *\n * @var array\n */\n public $using = [];\n\n /**\n * Create a new message envelope instance.\n *\n * @param \\Illuminate\\Mail\\Mailables\\Address|string|null $from\n * @param arrayresolveParameters($route, $callable)));\n }\n\n /**\n * Resolve the parame", "middle": "ntainer\n */\n public function __construct(Container $container)\n {\n $this->container = $container;\n }\n\n /**\n * Dispatch a request to a given callable.\n *\n * @param \\Illuminate\\Routing\\Route $ro", "meta": {"filepath": "src/Illuminate/Routing/CallableDispatcher.php", "language": "php", "file_size": 1350, "cut_index": 524, "middle_length": 229}} {"prefix": "s\n{\n /**\n * The middleware options.\n *\n * @var array\n */\n protected $options;\n\n /**\n * Create a new middleware option instance.\n *\n * @param array $options\n */\n public function __construct(array &$options)\n {\n $this->options = &$options;\n }\n\n /**\n * Set the controller methods the middleware should apply to.\n *\n * @param mixed $methods\n * @return $this\n */\n public function only($methods)\n {\n $this->options['only'", "suffix": "\n\n return $this;\n }\n\n /**\n * Set the controller methods the middleware should exclude.\n *\n * @param mixed $methods\n * @return $this\n */\n public function except($methods)\n {\n $this->options['except'] = is_arra", "middle": "] = is_array($methods) ? $methods : func_get_args();", "meta": {"filepath": "src/Illuminate/Routing/ControllerMiddlewareOptions.php", "language": "php", "file_size": 963, "cut_index": 582, "middle_length": 52}} {"prefix": "s;\n\nuse Attribute;\nuse Illuminate\\Contracts\\Container\\Container;\nuse Illuminate\\Contracts\\Container\\ContextualAttribute;\n\n#[Attribute(Attribute::TARGET_PARAMETER)]\nclass Give implements ContextualAttribute\n{\n /**\n * Provide a concrete class implementation for dependency injection.\n *\n * @param string $class\n * @param array|null $params\n */\n public function __construct(\n public string $class,\n public array $params = [],\n ) {\n }\n\n /**\n * Resolve the dep", "suffix": " * @param \\Illuminate\\Contracts\\Container\\Container $container\n * @return mixed\n */\n public static function resolve(self $attribute, Container $container): mixed\n {\n return $container->make($attribute->class, $attribute->params);\n ", "middle": "endency.\n *\n * @param self $attribute\n ", "meta": {"filepath": "src/Illuminate/Container/Attributes/Give.php", "language": "php", "file_size": 872, "cut_index": 559, "middle_length": 52}} {"prefix": "te\\Mail\\Events;\n\nuse Exception;\nuse Illuminate\\Mail\\SentMessage;\nuse Illuminate\\Support\\Collection;\n\n/**\n * @property \\Symfony\\Component\\Mime\\Email $message\n */\nclass MessageSent\n{\n /**\n * Create a new event instance.\n *\n * @param \\Illuminate\\Mail\\SentMessage $sent The message that was sent.\n * @param array $data The message data.\n */\n public function __construct(\n public SentMessage $sent,\n public array $data = [],\n ) {\n }\n\n /**\n * Get the serializ", "suffix": " 'sent' => $this->sent,\n 'data' => $hasAttachments ? base64_encode(serialize($this->data)) : $this->data,\n 'hasAttachments' => $hasAttachments,\n ];\n }\n\n /**\n * Marshal the object from its serialized data.\n *\n ", "middle": "able representation of the object.\n *\n * @return array\n */\n public function __serialize()\n {\n $hasAttachments = (new Collection($this->message->getAttachments()))->isNotEmpty();\n\n return [\n ", "meta": {"filepath": "src/Illuminate/Mail/Events/MessageSent.php", "language": "php", "file_size": 1714, "cut_index": 537, "middle_length": 229}} {"prefix": "e\\Support\\Collection;\n\nuse function Illuminate\\Support\\enum_value;\n\ntrait CreatesRegularExpressionRouteConstraints\n{\n /**\n * Specify that the given route parameters must be alphabetic.\n *\n * @param array|string $parameters\n * @return $this\n */\n public function whereAlpha($parameters)\n {\n return $this->assignExpressionToParameters($parameters, '[a-zA-Z]+');\n }\n\n /**\n * Specify that the given route parameters must be alphanumeric.\n *\n * @param array|str", "suffix": "route parameters must be numeric.\n *\n * @param array|string $parameters\n * @return $this\n */\n public function whereNumber($parameters)\n {\n return $this->assignExpressionToParameters($parameters, '[0-9]+');\n }\n\n /**\n ", "middle": "ing $parameters\n * @return $this\n */\n public function whereAlphaNumeric($parameters)\n {\n return $this->assignExpressionToParameters($parameters, '[a-zA-Z0-9]+');\n }\n\n /**\n * Specify that the given ", "meta": {"filepath": "src/Illuminate/Routing/CreatesRegularExpressionRouteConstraints.php", "language": "php", "file_size": 2601, "cut_index": 563, "middle_length": 229}} {"prefix": "\nnamespace Illuminate\\Routing\\Controllers;\n\nuse Closure;\nuse Illuminate\\Support\\Arr;\n\n/**\n * @phpstan-type NextClosure \\Closure(\\Illuminate\\Http\\Request): \\Symfony\\Component\\HttpFoundation\\Response\n */\nclass Middleware\n{\n /**\n * Create a new controller middleware definition.\n *\n * @param (\\Closure(\\Illuminate\\Http\\Request, NextClosure): \\Symfony\\Component\\HttpFoundation\\Response)|string|array $middleware\n * @param array|null $only\n * @param array|null $except\n ", "suffix": "o.\n *\n * @param array|string $only\n * @return $this\n */\n public function only(array|string $only)\n {\n $this->only = Arr::wrap($only);\n\n return $this;\n }\n\n /**\n * Specify the controller methods the middleware ", "middle": " */\n public function __construct(public Closure|string|array $middleware, public ?array $only = null, public ?array $except = null)\n {\n }\n\n /**\n * Specify the only controller methods the middleware should apply t", "meta": {"filepath": "src/Illuminate/Routing/Controllers/Middleware.php", "language": "php", "file_size": 1227, "cut_index": 518, "middle_length": 229}} {"prefix": "e Illuminate\\Support\\Str;\nuse LogicException;\nuse UnexpectedValueException;\n\nclass RouteAction\n{\n /**\n * Parse the given action into an array.\n *\n * @param string $uri\n * @param mixed $action\n * @return array\n */\n public static function parse($uri, $action)\n {\n // If no action is passed in right away, we assume the user will make use of\n // fluent routing. In that case, we set a default closure, to be executed\n // if the user never explicitly sets an", "suffix": "\"uses\" property, because there is nothing else we need to do when\n // it is available. Otherwise we will need to find it in the action list.\n if (Reflector::isCallable($action, true)) {\n return ! is_array($action) ? ['uses' => $act", "middle": " action to handle the given uri.\n if (is_null($action)) {\n return static::missingAction($uri);\n }\n\n // If the action is already a Closure instance, we will just set that instance\n // as the ", "meta": {"filepath": "src/Illuminate/Routing/RouteAction.php", "language": "php", "file_size": 3464, "cut_index": 614, "middle_length": 229}} {"prefix": "\n\n /**\n * The resource registrar.\n *\n * @var \\Illuminate\\Routing\\ResourceRegistrar\n */\n protected $registrar;\n\n /**\n * The resource name.\n *\n * @var string\n */\n protected $name;\n\n /**\n * The resource controller.\n *\n * @var string\n */\n protected $controller;\n\n /**\n * The resource options.\n *\n * @var array\n */\n protected $options = [];\n\n /**\n * The resource's registration status.\n *\n * @var bool\n */\n ", "suffix": "roller\n * @param array $options\n */\n public function __construct(ResourceRegistrar $registrar, $name, $controller, array $options)\n {\n $this->name = $name;\n $this->options = $options;\n $this->registrar = $registrar;\n ", "middle": "protected $registered = false;\n\n /**\n * Create a new pending resource registration instance.\n *\n * @param \\Illuminate\\Routing\\ResourceRegistrar $registrar\n * @param string $name\n * @param string $cont", "meta": {"filepath": "src/Illuminate/Routing/PendingResourceRegistration.php", "language": "php", "file_size": 7686, "cut_index": 716, "middle_length": 229}} {"prefix": "te\\Routing;\n\nuse Illuminate\\Contracts\\Debug\\ExceptionHandler;\nuse Illuminate\\Contracts\\Support\\Responsable;\nuse Illuminate\\Http\\Request;\nuse Illuminate\\Pipeline\\Pipeline as BasePipeline;\nuse Throwable;\n\n/**\n * This extended pipeline catches any exceptions that occur during each slice.\n *\n * The exceptions are converted to HTTP responses for proper middleware handling.\n */\nclass Pipeline extends BasePipeline\n{\n /**\n * Handles the value returned from each pipe before passing it to the next.\n *\n ", "suffix": " : $carry;\n }\n\n /**\n * Handle the given exception.\n *\n * @param mixed $passable\n * @param \\Throwable $e\n * @return mixed\n *\n * @throws \\Throwable\n */\n protected function handleException($passable, Throwa", "middle": " * @param mixed $carry\n * @return mixed\n */\n protected function handleCarry($carry)\n {\n return $carry instanceof Responsable\n ? $carry->toResponse($this->getContainer()->make(Request::class))\n ", "meta": {"filepath": "src/Illuminate/Routing/Pipeline.php", "language": "php", "file_size": 1523, "cut_index": 537, "middle_length": 229}} {"prefix": " /**\n * The URL generator instance.\n *\n * @var \\Illuminate\\Routing\\UrlGenerator\n */\n protected $generator;\n\n /**\n * The session store instance.\n *\n * @var \\Illuminate\\Session\\Store\n */\n protected $session;\n\n /**\n * Create a new Redirector instance.\n *\n * @param \\Illuminate\\Routing\\UrlGenerator $generator\n */\n public function __construct(UrlGenerator $generator)\n {\n $this->generator = $generator;\n }\n\n /**\n * Create a new r", "suffix": "s = 302, $headers = [], $fallback = false)\n {\n return $this->createRedirect($this->generator->previous($fallback), $status, $headers);\n }\n\n /**\n * Create a new redirect response to the current URI.\n *\n * @param int $status\n ", "middle": "edirect response to the previous location.\n *\n * @param int $status\n * @param array $headers\n * @param mixed $fallback\n * @return \\Illuminate\\Http\\RedirectResponse\n */\n public function back($statu", "meta": {"filepath": "src/Illuminate/Routing/Redirector.php", "language": "php", "file_size": 7345, "cut_index": 716, "middle_length": 229}} {"prefix": "lluminate\\Support\\Reflector;\nuse ReflectionClass;\nuse ReflectionFunctionAbstract;\nuse ReflectionMethod;\nuse ReflectionParameter;\nuse stdClass;\n\ntrait ResolvesRouteDependencies\n{\n /**\n * Resolve the object method's type-hinted dependencies.\n *\n * @param array $parameters\n * @param object $instance\n * @param string $method\n * @return array\n */\n protected function resolveClassMethodDependencies(array $parameters, $instance, $method)\n {\n if (! method_exists($ins", "suffix": "ethod's type-hinted dependencies.\n *\n * @param array $parameters\n * @param \\ReflectionFunctionAbstract $reflector\n * @return array\n */\n public function resolveMethodDependencies(array $parameters, ReflectionFunctionAbstract $refl", "middle": "tance, $method)) {\n return $parameters;\n }\n\n return $this->resolveMethodDependencies(\n $parameters, new ReflectionMethod($instance, $method)\n );\n }\n\n /**\n * Resolve the given m", "meta": {"filepath": "src/Illuminate/Routing/ResolvesRouteDependencies.php", "language": "php", "file_size": 3902, "cut_index": 614, "middle_length": 229}} {"prefix": "oute is a fallback route.\n *\n * @var bool\n */\n public $isFallback = false;\n\n /**\n * The controller instance.\n *\n * @var mixed\n */\n public $controller;\n\n /**\n * The default values for the route.\n *\n * @var array\n */\n public $defaults = [];\n\n /**\n * The regular expression requirements.\n *\n * @var array\n */\n public $wheres = [];\n\n /**\n * The array of matched parameters.\n *\n * @var array|null\n */\n public $para", "suffix": " protected $originalParameters;\n\n /**\n * Indicates \"trashed\" models can be retrieved when resolving implicit model bindings for this route.\n *\n * @var bool\n */\n protected $withTrashedBindings = false;\n\n /**\n * Indicates the m", "middle": "meters;\n\n /**\n * The parameter names for the route.\n *\n * @var array|null\n */\n public $parameterNames;\n\n /**\n * The array of the matched parameters' original values.\n *\n * @var array\n */\n ", "meta": {"filepath": "src/Illuminate/Routing/Route.php", "language": "php", "file_size": 35299, "cut_index": 2151, "middle_length": 229}} {"prefix": "\nnamespace Illuminate\\Routing;\n\nuse Illuminate\\Http\\RedirectResponse;\nuse Illuminate\\Http\\Request;\nuse Illuminate\\Support\\Collection;\nuse Illuminate\\Support\\Str;\n\nclass RedirectController extends Controller\n{\n /**\n * Invoke the controller method.\n *\n * @param \\Illuminate\\Http\\Request $request\n * @param \\Illuminate\\Routing\\UrlGenerator $url\n * @return \\Illuminate\\Http\\RedirectResponse\n */\n public function __invoke(Request $request, UrlGenerator $url)\n {\n $parameter", "suffix": "$route = (new Route('GET', $destination, [\n 'as' => 'laravel_route_redirect_destination',\n ]))->bind($request);\n\n $parameters = $parameters->only(\n $route->getCompiled()->getPathVariables()\n )->all();\n\n $ur", "middle": "s = new Collection($request->route()->parameters());\n\n $status = $parameters->get('status');\n\n $destination = $parameters->get('destination');\n\n $parameters->forget('status')->forget('destination');\n\n ", "meta": {"filepath": "src/Illuminate/Routing/RedirectController.php", "language": "php", "file_size": 1246, "cut_index": 518, "middle_length": 229}} {"prefix": "$parameterMap = [];\n\n /**\n * Singular global parameters.\n *\n * @var bool\n */\n protected static $singularParameters = true;\n\n /**\n * The verbs used in the resource URIs.\n *\n * @var array\n */\n protected static $verbs = [\n 'create' => 'create',\n 'edit' => 'edit',\n ];\n\n /**\n * Create a new resource registrar instance.\n *\n * @param \\Illuminate\\Routing\\Router $router\n */\n public function __construct(Router $router)\n {\n ", "suffix": "tion\n */\n public function register($name, $controller, array $options = [])\n {\n if (isset($options['parameters']) && ! isset($this->parameters)) {\n $this->parameters = $options['parameters'];\n }\n\n // If the resourc", "middle": "$this->router = $router;\n }\n\n /**\n * Route a resource to a controller.\n *\n * @param string $name\n * @param string $controller\n * @param array $options\n * @return \\Illuminate\\Routing\\RouteCollec", "meta": {"filepath": "src/Illuminate/Routing/ResourceRegistrar.php", "language": "php", "file_size": 22223, "cut_index": 1331, "middle_length": 229}} {"prefix": "nt\n{\n use Conditionable;\n\n /**\n * The Blade view that should be rendered for the mailable.\n *\n * @var string|null\n */\n public $view;\n\n /**\n * The Blade view that should be rendered for the mailable.\n *\n * Alternative syntax for \"view\".\n *\n * @var string|null\n */\n public $html;\n\n /**\n * The Blade view that represents the text version of the message.\n *\n * @var string|null\n */\n public $text;\n\n /**\n * The Blade view that repres", "suffix": " * The message's view data.\n *\n * @var array\n */\n public $with;\n\n /**\n * Create a new content definition.\n *\n * @param string|null $view\n * @param string|null $html\n * @param string|null $text\n * @param ", "middle": "ents the Markdown version of the message.\n *\n * @var string|null\n */\n public $markdown;\n\n /**\n * The pre-rendered HTML of the message.\n *\n * @var string|null\n */\n public $htmlString;\n\n /**\n", "meta": {"filepath": "src/Illuminate/Mail/Mailables/Content.php", "language": "php", "file_size": 3107, "cut_index": 614, "middle_length": 229}} {"prefix": "ts\\Container;\n\ninterface ContextualBindingBuilder\n{\n /**\n * Define the abstract target that depends on the context.\n *\n * @param string $abstract\n * @return $this\n */\n public function needs($abstract);\n\n /**\n * Define the implementation for the contextual binding.\n *\n * @param \\Closure|string|array $implementation\n * @return $this\n */\n public function give($implementation);\n\n /**\n * Define tagged services to be used as the implementation for the", "suffix": "tag\n * @return $this\n */\n public function giveTagged($tag);\n\n /**\n * Specify the configuration item to bind as a primitive.\n *\n * @param string $key\n * @param mixed $default\n * @return $this\n */\n public function", "middle": " contextual binding.\n *\n * @param string $", "meta": {"filepath": "src/Illuminate/Contracts/Container/ContextualBindingBuilder.php", "language": "php", "file_size": 893, "cut_index": 547, "middle_length": 52}} {"prefix": "acroable;\n\n /**\n * The resource registrar.\n *\n * @var \\Illuminate\\Routing\\ResourceRegistrar\n */\n protected $registrar;\n\n /**\n * The resource name.\n *\n * @var string\n */\n protected $name;\n\n /**\n * The resource controller.\n *\n * @var string\n */\n protected $controller;\n\n /**\n * The resource options.\n *\n * @var array\n */\n protected $options = [];\n\n /**\n * The resource's registration status.\n *\n * @var bool\n ", "suffix": "aram string $controller\n * @param array $options\n */\n public function __construct(ResourceRegistrar $registrar, $name, $controller, array $options)\n {\n $this->name = $name;\n $this->options = $options;\n $this->registra", "middle": " */\n protected $registered = false;\n\n /**\n * Create a new pending singleton resource registration instance.\n *\n * @param \\Illuminate\\Routing\\ResourceRegistrar $registrar\n * @param string $name\n * @p", "meta": {"filepath": "src/Illuminate/Routing/PendingSingletonResourceRegistration.php", "language": "php", "file_size": 6942, "cut_index": 716, "middle_length": 229}} {"prefix": "rt\\Traits\\Macroable;\nuse ReflectionFunction;\nuse Symfony\\Component\\HttpFoundation\\BinaryFileResponse;\nuse Symfony\\Component\\HttpFoundation\\StreamedJsonResponse;\nuse Symfony\\Component\\HttpFoundation\\StreamedResponse;\nuse Throwable;\n\nclass ResponseFactory implements FactoryContract\n{\n use Macroable;\n\n /**\n * The view factory instance.\n *\n * @var \\Illuminate\\Contracts\\View\\Factory\n */\n protected $view;\n\n /**\n * The redirector instance.\n *\n * @var \\Illuminate\\Routing\\Redi", "suffix": " public function __construct(ViewFactory $view, Redirector $redirector)\n {\n $this->view = $view;\n $this->redirector = $redirector;\n }\n\n /**\n * Create a new response instance.\n *\n * @param mixed $content\n * @param", "middle": "rector\n */\n protected $redirector;\n\n /**\n * Create a new response factory instance.\n *\n * @param \\Illuminate\\Contracts\\View\\Factory $view\n * @param \\Illuminate\\Routing\\Redirector $redirector\n */\n", "meta": {"filepath": "src/Illuminate/Routing/ResponseFactory.php", "language": "php", "file_size": 11679, "cut_index": 921, "middle_length": 229}} {"prefix": "e\\Http\\Request;\n\ninterface RouteCollectionInterface\n{\n /**\n * Add a Route instance to the collection.\n *\n * @param \\Illuminate\\Routing\\Route $route\n * @return \\Illuminate\\Routing\\Route\n */\n public function add(Route $route);\n\n /**\n * Refresh the name look-up table.\n *\n * This is done in case any names are fluently defined or if routes are overwritten.\n *\n * @return void\n */\n public function refreshNameLookups();\n\n /**\n * Refresh the action loo", "suffix": " request.\n *\n * @param \\Illuminate\\Http\\Request $request\n * @return \\Illuminate\\Routing\\Route\n *\n * @throws \\Symfony\\Component\\HttpKernel\\Exception\\MethodNotAllowedHttpException\n * @throws \\Symfony\\Component\\HttpKernel\\Exception\\N", "middle": "k-up table.\n *\n * This is done in case any actions are overwritten with new controllers.\n *\n * @return void\n */\n public function refreshActionLookups();\n\n /**\n * Find the first route matching a given", "meta": {"filepath": "src/Illuminate/Routing/RouteCollectionInterface.php", "language": "php", "file_size": 2332, "cut_index": 563, "middle_length": 229}} {"prefix": "*\n * The route instance.\n *\n * @var \\Illuminate\\Routing\\Route\n */\n protected $route;\n\n /**\n * Create a new Route parameter binder instance.\n *\n * @param \\Illuminate\\Routing\\Route $route\n */\n public function __construct($route)\n {\n $this->route = $route;\n }\n\n /**\n * Get the parameters for the route.\n *\n * @param \\Illuminate\\Http\\Request $request\n * @return array\n */\n public function parameters($request)\n {\n $paramet", "suffix": "ge them into this parameters array so that this array is completed.\n if (! is_null($this->route->compiled->getHostRegex())) {\n $parameters = $this->bindHostParameters(\n $request, $parameters\n );\n }\n\n ", "middle": "ers = $this->bindPathParameters($request);\n\n // If the route has a regular expression for the host part of the URI, we will\n // compile that and get the parameter matches for this domain. We will then\n // mer", "meta": {"filepath": "src/Illuminate/Routing/RouteParameterBinder.php", "language": "php", "file_size": 3093, "cut_index": 614, "middle_length": 229}} {"prefix": "te\\Routing;\n\nuse Illuminate\\Support\\Reflector;\nuse Illuminate\\Support\\Str;\nuse ReflectionFunction;\nuse ReflectionMethod;\n\nclass RouteSignatureParameters\n{\n /**\n * Extract the route action's signature parameters.\n *\n * @param array $action\n * @param array $conditions\n * @return array\n */\n public static function fromAction(array $action, $conditions = [])\n {\n $callback = RouteAction::containsSerializedClosure($action)\n ? unserialize($action['uses'])->getC", "suffix": "(true) {\n ! empty($conditions['subClass']) => array_filter($parameters, fn ($p) => Reflector::isParameterSubclassOf($p, $conditions['subClass'])),\n ! empty($conditions['backedEnum']) => array_filter($parameters, fn ($p) => Reflector::", "middle": "losure()\n : $action['uses'];\n\n $parameters = is_string($callback)\n ? static::fromClassMethodString($callback)\n : (new ReflectionFunction($callback))->getParameters();\n\n return match ", "meta": {"filepath": "src/Illuminate/Routing/RouteSignatureParameters.php", "language": "php", "file_size": 1590, "cut_index": 537, "middle_length": 229}} {"prefix": " *\n * @var \\Illuminate\\Http\\Request\n */\n protected $request;\n\n /**\n * The named parameter defaults.\n *\n * @var array\n */\n public $defaultParameters = [];\n\n /**\n * Characters that should not be URL encoded.\n *\n * @var array\n */\n public $dontEncode = [\n '%2F' => '/',\n '%40' => '@',\n '%3A' => ':',\n '%3B' => ';',\n '%2C' => ',',\n '%3D' => '=',\n '%2B' => '+',\n '%21' => '!',\n '%2A' => '*',\n ", "suffix": "* @param \\Illuminate\\Http\\Request $request\n */\n public function __construct($url, $request)\n {\n $this->url = $url;\n $this->request = $request;\n }\n\n /**\n * Generate a URL for the given route.\n *\n * @param \\Illumi", "middle": " '%7C' => '|',\n '%3F' => '?',\n '%26' => '&',\n '%23' => '#',\n '%25' => '%',\n ];\n\n /**\n * Create a new Route URL generator.\n *\n * @param \\Illuminate\\Routing\\UrlGenerator $url\n ", "meta": {"filepath": "src/Illuminate/Routing/RouteUrlGenerator.php", "language": "php", "file_size": 14962, "cut_index": 921, "middle_length": 229}} {"prefix": "outing\\UrlGenerator as UrlGeneratorContract;\nuse Illuminate\\Contracts\\View\\Factory as ViewFactoryContract;\nuse Illuminate\\Routing\\Contracts\\CallableDispatcher as CallableDispatcherContract;\nuse Illuminate\\Routing\\Contracts\\ControllerDispatcher as ControllerDispatcherContract;\nuse Illuminate\\Support\\ServiceProvider;\nuse Psr\\Http\\Message\\ResponseInterface;\nuse Psr\\Http\\Message\\ServerRequestInterface;\nuse Symfony\\Bridge\\PsrHttpMessage\\Factory\\PsrHttpFactory;\nuse Symfony\\Component\\HttpFoundation\\Response;\n\nclas", "suffix": "enerator();\n $this->registerRedirector();\n $this->registerPsrRequest();\n $this->registerPsrResponse();\n $this->registerResponseFactory();\n $this->registerCallableDispatcher();\n $this->registerControllerDispatcher()", "middle": "s RoutingServiceProvider extends ServiceProvider\n{\n /**\n * Register the service provider.\n *\n * @return void\n */\n public function register()\n {\n $this->registerRouter();\n $this->registerUrlG", "meta": {"filepath": "src/Illuminate/Routing/RoutingServiceProvider.php", "language": "php", "file_size": 6848, "cut_index": 716, "middle_length": 229}} {"prefix": " */\n protected $request;\n\n /**\n * The asset root URL.\n *\n * @var string\n */\n protected $assetRoot;\n\n /**\n * The forced URL root.\n *\n * @var string\n */\n protected $forcedRoot;\n\n /**\n * The forced scheme for URLs.\n *\n * @var string\n */\n protected $forceScheme;\n\n /**\n * A cached copy of the URL root for the current request.\n *\n * @var string|null\n */\n protected $cachedRoot;\n\n /**\n * A cached copy of the URL sc", "suffix": "ace;\n\n /**\n * The session resolver callable.\n *\n * @var callable\n */\n protected $sessionResolver;\n\n /**\n * The encryption key resolver callable.\n *\n * @var callable\n */\n protected $keyResolver;\n\n /**\n * Th", "middle": "heme for the current request.\n *\n * @var string|null\n */\n protected $cachedScheme;\n\n /**\n * The root namespace being applied to controller actions.\n *\n * @var string\n */\n protected $rootNamesp", "meta": {"filepath": "src/Illuminate/Routing/UrlGenerator.php", "language": "php", "file_size": 24862, "cut_index": 1331, "middle_length": 229}} {"prefix": "firm;\nuse function Laravel\\Prompts\\select;\nuse function Laravel\\Prompts\\suggest;\n\n#[AsCommand(name: 'make:controller')]\nclass ControllerMakeCommand extends GeneratorCommand\n{\n use CreatesMatchingTest;\n\n /**\n * The console command name.\n *\n * @var string\n */\n protected $name = 'make:controller';\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected $description = 'Create a new controller class';\n\n /**\n * The type of class being genera", "suffix": " if ($type = $this->option('type')) {\n $stub = \"/stubs/controller.{$type}.stub\";\n } elseif ($this->option('parent')) {\n $stub = $this->option('singleton')\n ? '/stubs/controller.nested.singleton.stub'\n ", "middle": "ted.\n *\n * @var string\n */\n protected $type = 'Controller';\n\n /**\n * Get the stub file for the generator.\n *\n * @return string\n */\n protected function getStub()\n {\n $stub = null;\n\n ", "meta": {"filepath": "src/Illuminate/Routing/Console/ControllerMakeCommand.php", "language": "php", "file_size": 11517, "cut_index": 921, "middle_length": 229}} {"prefix": "pace Illuminate\\Routing\\Middleware;\n\nuse Closure;\nuse Illuminate\\Contracts\\Routing\\Registrar;\nuse Illuminate\\Database\\Eloquent\\ModelNotFoundException;\n\nclass SubstituteBindings\n{\n /**\n * The router instance.\n *\n * @var \\Illuminate\\Contracts\\Routing\\Registrar\n */\n protected $router;\n\n /**\n * Create a new bindings substitutor.\n *\n * @param \\Illuminate\\Contracts\\Routing\\Registrar $router\n */\n public function __construct(Registrar $router)\n {\n $this->route", "suffix": "NotFoundException\n */\n public function handle($request, Closure $next)\n {\n $route = $request->route();\n\n try {\n $this->router->substituteBindings($route);\n $this->router->substituteImplicitBindings($route);\n ", "middle": "r = $router;\n }\n\n /**\n * Handle an incoming request.\n *\n * @param \\Illuminate\\Http\\Request $request\n * @param \\Closure $next\n * @return mixed\n *\n * @throws \\Illuminate\\Database\\Eloquent\\Model", "meta": {"filepath": "src/Illuminate/Routing/Middleware/SubstituteBindings.php", "language": "php", "file_size": 1263, "cut_index": 524, "middle_length": 229}} {"prefix": "luminate\\Contracts\\Redis\\Factory as Redis;\nuse Illuminate\\Redis\\Limiters\\DurationLimiter;\n\nclass ThrottleRequestsWithRedis extends ThrottleRequests\n{\n /**\n * The Redis factory implementation.\n *\n * @var \\Illuminate\\Contracts\\Redis\\Factory\n */\n protected $redis;\n\n /**\n * The timestamp of the end of the current duration by key.\n *\n * @var array\n */\n public $decaysAt = [];\n\n /**\n * The number of remaining slots by key.\n *\n * @var array\n */\n publ", "suffix": "RateLimiter $limiter, Redis $redis)\n {\n parent::__construct($limiter);\n\n $this->redis = $redis;\n }\n\n /**\n * Handle an incoming request.\n *\n * @param \\Illuminate\\Http\\Request $request\n * @param \\Closure $next\n ", "middle": "ic $remaining = [];\n\n /**\n * Create a new request throttler.\n *\n * @param \\Illuminate\\Cache\\RateLimiter $limiter\n * @param \\Illuminate\\Contracts\\Redis\\Factory $redis\n */\n public function __construct(", "meta": {"filepath": "src/Illuminate/Routing/Middleware/ThrottleRequestsWithRedis.php", "language": "php", "file_size": 4330, "cut_index": 614, "middle_length": 229}} {"prefix": "use Illuminate\\Database\\Eloquent\\ModelNotFoundException;\nuse Illuminate\\Support\\Str;\n\nclass RouteBinding\n{\n /**\n * Create a Route model binding for a given callback.\n *\n * @param \\Illuminate\\Container\\Container $container\n * @param \\Closure|string $binder\n * @return \\Closure\n */\n public static function forCallback($container, $binder)\n {\n if (is_string($binder)) {\n return static::createClassBinding($container, $binder);\n }\n\n return $binder", "suffix": "function createClassBinding($container, $binding)\n {\n return function ($value, $route) use ($container, $binding) {\n // If the binding has an @ sign, we will assume it's being used to delimit\n // the class name from the bind", "middle": ";\n }\n\n /**\n * Create a class based binding using the IoC container.\n *\n * @param \\Illuminate\\Container\\Container $container\n * @param string $binding\n * @return \\Closure\n */\n protected static ", "meta": {"filepath": "src/Illuminate/Routing/RouteBinding.php", "language": "php", "file_size": 2998, "cut_index": 563, "middle_length": 229}} {"prefix": "e\\Support\\Arr;\n\nclass RouteGroup\n{\n /**\n * Merge route groups into a new array.\n *\n * @param array $new\n * @param array $old\n * @param bool $prependExistingPrefix\n * @return array\n */\n public static function merge($new, $old, $prependExistingPrefix = true)\n {\n if (isset($new['domain'])) {\n unset($old['domain']);\n }\n\n if (isset($new['controller'])) {\n unset($old['controller']);\n }\n\n $new = array_merge(static::", "suffix": " ]);\n\n return array_merge_recursive(Arr::except(\n $old, ['namespace', 'prefix', 'where', 'as']\n ), $new);\n }\n\n /**\n * Format the namespace for the new group attributes.\n *\n * @param array $new\n * @param ", "middle": "formatAs($new, $old), [\n 'namespace' => static::formatNamespace($new, $old),\n 'prefix' => static::formatPrefix($new, $old, $prependExistingPrefix),\n 'where' => static::formatWhere($new, $old),\n ", "meta": {"filepath": "src/Illuminate/Routing/RouteGroup.php", "language": "php", "file_size": 2730, "cut_index": 563, "middle_length": 229}} {"prefix": "null $action = null)\n * @method \\Illuminate\\Routing\\Route get(string $uri, \\Closure|array|string|null $action = null)\n * @method \\Illuminate\\Routing\\Route options(string $uri, \\Closure|array|string|null $action = null)\n * @method \\Illuminate\\Routing\\Route patch(string $uri, \\Closure|array|string|null $action = null)\n * @method \\Illuminate\\Routing\\Route post(string $uri, \\Closure|array|string|null $action = null)\n * @method \\Illuminate\\Routing\\Route put(string $uri, \\Closure|array|string|null $action = null)", "suffix": "ring $controller)\n * @method \\Illuminate\\Routing\\RouteRegistrar domain(\\BackedEnum|string $value)\n * @method \\Illuminate\\Routing\\RouteRegistrar middleware(array|string|null $middleware)\n * @method \\Illuminate\\Routing\\RouteRegistrar missing(\\Closure $missin", "middle": "\n * @method \\Illuminate\\Routing\\RouteRegistrar as(string $value)\n * @method \\Illuminate\\Routing\\RouteRegistrar can(\\UnitEnum|string $ability, array|string $models = [])\n * @method \\Illuminate\\Routing\\RouteRegistrar controller(st", "meta": {"filepath": "src/Illuminate/Routing/RouteRegistrar.php", "language": "php", "file_size": 9469, "cut_index": 921, "middle_length": 229}} {"prefix": "ds Collection\n{\n /**\n * Create a new Sorted Middleware container.\n *\n * @param array $priorityMap\n * @param \\Illuminate\\Support\\Collection|array $middlewares\n */\n public function __construct(array $priorityMap, $middlewares)\n {\n if ($middlewares instanceof Collection) {\n $middlewares = $middlewares->all();\n }\n\n $this->items = $this->sortMiddleware($priorityMap, $middlewares);\n }\n\n /**\n * Sort the middlewares by the given priority map", "suffix": "ddleware($priorityMap, $middlewares)\n {\n $lastIndex = 0;\n\n foreach ($middlewares as $index => $middleware) {\n if (! is_string($middleware)) {\n continue;\n }\n\n $priorityIndex = $this->priorityM", "middle": ".\n *\n * Each call to this method makes one discrete middleware movement if necessary.\n *\n * @param array $priorityMap\n * @param array $middlewares\n * @return array\n */\n protected function sortMi", "meta": {"filepath": "src/Illuminate/Routing/SortedMiddleware.php", "language": "php", "file_size": 3825, "cut_index": 614, "middle_length": 229}} {"prefix": "pace Illuminate\\Routing\\Console;\n\nuse Illuminate\\Console\\Concerns\\CreatesMatchingTest;\nuse Illuminate\\Console\\GeneratorCommand;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\n\n#[AsCommand(name: 'make:middleware')]\nclass MiddlewareMakeCommand extends GeneratorCommand\n{\n use CreatesMatchingTest;\n\n /**\n * The console command name.\n *\n * @var string\n */\n protected $name = 'make:middleware';\n\n /**\n * The console command description.\n *\n * @var string\n */\n protec", "suffix": ".\n *\n * @return string\n */\n protected function getStub()\n {\n return $this->resolveStubPath('/stubs/middleware.stub');\n }\n\n /**\n * Resolve the fully-qualified path to the stub.\n *\n * @param string $stub\n * @r", "middle": "ted $description = 'Create a new HTTP middleware class';\n\n /**\n * The type of class being generated.\n *\n * @var string\n */\n protected $type = 'Middleware';\n\n /**\n * Get the stub file for the generator", "meta": {"filepath": "src/Illuminate/Routing/Console/MiddlewareMakeCommand.php", "language": "php", "file_size": 1483, "cut_index": 524, "middle_length": 229}} {"prefix": "e Closure;\nuse Illuminate\\Routing\\Exceptions\\InvalidSignatureException;\nuse Illuminate\\Support\\Arr;\n\nclass ValidateSignature\n{\n /**\n * The names of the parameters that should be ignored.\n *\n * @var array\n */\n protected $ignore = [\n //\n ];\n\n /**\n * The globally ignored parameters.\n *\n * @var array\n */\n protected static $neverValidate = [];\n\n /**\n * Specify that the URL signature is for a relative URL.\n *\n * @param array|string", "suffix": ".$ignore]);\n }\n\n /**\n * Specify that the URL signature is for an absolute URL.\n *\n * @param array|string $ignore\n * @return class-string\n */\n public static function absolute($ignore = [])\n {\n $ignore = Arr::wrap($ig", "middle": " $ignore\n * @return string\n */\n public static function relative($ignore = [])\n {\n $ignore = Arr::wrap($ignore);\n\n return static::class.':'.implode(',', empty($ignore) ? ['relative'] : ['relative', ..", "meta": {"filepath": "src/Illuminate/Routing/Middleware/ValidateSignature.php", "language": "php", "file_size": 2697, "cut_index": 563, "middle_length": 229}} {"prefix": "by method.\n *\n * @var array\n */\n protected $routes = [];\n\n /**\n * Domain routes keyed by method, used to maintain domain-first ordering.\n *\n * @var array\n */\n protected $domainRoutes = [];\n\n /**\n * A flattened array of all of the routes.\n *\n * @var \\Illuminate\\Routing\\Route[]\n */\n protected $allRoutes = [];\n\n /**\n * Domain routes in the flattened array, used to maintain domain-first ordering.\n *\n * @var \\Illuminate\\Routing\\Route[]\n ", "suffix": " controller action.\n *\n * @var \\Illuminate\\Routing\\Route[]\n */\n protected $actionList = [];\n\n /**\n * Add a Route instance to the collection.\n *\n * @param \\Illuminate\\Routing\\Route $route\n * @return \\Illuminate\\Routing\\Ro", "middle": " */\n protected $allDomainRoutes = [];\n\n /**\n * A look-up table of routes by their names.\n *\n * @var \\Illuminate\\Routing\\Route[]\n */\n protected $nameList = [];\n\n /**\n * A look-up table of routes by", "meta": {"filepath": "src/Illuminate/Routing/RouteCollection.php", "language": "php", "file_size": 8722, "cut_index": 716, "middle_length": 229}} {"prefix": " The route collection instance.\n *\n * @var \\Illuminate\\Routing\\RouteCollectionInterface\n */\n protected $routes;\n\n /**\n * The currently dispatched route instance.\n *\n * @var \\Illuminate\\Routing\\Route|null\n */\n protected $current;\n\n /**\n * The request currently being dispatched.\n *\n * @var \\Illuminate\\Http\\Request\n */\n protected $currentRequest;\n\n /**\n * All of the short-hand keys for middlewares.\n *\n * @var array\n */\n protected ", "suffix": "ware to always be in the given order.\n *\n * @var array\n */\n public $middlewarePriority = [];\n\n /**\n * The registered route value binders.\n *\n * @var array\n */\n protected $binders = [];\n\n /**\n * The globally avail", "middle": "$middleware = [];\n\n /**\n * All of the middleware groups.\n *\n * @var array\n */\n protected $middlewareGroups = [];\n\n /**\n * The priority-sorted list of middleware.\n *\n * Forces the listed middle", "meta": {"filepath": "src/Illuminate/Routing/Router.php", "language": "php", "file_size": 41533, "cut_index": 2151, "middle_length": 229}} {"prefix": "tion;\nuse Symfony\\Component\\HttpFoundation\\Response;\n\nuse function Illuminate\\Support\\enum_value;\n\nclass ThrottleRequests\n{\n use InteractsWithTime;\n\n /**\n * The rate limiter instance.\n *\n * @var \\Illuminate\\Cache\\RateLimiter\n */\n protected $limiter;\n\n /**\n * Indicates if the rate limiter keys should be hashed.\n *\n * @var bool\n */\n protected static $shouldHashKeys = true;\n\n /**\n * Create a new request throttler.\n *\n * @param \\Illuminate\\Cache\\Rat", "suffix": "Enum|string $name\n * @return string\n */\n public static function using($name)\n {\n return static::class.':'.enum_value($name);\n }\n\n /**\n * Specify the rate limiter configuration for the middleware.\n *\n * @param int $", "middle": "eLimiter $limiter\n */\n public function __construct(RateLimiter $limiter)\n {\n $this->limiter = $limiter;\n }\n\n /**\n * Specify the named rate limiter to use for the middleware.\n *\n * @param \\Unit", "meta": {"filepath": "src/Illuminate/Routing/Middleware/ThrottleRequests.php", "language": "php", "file_size": 11045, "cut_index": 921, "middle_length": 229}} {"prefix": "patcher;\nuse Illuminate\\Contracts\\Queue\\ShouldQueue;\nuse Illuminate\\Foundation\\Bus\\Dispatchable;\nuse Illuminate\\Queue\\InteractsWithQueue;\nuse Illuminate\\Support\\Collection;\nuse Throwable;\n\nclass ChainedBatch implements ShouldQueue\n{\n use Batchable, Dispatchable, InteractsWithQueue, Queueable;\n\n /**\n * The collection of batched jobs.\n *\n * @var \\Illuminate\\Support\\Collection\n */\n public Collection $jobs;\n\n /**\n * The name of the batch.\n *\n * @var string\n */\n pub", "suffix": " */\n public function __construct(PendingBatch $batch)\n {\n $this->jobs = static::prepareNestedBatches($batch->jobs);\n\n $this->name = $batch->name;\n $this->options = $batch->options;\n\n $this->queue = $batch->queue();\n ", "middle": "lic string $name;\n\n /**\n * The batch options.\n *\n * @var array\n */\n public array $options;\n\n /**\n * Create a new chained batch instance.\n *\n * @param \\Illuminate\\Bus\\PendingBatch $batch\n ", "meta": {"filepath": "src/Illuminate/Bus/ChainedBatch.php", "language": "php", "file_size": 3930, "cut_index": 614, "middle_length": 229}} {"prefix": "ueue\\Attributes\\DebounceFor;\nuse Illuminate\\Queue\\Attributes\\ReadsQueueAttributes;\nuse Illuminate\\Support\\Carbon;\nuse Illuminate\\Support\\Str;\n\nclass DebounceLock\n{\n use ReadsQueueAttributes;\n\n /**\n * The cache repository implementation.\n *\n * @var \\Illuminate\\Contracts\\Cache\\Repository\n */\n protected $cache;\n\n /**\n * Create a new debounce lock manager instance.\n *\n * @param \\Illuminate\\Contracts\\Cache\\Repository $cache\n */\n public function __construct(Cache $", "suffix": "$job\n * @param int|null $debounceFor\n * @param int|null $maxWait\n * @return array{owner: string, maxWaitExceeded: bool}\n */\n public function acquire($job, $debounceFor = null, $maxWait = null)\n {\n $cache = $this->resolveCac", "middle": "cache)\n {\n $this->cache = $cache;\n }\n\n /**\n * Store a debounce owner token for the given job.\n *\n * Overwrites any existing token, implementing last-writer-wins semantics.\n *\n * @param mixed ", "meta": {"filepath": "src/Illuminate/Bus/DebounceLock.php", "language": "php", "file_size": 4647, "cut_index": 614, "middle_length": 229}} {"prefix": "@var \\Aws\\DynamoDb\\DynamoDbClient\n */\n protected $dynamoDbClient;\n\n /**\n * The application name.\n *\n * @var string\n */\n protected $applicationName;\n\n /**\n * The table to use to store batch information.\n *\n * @var string\n */\n protected $table;\n\n /**\n * The time-to-live value for batch records.\n *\n * @var int\n */\n protected $ttl;\n\n /**\n * The name of the time-to-live attribute for batch records.\n *\n * @var string\n */\n ", "suffix": "function __construct(\n BatchFactory $factory,\n DynamoDbClient $dynamoDbClient,\n string $applicationName,\n string $table,\n ?int $ttl,\n ?string $ttlAttribute,\n ) {\n $this->factory = $factory;\n $this-", "middle": " protected $ttlAttribute;\n\n /**\n * The DynamoDB marshaler instance.\n *\n * @var \\Aws\\DynamoDb\\Marshaler\n */\n protected $marshaler;\n\n /**\n * Create a new batch repository instance.\n */\n public ", "meta": {"filepath": "src/Illuminate/Bus/DynamoBatchRepository.php", "language": "php", "file_size": 15302, "cut_index": 921, "middle_length": 229}} {"prefix": "pace Illuminate\\Routing;\n\nclass RouteUri\n{\n /**\n * The route URI.\n *\n * @var string\n */\n public $uri;\n\n /**\n * The fields that should be used when resolving bindings.\n *\n * @var array\n */\n public $bindingFields = [];\n\n /**\n * Create a new route URI instance.\n *\n * @param string $uri\n * @param array $bindingFields\n */\n public function __construct(string $uri, array $bindingFields = [])\n {\n $this->uri = $uri;\n $this->bi", "suffix": "$uri, $matches);\n\n $bindingFields = [];\n\n foreach ($matches[0] as $match) {\n if (! str_contains($match, ':')) {\n continue;\n }\n\n $segments = explode(':', trim($match, '{}?'));\n\n $bindi", "middle": "ndingFields = $bindingFields;\n }\n\n /**\n * Parse the given URI.\n *\n * @param string $uri\n * @return static\n */\n public static function parse($uri)\n {\n preg_match_all('/\\{([\\w\\:]+?)\\??\\}/', ", "meta": {"filepath": "src/Illuminate/Routing/RouteUri.php", "language": "php", "file_size": 1296, "cut_index": 524, "middle_length": 229}} {"prefix": "losure;\nuse Illuminate\\Support\\Arr;\nuse Illuminate\\Support\\Collection;\nuse JsonSerializable;\nuse Throwable;\n\nclass Batch implements Arrayable, JsonSerializable\n{\n /**\n * The queue factory implementation.\n *\n * @var \\Illuminate\\Contracts\\Queue\\Factory\n */\n protected $queue;\n\n /**\n * The repository implementation.\n *\n * @var \\Illuminate\\Bus\\BatchRepository\n */\n protected $repository;\n\n /**\n * The batch ID.\n *\n * @var string\n */\n public $id;\n\n ", "suffix": "umber of jobs that are still pending.\n *\n * @var int\n */\n public $pendingJobs;\n\n /**\n * The total number of jobs that have failed.\n *\n * @var int\n */\n public $failedJobs;\n\n /**\n * The IDs of the jobs that have fa", "middle": " /**\n * The batch name.\n *\n * @var string\n */\n public $name;\n\n /**\n * The total number of jobs that belong to the batch.\n *\n * @var int\n */\n public $totalJobs;\n\n /**\n * The total n", "meta": {"filepath": "src/Illuminate/Bus/Batch.php", "language": "php", "file_size": 13294, "cut_index": 921, "middle_length": 229}} {"prefix": "erface BatchRepository\n{\n /**\n * Retrieve a list of batches.\n *\n * @param int $limit\n * @param mixed $before\n * @return \\Illuminate\\Bus\\Batch[]\n */\n public function get($limit, $before);\n\n /**\n * Retrieve information about an existing batch.\n *\n * @param string $batchId\n * @return \\Illuminate\\Bus\\Batch|null\n */\n public function find(string $batchId);\n\n /**\n * Store a new pending batch.\n *\n * @param \\Illuminate\\Bus\\PendingBatch $b", "suffix": "ount\n * @return void\n */\n public function incrementTotalJobs(string $batchId, int $amount);\n\n /**\n * Decrement the total number of pending jobs for the batch.\n *\n * @param string $batchId\n * @param string $jobId\n * @re", "middle": "atch\n * @return \\Illuminate\\Bus\\Batch\n */\n public function store(PendingBatch $batch);\n\n /**\n * Increment the total number of jobs within the batch.\n *\n * @param string $batchId\n * @param int $am", "meta": {"filepath": "src/Illuminate/Bus/BatchRepository.php", "language": "php", "file_size": 2319, "cut_index": 563, "middle_length": 229}} {"prefix": "\nuse Illuminate\\Contracts\\Bus\\Dispatcher as DispatcherContract;\nuse Illuminate\\Contracts\\Bus\\QueueingDispatcher as QueueingDispatcherContract;\nuse Illuminate\\Contracts\\Queue\\Factory as QueueFactoryContract;\nuse Illuminate\\Contracts\\Support\\DeferrableProvider;\nuse Illuminate\\Support\\Arr;\nuse Illuminate\\Support\\ServiceProvider;\n\nclass BusServiceProvider extends ServiceProvider implements DeferrableProvider\n{\n /**\n * Register the service provider.\n *\n * @return void\n */\n public function r", "suffix": "::class)->connection($connection);\n });\n });\n\n $this->registerBatchServices();\n\n $this->app->alias(\n Dispatcher::class, DispatcherContract::class\n );\n\n $this->app->alias(\n DispatcherContra", "middle": "egister()\n {\n $this->app->singleton(Dispatcher::class, function ($app) {\n return new Dispatcher($app, function ($connection = null) {\n return Container::getInstance()->make(QueueFactoryContract", "meta": {"filepath": "src/Illuminate/Bus/BusServiceProvider.php", "language": "php", "file_size": 3470, "cut_index": 614, "middle_length": 229}} {"prefix": " * @var string|null\n */\n public $connection;\n\n /**\n * The name of the queue the job should be sent to.\n *\n * @var string|null\n */\n public $queue;\n\n /**\n * The job \"group\" the job should be sent to.\n *\n * @var string|null\n */\n public $messageGroup;\n\n /**\n * The job deduplicator callback the job should use to generate the deduplication ID.\n *\n * @var \\Laravel\\SerializableClosure\\SerializableClosure|null\n */\n public $deduplicator;\n\n /", "suffix": "\\DateTimeInterface|\\DateInterval|array|int|null\n */\n public $delay;\n\n /**\n * Indicates whether the job should be dispatched after all database transactions have committed.\n *\n * @var bool|null\n */\n public $afterCommit;\n\n /**", "middle": "**\n * The lock owner token for debounce supersession checks.\n *\n * @var string\n */\n public $debounceOwner = '';\n\n /**\n * The number of seconds before the job should be made available.\n *\n * @var ", "meta": {"filepath": "src/Illuminate/Bus/Queueable.php", "language": "php", "file_size": 9279, "cut_index": 921, "middle_length": 229}} {"prefix": "amespace Illuminate\\Bus;\n\nclass UpdatedBatchJobCounts\n{\n /**\n * The number of pending jobs remaining for the batch.\n *\n * @var int\n */\n public $pendingJobs;\n\n /**\n * The number of failed jobs that belong to the batch.\n *\n * @var int\n */\n public $failedJobs;\n\n /**\n * Create a new batch job counts object.\n *\n * @param int $pendingJobs\n * @param int $failedJobs\n */\n public function __construct(int $pendingJobs = 0, int $failedJobs = 0)\n ", "suffix": " $this->failedJobs = $failedJobs;\n }\n\n /**\n * Determine if all jobs have run exactly once.\n *\n * @return bool\n */\n public function allJobsHaveRanExactlyOnce()\n {\n return ($this->pendingJobs - $this->failedJobs) === 0;\n", "middle": " {\n $this->pendingJobs = $pendingJobs;\n ", "meta": {"filepath": "src/Illuminate/Bus/UpdatedBatchJobCounts.php", "language": "php", "file_size": 836, "cut_index": 520, "middle_length": 52}} {"prefix": "ts\\Database\\Eloquent;\n\nuse Illuminate\\Database\\Eloquent\\Model;\n\n/**\n * @template TGet\n * @template TSet\n */\ninterface CastsAttributes\n{\n /**\n * Transform the attribute from the underlying model values.\n *\n * @param \\Illuminate\\Database\\Eloquent\\Model $model\n * @param string $key\n * @param mixed $value\n * @param array $attributes\n * @return TGet|null\n */\n public function get(Model $model, string $key, mixed $value, array $attributes);\n\n /**\n ", "suffix": "alues.\n *\n * @param \\Illuminate\\Database\\Eloquent\\Model $model\n * @param string $key\n * @param TSet|null $value\n * @param array $attributes\n * @return mixed\n */\n public function set(Model $model, string", "middle": " * Transform the attribute to its underlying model v", "meta": {"filepath": "src/Illuminate/Contracts/Database/Eloquent/CastsAttributes.php", "language": "php", "file_size": 898, "cut_index": 547, "middle_length": 52}} {"prefix": "TClass of object\n *\n * @param string|class-string $id\n * @return ($id is class-string ? TClass : mixed)\n */\n public function get(string $id);\n\n /**\n * Determine if the given abstract type has been bound.\n *\n * @param string $abstract\n * @return bool\n */\n public function bound($abstract);\n\n /**\n * Alias a type to a different name.\n *\n * @param string $abstract\n * @param string $alias\n * @return void\n *\n * @thr", "suffix": " */\n public function tag($abstracts, $tags);\n\n /**\n * Resolve all of the bindings for a given tag.\n *\n * @param string $tag\n * @return iterable\n */\n public function tagged($tag);\n\n /**\n * Register a binding with th", "middle": "ows \\LogicException\n */\n public function alias($abstract, $alias);\n\n /**\n * Assign a set of tags to a given binding.\n *\n * @param array|string $abstracts\n * @param mixed ...$tags\n * @return void\n", "meta": {"filepath": "src/Illuminate/Contracts/Container/Container.php", "language": "php", "file_size": 6157, "cut_index": 716, "middle_length": 229}} {"prefix": "BatchFactory\n */\n protected $factory;\n\n /**\n * The database connection instance.\n *\n * @var \\Illuminate\\Database\\Connection\n */\n protected $connection;\n\n /**\n * The database table to use to store batch information.\n *\n * @var string\n */\n protected $table;\n\n /**\n * Create a new batch repository instance.\n *\n * @param \\Illuminate\\Bus\\BatchFactory $factory\n * @param \\Illuminate\\Database\\Connection $connection\n * @param string $tabl", "suffix": "**\n * Retrieve a list of batches.\n *\n * @param int $limit\n * @param mixed $before\n * @return \\Illuminate\\Bus\\Batch[]\n */\n public function get($limit = 50, $before = null)\n {\n return $this->connection->table($this->t", "middle": "e\n */\n public function __construct(BatchFactory $factory, Connection $connection, string $table)\n {\n $this->factory = $factory;\n $this->connection = $connection;\n $this->table = $table;\n }\n\n /", "meta": {"filepath": "src/Illuminate/Bus/DatabaseBatchRepository.php", "language": "php", "file_size": 11055, "cut_index": 921, "middle_length": 229}} {"prefix": "pace Illuminate\\Routing;\n\nuse Illuminate\\Contracts\\Routing\\ResponseFactory;\n\nclass ViewController extends Controller\n{\n /**\n * The response factory implementation.\n *\n * @var \\Illuminate\\Contracts\\Routing\\ResponseFactory\n */\n protected $response;\n\n /**\n * Create a new controller instance.\n *\n * @param \\Illuminate\\Contracts\\Routing\\ResponseFactory $response\n */\n public function __construct(ResponseFactory $response)\n {\n $this->response = $response;\n ", "suffix": "nction ($key) {\n return ! in_array($key, ['view', 'data', 'status', 'headers']);\n }, ARRAY_FILTER_USE_KEY);\n\n $args['data'] = array_merge($args['data'], $routeParameters);\n\n return $this->response->view(\n $args['v", "middle": "}\n\n /**\n * Invoke the controller method.\n *\n * @param mixed ...$args\n * @return \\Illuminate\\Http\\Response\n */\n public function __invoke(...$args)\n {\n $routeParameters = array_filter($args, fu", "meta": {"filepath": "src/Illuminate/Routing/ViewController.php", "language": "php", "file_size": 1425, "cut_index": 524, "middle_length": 229}} {"prefix": "use Illuminate\\Support\\Str;\n\nclass UrlGenerationException extends Exception\n{\n /**\n * Create a new exception for missing route parameters.\n *\n * @param \\Illuminate\\Routing\\Route $route\n * @param array $parameters\n * @return static\n */\n public static function forMissingParameters(Route $route, array $parameters = [])\n {\n $parameterLabel = Str::plural('parameter', count($parameters));\n\n $message = sprintf(\n 'Missing required %s for [Route: %s] [URI", "suffix": "ute->getName(),\n $route->uri()\n );\n\n if ($parameters !== []) {\n $message .= sprintf(' [Missing %s: %s]', $parameterLabel, implode(', ', $parameters));\n }\n\n $message .= '.';\n\n return new static($messa", "middle": ": %s]',\n $parameterLabel,\n $ro", "meta": {"filepath": "src/Illuminate/Routing/Exceptions/UrlGenerationException.php", "language": "php", "file_size": 927, "cut_index": 606, "middle_length": 52}} {"prefix": "Immutable;\nuse Illuminate\\Container\\Container;\nuse Illuminate\\Support\\Str;\nuse Illuminate\\Support\\Testing\\Fakes\\BatchFake;\n\ntrait Batchable\n{\n /**\n * The batch ID (if applicable).\n *\n * @var string|null\n */\n public $batchId;\n\n /**\n * The fake batch, if applicable.\n *\n * @var \\Illuminate\\Support\\Testing\\Fakes\\BatchFake\n */\n private $fakeBatch;\n\n /**\n * Get the batch instance for the job, if applicable.\n *\n * @return \\Illuminate\\Bus\\Batch|null\n */", "suffix": "is->batchId);\n }\n }\n\n /**\n * Determine if the batch is still active and processing.\n *\n * @return bool\n */\n public function batching()\n {\n $batch = $this->batch();\n\n return $batch && ! $batch->cancelled();\n ", "middle": "\n public function batch()\n {\n if ($this->fakeBatch) {\n return $this->fakeBatch;\n }\n\n if ($this->batchId) {\n return Container::getInstance()->make(BatchRepository::class)?->find($th", "meta": {"filepath": "src/Illuminate/Bus/Batchable.php", "language": "php", "file_size": 2836, "cut_index": 563, "middle_length": 229}} {"prefix": "te\\Bus;\n\nuse Illuminate\\Contracts\\Cache\\Repository as Cache;\nuse Illuminate\\Queue\\Attributes\\ReadsQueueAttributes;\nuse Illuminate\\Queue\\Attributes\\UniqueFor;\n\nclass UniqueLock\n{\n use ReadsQueueAttributes;\n\n /**\n * The cache repository implementation.\n *\n * @var \\Illuminate\\Contracts\\Cache\\Repository\n */\n protected $cache;\n\n /**\n * Create a new unique lock manager instance.\n *\n * @param \\Illuminate\\Contracts\\Cache\\Repository $cache\n */\n public function __const", "suffix": " $uniqueFor = method_exists($job, 'uniqueFor')\n ? $job->uniqueFor()\n : ($this->getAttributeValue($job, UniqueFor::class, 'uniqueFor') ?? 0);\n\n $cache = method_exists($job, 'uniqueVia')\n ? ($job->uniqueVia() ?? $th", "middle": "ruct(Cache $cache)\n {\n $this->cache = $cache;\n }\n\n /**\n * Attempt to acquire a lock for the given job.\n *\n * @param mixed $job\n * @return bool\n */\n public function acquire($job)\n {\n ", "meta": {"filepath": "src/Illuminate/Bus/UniqueLock.php", "language": "php", "file_size": 1984, "cut_index": 537, "middle_length": 229}} {"prefix": "e Illuminate\\Database\\Eloquent\\Relations\\Relation;\n\nclass ModelIdentifier\n{\n /**\n * Use the Relation morphMap for a Model's name when serializing.\n */\n protected static bool $useMorphMap = false;\n\n /**\n * The class name of the model.\n *\n * @var class-string<\\Illuminate\\Database\\Eloquent\\Model>|string|null\n */\n public $class;\n\n /**\n * The unique identifier of the model.\n *\n * This may be either a single ID or an array of IDs.\n *\n * @var mixed\n */", "suffix": "connection;\n\n /**\n * The class name of the model collection.\n *\n * @var class-string<\\Illuminate\\Database\\Eloquent\\Collection>|null\n */\n public $collectionClass;\n\n /**\n * Create a new model identifier.\n *\n * @param cla", "middle": "\n public $id;\n\n /**\n * The relationships loaded on the model.\n *\n * @var array\n */\n public $relations;\n\n /**\n * The connection name of the model.\n *\n * @var string|null\n */\n public $", "meta": {"filepath": "src/Illuminate/Contracts/Database/ModelIdentifier.php", "language": "php", "file_size": 2538, "cut_index": 563, "middle_length": 229}} {"prefix": "\\Queue\\ShouldQueue;\nuse Illuminate\\Foundation\\Bus\\PendingChain;\nuse Illuminate\\Pipeline\\Pipeline;\nuse Illuminate\\Queue\\Attributes\\Connection;\nuse Illuminate\\Queue\\Attributes\\Delay;\nuse Illuminate\\Queue\\Attributes\\Queue as QueueAttribute;\nuse Illuminate\\Queue\\Attributes\\ReadsQueueAttributes;\nuse Illuminate\\Queue\\InteractsWithQueue;\nuse Illuminate\\Queue\\Jobs\\SyncJob;\nuse Illuminate\\Support\\Collection;\nuse Illuminate\\Support\\Queue\\Concerns\\ResolvesQueueRoutes;\nuse RuntimeException;\n\nclass Dispatcher implements", "suffix": " The pipeline instance for the bus.\n *\n * @var \\Illuminate\\Pipeline\\Pipeline\n */\n protected $pipeline;\n\n /**\n * The pipes to send commands through before dispatching.\n *\n * @var array\n */\n protected $pipes = [];\n\n /*", "middle": " QueueingDispatcher\n{\n use ReadsQueueAttributes, ResolvesQueueRoutes;\n\n /**\n * The container implementation.\n *\n * @var \\Illuminate\\Contracts\\Container\\Container\n */\n protected $container;\n\n /**\n *", "meta": {"filepath": "src/Illuminate/Bus/Dispatcher.php", "language": "php", "file_size": 8765, "cut_index": 716, "middle_length": 229}} {"prefix": "te\\Bus;\n\nuse Carbon\\CarbonImmutable;\nuse Illuminate\\Contracts\\Queue\\Factory as QueueFactory;\n\nclass BatchFactory\n{\n /**\n * The queue factory implementation.\n *\n * @var \\Illuminate\\Contracts\\Queue\\Factory\n */\n protected $queue;\n\n /**\n * Create a new batch factory instance.\n *\n * @param \\Illuminate\\Contracts\\Queue\\Factory $queue\n */\n public function __construct(QueueFactory $queue)\n {\n $this->queue = $queue;\n }\n\n /**\n * Create a new batch insta", "suffix": "* @param array $failedJobIds\n * @param array $options\n * @param \\Carbon\\CarbonImmutable $createdAt\n * @param \\Carbon\\CarbonImmutable|null $cancelledAt\n * @param \\Carbon\\CarbonImmutable|null $finishedAt\n * @return \\Illuminate\\B", "middle": "nce.\n *\n * @param \\Illuminate\\Bus\\BatchRepository $repository\n * @param string $id\n * @param string $name\n * @param int $totalJobs\n * @param int $pendingJobs\n * @param int $failedJobs\n ", "meta": {"filepath": "src/Illuminate/Bus/BatchFactory.php", "language": "php", "file_size": 1728, "cut_index": 537, "middle_length": 229}} {"prefix": "?php\n\nnamespace Illuminate\\Contracts\\Database\\Eloquent;\n\ninterface SupportsPartialRelations\n{\n /**\n * Indicate that the relation is a single result of a larger one-to-many relationship.\n *\n * @param string|null $column\n * @param string|\\Closure|null $aggregate\n * @param string|null $relation\n * @return $this\n */\n public function ofMany($column = 'id', $aggregate = 'MAX', $relation = null);\n\n /**\n * Determine whether the relationship is a one-of-many relationshi", "suffix": " * @return bool\n */\n public function isOneOfMany();\n\n /**\n * Get the one of many inner join subselect query builder instance.\n *\n * @return \\Illuminate\\Database\\Eloquent\\Builder|void\n */\n public function getOneOfManySubQuery();", "middle": "p.\n *\n ", "meta": {"filepath": "src/Illuminate/Contracts/Database/Eloquent/SupportsPartialRelations.php", "language": "php", "file_size": 786, "cut_index": 513, "middle_length": 14}} {"prefix": "esponse;\nuse RuntimeException;\nuse Throwable;\n\nclass StreamedResponseException extends RuntimeException\n{\n /**\n * The actual exception thrown during the stream.\n *\n * @var \\Throwable\n */\n public $originalException;\n\n /**\n * Create a new exception instance.\n *\n * @param \\Throwable $originalException\n */\n public function __construct(Throwable $originalException)\n {\n $this->originalException = $originalException;\n\n parent::__construct($originalExce", "suffix": "he exception.\n *\n * @return \\Illuminate\\Http\\Response\n */\n public function render()\n {\n return new Response('');\n }\n\n /**\n * Get the actual exception thrown during the stream.\n *\n * @return \\Throwable\n */\n ", "middle": "ption->getMessage());\n }\n\n /**\n * Render t", "meta": {"filepath": "src/Illuminate/Routing/Exceptions/StreamedResponseException.php", "language": "php", "file_size": 981, "cut_index": 582, "middle_length": 52}} {"prefix": ";\n\nuse function Illuminate\\Support\\enum_value;\n\nclass PendingBatch\n{\n use Conditionable;\n\n /**\n * The IoC container instance.\n *\n * @var \\Illuminate\\Contracts\\Container\\Container\n */\n protected $container;\n\n /**\n * The batch name.\n *\n * @var string\n */\n public $name = '';\n\n /**\n * The jobs that belong to the batch.\n *\n * @var \\Illuminate\\Support\\Collection\n */\n public $jobs;\n\n /**\n * The batch options.\n *\n * @var array\n ", "suffix": "new pending batch instance.\n *\n * @param \\Illuminate\\Contracts\\Container\\Container $container\n * @param \\Illuminate\\Support\\Collection $jobs\n */\n public function __construct(Container $container, Collection $jobs)\n {\n $this", "middle": "*/\n public $options = [];\n\n /**\n * Jobs that have been verified to contain the Batchable trait.\n *\n * @var array\n */\n protected static $batchableClasses = [];\n\n /**\n * Create a ", "meta": {"filepath": "src/Illuminate/Bus/PendingBatch.php", "language": "php", "file_size": 11315, "cut_index": 921, "middle_length": 229}} {"prefix": "hp\n\nnamespace Illuminate\\Contracts\\Encryption;\n\ninterface Encrypter\n{\n /**\n * Encrypt the given value.\n *\n * @param mixed $value\n * @param bool $serialize\n * @return string\n *\n * @throws \\Illuminate\\Contracts\\Encryption\\EncryptException\n */\n public function encrypt(#[\\SensitiveParameter] $value, $serialize = true);\n\n /**\n * Decrypt the given value.\n *\n * @param string $payload\n * @param bool $unserialize\n * @return mixed\n *\n * @thr", "suffix": " */\n public function getKey();\n\n /**\n * Get the current encryption key and all previous encryption keys.\n *\n * @return array\n */\n public function getAllKeys();\n\n /**\n * Get the previous encryption keys.\n *\n * @re", "middle": "ows \\Illuminate\\Contracts\\Encryption\\DecryptException\n */\n public function decrypt($payload, $unserialize = true);\n\n /**\n * Get the encryption key that the encrypter is currently using.\n *\n * @return string\n", "meta": {"filepath": "src/Illuminate/Contracts/Encryption/Encrypter.php", "language": "php", "file_size": 1060, "cut_index": 515, "middle_length": 229}} {"prefix": "te\\Contracts\\Mail;\n\nuse Illuminate\\Contracts\\Queue\\Factory as Queue;\n\ninterface Mailable\n{\n /**\n * Send the message using the given mailer.\n *\n * @param \\Illuminate\\Contracts\\Mail\\Factory|\\Illuminate\\Contracts\\Mail\\Mailer $mailer\n * @return \\Illuminate\\Mail\\SentMessage|null\n */\n public function send($mailer);\n\n /**\n * Queue the given message.\n *\n * @param \\Illuminate\\Contracts\\Queue\\Factory $queue\n * @return mixed\n */\n public function queue(Queue $queu", "suffix": "ic function later($delay, Queue $queue);\n\n /**\n * Set the recipients of the message.\n *\n * @param object|array|string $address\n * @param string|null $name\n * @return $this\n */\n public function cc($address, $name = null);\n\n", "middle": "e);\n\n /**\n * Deliver the queued message after (n) seconds.\n *\n * @param \\DateTimeInterface|\\DateInterval|int $delay\n * @param \\Illuminate\\Contracts\\Queue\\Factory $queue\n * @return mixed\n */\n publ", "meta": {"filepath": "src/Illuminate/Contracts/Mail/Mailable.php", "language": "php", "file_size": 1791, "cut_index": 537, "middle_length": 229}} {"prefix": "ionSuggestions;\nuse Symfony\\Component\\Console\\Completion\\Suggestion;\nuse Symfony\\Component\\Console\\Input\\InputArgument;\nuse Symfony\\Component\\Finder\\Finder;\n\nabstract class GeneratorCommand extends Command implements PromptsForMissingInput\n{\n use FindsAvailableModels;\n\n /**\n * The filesystem instance.\n *\n * @var \\Illuminate\\Filesystem\\Filesystem\n */\n protected $files;\n\n /**\n * The type of class being generated.\n *\n * @var string\n */\n protected $type;\n\n /**\n ", "suffix": "reak',\n 'callable',\n 'case',\n 'catch',\n 'class',\n 'clone',\n 'const',\n 'continue',\n 'declare',\n 'default',\n 'die',\n 'do',\n 'echo',\n 'else',\n 'elseif',\n ", "middle": " * Reserved names that cannot be used for generation.\n *\n * @var string[]\n */\n protected $reservedNames = [\n '__halt_compiler',\n 'abstract',\n 'and',\n 'array',\n 'as',\n 'b", "meta": {"filepath": "src/Illuminate/Console/GeneratorCommand.php", "language": "php", "file_size": 14296, "cut_index": 921, "middle_length": 229}} {"prefix": " Countable;\n\ninterface MessageBag extends Arrayable, Countable\n{\n /**\n * Get the keys present in the message bag.\n *\n * @return array\n */\n public function keys();\n\n /**\n * Add a message to the bag.\n *\n * @param string $key\n * @param string $message\n * @return $this\n */\n public function add($key, $message);\n\n /**\n * Merge a new array of messages into the bag.\n *\n * @param \\Illuminate\\Contracts\\Support\\MessageProvider|array $messages\n ", "suffix": " /**\n * Get the first message from the bag for a given key.\n *\n * @param string|null $key\n * @param string|null $format\n * @return string\n */\n public function first($key = null, $format = null);\n\n /**\n * Get all of the", "middle": " * @return $this\n */\n public function merge($messages);\n\n /**\n * Determine if messages exist for a given key.\n *\n * @param string|array $key\n * @return bool\n */\n public function has($key);\n\n ", "meta": {"filepath": "src/Illuminate/Contracts/Support/MessageBag.php", "language": "php", "file_size": 2234, "cut_index": 563, "middle_length": 229}} {"prefix": " * The private visibility setting.\n *\n * @var string\n */\n const VISIBILITY_PRIVATE = 'private';\n\n /**\n * Get the full path to the file that exists at the given relative path.\n *\n * @param string $path\n * @return string\n */\n public function path($path);\n\n /**\n * Determine if a file exists.\n *\n * @param string $path\n * @return bool\n */\n public function exists($path);\n\n /**\n * Get the contents of a file.\n *\n * @param stri", "suffix": " */\n public function readStream($path);\n\n /**\n * Write the contents of a file.\n *\n * @param string $path\n * @param \\Psr\\Http\\Message\\StreamInterface|\\Illuminate\\Http\\File|\\Illuminate\\Http\\UploadedFile|string|resource $contents", "middle": "ng $path\n * @return string|null\n */\n public function get($path);\n\n /**\n * Get a resource to read the file.\n *\n * @param string $path\n * @return resource|null The path resource or null on failure.\n", "meta": {"filepath": "src/Illuminate/Contracts/Filesystem/Filesystem.php", "language": "php", "file_size": 5124, "cut_index": 716, "middle_length": 229}} {"prefix": "te\\Contracts\\View;\n\ninterface Factory\n{\n /**\n * Determine if a given view exists.\n *\n * @param string $view\n * @return bool\n */\n public function exists($view);\n\n /**\n * Get the evaluated view contents for the given path.\n *\n * @param string $path\n * @param \\Illuminate\\Contracts\\Support\\Arrayable|array $data\n * @param array $mergeData\n * @return \\Illuminate\\Contracts\\View\\View\n */\n public function file($path, $data = [], $mergeData = []);\n\n ", "suffix": "\\Contracts\\View\\View\n */\n public function make($view, $data = [], $mergeData = []);\n\n /**\n * Add a piece of shared data to the environment.\n *\n * @param array|string $key\n * @param mixed $value\n * @return mixed\n */\n ", "middle": " /**\n * Get the evaluated view contents for the given view.\n *\n * @param string $view\n * @param \\Illuminate\\Contracts\\Support\\Arrayable|array $data\n * @param array $mergeData\n * @return \\Illuminate", "meta": {"filepath": "src/Illuminate/Contracts/View/Factory.php", "language": "php", "file_size": 1933, "cut_index": 537, "middle_length": 229}} {"prefix": "the translation for a given key.\n *\n * @param string $key\n * @param array $replace\n * @param string|null $locale\n * @return mixed\n */\n public function get($key, array $replace = [], $locale = null);\n\n /**\n * Get a translation according to an integer value.\n *\n * @param string $key\n * @param \\Countable|int|float|array $number\n * @param array $replace\n * @param string|null $locale\n * @return string\n */\n public function choice($key,", "suffix": " /**\n * Get the default locale being used.\n *\n * @return string\n */\n public function getLocale();\n\n /**\n * Set the default locale.\n *\n * @param string $locale\n * @return void\n */\n public function setLocale($lo", "middle": " $number, array $replace = [], $locale = null);\n\n ", "meta": {"filepath": "src/Illuminate/Contracts/Translation/Translator.php", "language": "php", "file_size": 923, "cut_index": 606, "middle_length": 52}} {"prefix": " *\n * @return string|null\n */\n public function uuid();\n\n /**\n * Get the job identifier.\n *\n * @return string\n */\n public function getJobId();\n\n /**\n * Get the decoded body of the job.\n *\n * @return array\n */\n public function payload();\n\n /**\n * Fire the job.\n *\n * @return void\n */\n public function fire();\n\n /**\n * Release the job back into the queue after (n) seconds.\n *\n * @param int $delay\n * @return void", "suffix": " queue.\n *\n * @return void\n */\n public function delete();\n\n /**\n * Determine if the job has been deleted.\n *\n * @return bool\n */\n public function isDeleted();\n\n /**\n * Determine if the job has been deleted or rel", "middle": "\n */\n public function release($delay = 0);\n\n /**\n * Determine if the job was released back into the queue.\n *\n * @return bool\n */\n public function isReleased();\n\n /**\n * Delete the job from the", "meta": {"filepath": "src/Illuminate/Contracts/Queue/Job.php", "language": "php", "file_size": 3280, "cut_index": 614, "middle_length": 229}} {"prefix": "Illuminate\\Contracts\\Queue;\n\ninterface Monitor\n{\n /**\n * Register a callback to be executed when a daemon queue is starting.\n *\n * @param mixed $callback\n * @return void\n */\n public function starting($callback);\n\n /**\n * Register a callback to be executed on every iteration through the queue loop.\n *\n * @param mixed $callback\n * @return void\n */\n public function looping($callback);\n\n /**\n * Register a callback to be executed when a job fails aft", "suffix": "am mixed $callback\n * @return void\n */\n public function failing($callback);\n\n /**\n * Register a callback to be executed when a daemon queue is stopping.\n *\n * @param mixed $callback\n * @return void\n */\n public funct", "middle": "er the maximum number of retries.\n *\n * @par", "meta": {"filepath": "src/Illuminate/Contracts/Queue/Monitor.php", "language": "php", "file_size": 864, "cut_index": 529, "middle_length": 52}} {"prefix": "hp\n\nnamespace Illuminate\\Contracts\\Auth;\n\ninterface Authenticatable\n{\n /**\n * Get the name of the unique identifier for the user.\n *\n * @return string\n */\n public function getAuthIdentifierName();\n\n /**\n * Get the unique identifier for the user.\n *\n * @return mixed\n */\n public function getAuthIdentifier();\n\n /**\n * Get the name of the password attribute for the user.\n *\n * @return string\n */\n public function getAuthPasswordName();\n\n /**\n ", "suffix": "nction getRememberToken();\n\n /**\n * Set the token value for the \"remember me\" session.\n *\n * @param string $value\n * @return void\n */\n public function setRememberToken($value);\n\n /**\n * Get the column name for the \"rememb", "middle": " * Get the password for the user.\n *\n * @return string\n */\n public function getAuthPassword();\n\n /**\n * Get the token value for the \"remember me\" session.\n *\n * @return string\n */\n public fu", "meta": {"filepath": "src/Illuminate/Contracts/Auth/Authenticatable.php", "language": "php", "file_size": 1097, "cut_index": 515, "middle_length": 229}} {"prefix": "te\\Contracts\\Mail;\n\ninterface Mailer\n{\n /**\n * Begin the process of mailing a mailable class instance.\n *\n * @param mixed $users\n * @return \\Illuminate\\Mail\\PendingMail\n */\n public function to($users);\n\n /**\n * Begin the process of mailing a mailable class instance.\n *\n * @param mixed $users\n * @return \\Illuminate\\Mail\\PendingMail\n */\n public function cc($users);\n\n /**\n * Begin the process of mailing a mailable class instance.\n *\n * @par", "suffix": "ack\n * @return \\Illuminate\\Mail\\SentMessage|null\n */\n public function raw($text, $callback);\n\n /**\n * Send a new message using a view.\n *\n * @param \\Illuminate\\Contracts\\Mail\\Mailable|string|array $view\n * @param array $da", "middle": "am mixed $users\n * @return \\Illuminate\\Mail\\PendingMail\n */\n public function bcc($users);\n\n /**\n * Send a new message with only a raw text part.\n *\n * @param string $text\n * @param mixed $callb", "meta": {"filepath": "src/Illuminate/Contracts/Mail/Mailer.php", "language": "php", "file_size": 1553, "cut_index": 537, "middle_length": 229}} {"prefix": "ng $content\n * @param int $status\n * @param array $headers\n * @return \\Illuminate\\Http\\Response\n */\n public function make($content = '', $status = 200, array $headers = []);\n\n /**\n * Create a new \"no content\" response.\n *\n * @param int $status\n * @param array $headers\n * @return \\Illuminate\\Http\\Response\n */\n public function noContent($status = 204, array $headers = []);\n\n /**\n * Create a new response for a given view.\n *\n * @param st", "suffix": " []);\n\n /**\n * Create a new JSON response instance.\n *\n * @param mixed $data\n * @param int $status\n * @param array $headers\n * @param int $options\n * @return \\Illuminate\\Http\\JsonResponse\n */\n public function j", "middle": "ring|array $view\n * @param array $data\n * @param int $status\n * @param array $headers\n * @return \\Illuminate\\Http\\Response\n */\n public function view($view, $data = [], $status = 200, array $headers =", "meta": {"filepath": "src/Illuminate/Contracts/Routing/ResponseFactory.php", "language": "php", "file_size": 5564, "cut_index": 716, "middle_length": 229}} {"prefix": "erface UrlGenerator\n{\n /**\n * Get the current URL for the request.\n *\n * @return string\n */\n public function current();\n\n /**\n * Get the URL for the previous request.\n *\n * @param mixed $fallback\n * @return string\n */\n public function previous($fallback = false);\n\n /**\n * Generate an absolute URL to the given path.\n *\n * @param string $path\n * @param mixed $extra\n * @param bool|null $secure\n * @return string\n */\n publi", "suffix": "function secure($path, $parameters = []);\n\n /**\n * Generate the URL to an application asset.\n *\n * @param string $path\n * @param bool|null $secure\n * @return string\n */\n public function asset($path, $secure = null);\n\n /", "middle": "c function to($path, $extra = [], $secure = null);\n\n /**\n * Generate a secure, absolute URL to the given path.\n *\n * @param string $path\n * @param array $parameters\n * @return string\n */\n public ", "meta": {"filepath": "src/Illuminate/Contracts/Routing/UrlGenerator.php", "language": "php", "file_size": 3009, "cut_index": 563, "middle_length": 229}} {"prefix": "te\\Contracts\\Bus;\n\ninterface Dispatcher\n{\n /**\n * Dispatch a command to its appropriate handler.\n *\n * @param mixed $command\n * @return mixed\n */\n public function dispatch($command);\n\n /**\n * Dispatch a command to its appropriate handler in the current process.\n *\n * Queueable jobs will be dispatched to the \"sync\" queue.\n *\n * @param mixed $command\n * @param mixed $handler\n * @return mixed\n */\n public function dispatchSync($command, $hand", "suffix": "$command, $handler = null);\n\n /**\n * Dispatch a command to its appropriate handler after the current process.\n *\n * @param mixed $command\n * @param mixed $handler\n * @return void\n */\n public function dispatchAfterResponse(", "middle": "ler = null);\n\n /**\n * Dispatch a command to its appropriate handler in the current process.\n *\n * @param mixed $command\n * @param mixed $handler\n * @return mixed\n */\n public function dispatchNow(", "meta": {"filepath": "src/Illuminate/Contracts/Bus/Dispatcher.php", "language": "php", "file_size": 1931, "cut_index": 537, "middle_length": 229}} {"prefix": " /**\n * Get information about the given hashed value.\n *\n * @param string $hashedValue\n * @return array\n */\n public function info($hashedValue);\n\n /**\n * Hash the given value.\n *\n * @param string $value\n * @param array $options\n * @return string\n */\n public function make(#[\\SensitiveParameter] $value, array $options = []);\n\n /**\n * Check the given plain value against a hash.\n *\n * @param string $value\n * @param string $hashedV", "suffix": "ool\n */\n public function check(#[\\SensitiveParameter] $value, $hashedValue, array $options = []);\n\n /**\n * Check if the given hash has been hashed using the given options.\n *\n * @param string $hashedValue\n * @param array $opti", "middle": "alue\n * @param array $options\n * @return b", "meta": {"filepath": "src/Illuminate/Contracts/Hashing/Hasher.php", "language": "php", "file_size": 992, "cut_index": 582, "middle_length": 52}} {"prefix": "te\\Contracts\\Auth;\n\ninterface StatefulGuard extends Guard\n{\n /**\n * Attempt to authenticate a user using the given credentials.\n *\n * @param array $credentials\n * @param bool $remember\n * @return bool\n */\n public function attempt(array $credentials = [], $remember = false);\n\n /**\n * Log a user into the application without sessions or cookies.\n *\n * @param array $credentials\n * @return bool\n */\n public function once(array $credentials = []);\n\n ", "suffix": "mber = false);\n\n /**\n * Log the given user ID into the application.\n *\n * @param mixed $id\n * @param bool $remember\n * @return \\Illuminate\\Contracts\\Auth\\Authenticatable|false\n */\n public function loginUsingId($id, $rememb", "middle": "/**\n * Log a user into the application.\n *\n * @param \\Illuminate\\Contracts\\Auth\\Authenticatable $user\n * @param bool $remember\n * @return void\n */\n public function login(Authenticatable $user, $reme", "meta": {"filepath": "src/Illuminate/Contracts/Auth/StatefulGuard.php", "language": "php", "file_size": 1538, "cut_index": 537, "middle_length": 229}} {"prefix": "en ability has been defined.\n *\n * @param \\UnitEnum|string $ability\n * @return bool\n */\n public function has($ability);\n\n /**\n * Define a new ability.\n *\n * @param \\UnitEnum|string $ability\n * @param callable|string $callback\n * @return $this\n */\n public function define($ability, $callback);\n\n /**\n * Define abilities for a resource.\n *\n * @param string $name\n * @param string $class\n * @param array|null $abilities\n * @ret", "suffix": "turn $this\n */\n public function policy($class, $policy);\n\n /**\n * Register a callback to run before all Gate checks.\n *\n * @param callable $callback\n * @return $this\n */\n public function before(callable $callback);\n\n /", "middle": "urn $this\n */\n public function resource($name, $class, ?array $abilities = null);\n\n /**\n * Define a policy class for a given class type.\n *\n * @param string $class\n * @param string $policy\n * @re", "meta": {"filepath": "src/Illuminate/Contracts/Auth/Access/Gate.php", "language": "php", "file_size": 3798, "cut_index": 614, "middle_length": 229}} {"prefix": " session.\n *\n * @return string\n */\n public function getName();\n\n /**\n * Set the name of the session.\n *\n * @param string $name\n * @return void\n */\n public function setName($name);\n\n /**\n * Get the current session ID.\n *\n * @return string\n */\n public function getId();\n\n /**\n * Set the session ID.\n *\n * @param string $id\n * @return void\n */\n public function setId($id);\n\n /**\n * Start the session, reading the da", "suffix": "ssion data.\n *\n * @return array\n */\n public function all();\n\n /**\n * Checks if a key exists.\n *\n * @param string|array $key\n * @return bool\n */\n public function exists($key);\n\n /**\n * Checks if a key is pre", "middle": "ta from a handler.\n *\n * @return bool\n */\n public function start();\n\n /**\n * Save the session data to storage.\n *\n * @return void\n */\n public function save();\n\n /**\n * Get all of the se", "meta": {"filepath": "src/Illuminate/Contracts/Session/Session.php", "language": "php", "file_size": 4099, "cut_index": 614, "middle_length": 229}} {"prefix": "face Queue\n{\n /**\n * Get the size of the queue.\n *\n * @param string|null $queue\n * @return int\n */\n public function size($queue = null);\n\n /**\n * Get the number of pending jobs.\n *\n * @param string|null $queue\n * @return int\n */\n public function pendingSize($queue = null);\n\n /**\n * Get the number of delayed jobs.\n *\n * @param string|null $queue\n * @return int\n */\n public function delayedSize($queue = null);\n\n /**\n * G", "suffix": " delayed jobs.\n *\n * @param string|null $queue\n * @return int|null\n */\n public function creationTimeOfOldestPendingJob($queue = null);\n\n /**\n * Push a new job onto the queue.\n *\n * @param string|object $job\n * @par", "middle": "et the number of reserved jobs.\n *\n * @param string|null $queue\n * @return int\n */\n public function reservedSize($queue = null);\n\n /**\n * Get the creation timestamp of the oldest pending job, excluding", "meta": {"filepath": "src/Illuminate/Contracts/Queue/Queue.php", "language": "php", "file_size": 3033, "cut_index": 563, "middle_length": 229}} {"prefix": "erface Registrar\n{\n /**\n * Register a new GET route with the router.\n *\n * @param string $uri\n * @param array|string|callable $action\n * @return \\Illuminate\\Routing\\Route\n */\n public function get($uri, $action);\n\n /**\n * Register a new POST route with the router.\n *\n * @param string $uri\n * @param array|string|callable $action\n * @return \\Illuminate\\Routing\\Route\n */\n public function post($uri, $action);\n\n /**\n * Register a new PUT r", "suffix": " route with the router.\n *\n * @param string $uri\n * @param array|string|callable $action\n * @return \\Illuminate\\Routing\\Route\n */\n public function delete($uri, $action);\n\n /**\n * Register a new PATCH route with the router.", "middle": "oute with the router.\n *\n * @param string $uri\n * @param array|string|callable $action\n * @return \\Illuminate\\Routing\\Route\n */\n public function put($uri, $action);\n\n /**\n * Register a new DELETE", "meta": {"filepath": "src/Illuminate/Contracts/Routing/Registrar.php", "language": "php", "file_size": 2691, "cut_index": 563, "middle_length": 229}} {"prefix": "\ninterface UrlRoutable\n{\n /**\n * Get the value of the model's route key.\n *\n * @return mixed\n */\n public function getRouteKey();\n\n /**\n * Get the route key for the model.\n *\n * @return string\n */\n public function getRouteKeyName();\n\n /**\n * Retrieve the model for a bound value.\n *\n * @param mixed $value\n * @param string|null $field\n * @return \\Illuminate\\Database\\Eloquent\\Model|null\n */\n public function resolveRouteBinding($value,", "suffix": "model for a bound value.\n *\n * @param string $childType\n * @param mixed $value\n * @param string|null $field\n * @return \\Illuminate\\Database\\Eloquent\\Model|null\n */\n public function resolveChildRouteBinding($childType, $valu", "middle": " $field = null);\n\n /**\n * Retrieve the child ", "meta": {"filepath": "src/Illuminate/Contracts/Routing/UrlRoutable.php", "language": "php", "file_size": 881, "cut_index": 559, "middle_length": 52}} {"prefix": "pace Illuminate\\Contracts\\Auth;\n\nuse Closure;\n\ninterface PasswordBroker\n{\n /**\n * Constant representing a successfully sent reminder.\n *\n * @var string\n */\n const RESET_LINK_SENT = 'passwords.sent';\n\n /**\n * Constant representing a successfully reset password.\n *\n * @var string\n */\n const PASSWORD_RESET = 'passwords.reset';\n\n /**\n * Constant representing the user not found response.\n *\n * @var string\n */\n const INVALID_USER = 'passwords.user'", "suffix": " */\n const RESET_THROTTLED = 'passwords.throttled';\n\n /**\n * Send a password reset link to a user.\n *\n * @param array $credentials\n * @param \\Closure|null $callback\n * @return string\n */\n public function sendResetLin", "middle": ";\n\n /**\n * Constant representing an invalid token.\n *\n * @var string\n */\n const INVALID_TOKEN = 'passwords.token';\n\n /**\n * Constant representing a throttled reset attempt.\n *\n * @var string\n ", "meta": {"filepath": "src/Illuminate/Contracts/Auth/PasswordBroker.php", "language": "php", "file_size": 1289, "cut_index": 524, "middle_length": 229}} {"prefix": "space Illuminate\\Contracts\\Translation;\n\ninterface Loader\n{\n /**\n * Load the messages for the given locale.\n *\n * @param string $locale\n * @param string $group\n * @param string|null $namespace\n * @return array\n */\n public function load($locale, $group, $namespace = null);\n\n /**\n * Add a new namespace to the loader.\n *\n * @param string $namespace\n * @param string $hint\n * @return void\n */\n public function addNamespace($namespace, $hint", "suffix": ".\n *\n * @param string $path\n * @return void\n */\n public function addJsonPath($path);\n\n /**\n * Get an array of all the registered namespaces.\n *\n * @return array\n */\n public function namespaces();\n}", "middle": ");\n\n /**\n * Add a new JSON path to the loader", "meta": {"filepath": "src/Illuminate/Contracts/Translation/Loader.php", "language": "php", "file_size": 832, "cut_index": 523, "middle_length": 52}} {"prefix": "\n\nnamespace Illuminate\\Contracts\\Auth;\n\ninterface MustVerifyEmail\n{\n /**\n * Determine if the user has verified their email address.\n *\n * @return bool\n */\n public function hasVerifiedEmail();\n\n /**\n * Mark the given user's email as verified.\n *\n * @return bool\n */\n public function markEmailAsVerified();\n\n /**\n * Mark the given user's email as unverified.\n *\n * @return bool\n */\n public function markEmailAsUnverified();\n\n /**\n * Send the", "suffix": "ation notification.\n *\n * @return void\n */\n public function sendEmailVerificationNotification();\n\n /**\n * Get the email address that should be used for verification.\n *\n * @return string\n */\n public function getEmailFor", "middle": " email verific", "meta": {"filepath": "src/Illuminate/Contracts/Auth/MustVerifyEmail.php", "language": "php", "file_size": 805, "cut_index": 517, "middle_length": 14}} {"prefix": "te\\Contracts\\Auth;\n\ninterface UserProvider\n{\n /**\n * Retrieve a user by their unique identifier.\n *\n * @param mixed $identifier\n * @return \\Illuminate\\Contracts\\Auth\\Authenticatable|null\n */\n public function retrieveById($identifier);\n\n /**\n * Retrieve a user by their unique identifier and \"remember me\" token.\n *\n * @param mixed $identifier\n * @param string $token\n * @return \\Illuminate\\Contracts\\Auth\\Authenticatable|null\n */\n public function ret", "suffix": " $token\n * @return void\n */\n public function updateRememberToken(Authenticatable $user, #[\\SensitiveParameter] $token);\n\n /**\n * Retrieve a user by the given credentials.\n *\n * @param array $credentials\n * @return \\Illumina", "middle": "rieveByToken($identifier, #[\\SensitiveParameter] $token);\n\n /**\n * Update the \"remember me\" token for the given user in storage.\n *\n * @param \\Illuminate\\Contracts\\Auth\\Authenticatable $user\n * @param string", "meta": {"filepath": "src/Illuminate/Contracts/Auth/UserProvider.php", "language": "php", "file_size": 1828, "cut_index": 537, "middle_length": 229}} {"prefix": "p\n\nnamespace Illuminate\\Contracts\\Broadcasting;\n\ninterface Broadcaster\n{\n /**\n * Authenticate the incoming request for a given channel.\n *\n * @param \\Illuminate\\Http\\Request $request\n * @return mixed\n */\n public function auth($request);\n\n /**\n * Return the valid authentication response.\n *\n * @param \\Illuminate\\Http\\Request $request\n * @param mixed $result\n * @return mixed\n */\n public function validAuthenticationResponse($request, $result);\n\n ", "suffix": "@param array $channels\n * @param string $event\n * @param array $payload\n * @return void\n *\n * @throws \\Illuminate\\Broadcasting\\BroadcastException\n */\n public function broadcast(array $channels, $event, array $payload = []);", "middle": "/**\n * Broadcast the given event.\n *\n * ", "meta": {"filepath": "src/Illuminate/Contracts/Broadcasting/Broadcaster.php", "language": "php", "file_size": 827, "cut_index": 516, "middle_length": 52}} {"prefix": "pace Illuminate\\Contracts\\Validation;\n\nuse Illuminate\\Contracts\\Support\\MessageProvider;\n\ninterface Validator extends MessageProvider\n{\n /**\n * Run the validator's rules against its data.\n *\n * @return array\n *\n * @throws \\Illuminate\\Validation\\ValidationException\n */\n public function validate();\n\n /**\n * Get the attributes and values that were validated.\n *\n * @return array\n *\n * @throws \\Illuminate\\Validation\\ValidationException\n */\n public funct", "suffix": "*/\n public function failed();\n\n /**\n * Add conditions to a given field based on a Closure.\n *\n * @param string|array $attribute\n * @param string|array $rules\n * @param callable $callback\n * @return $this\n */\n publ", "middle": "ion validated();\n\n /**\n * Determine if the data fails the validation rules.\n *\n * @return bool\n */\n public function fails();\n\n /**\n * Get the failed validation rules.\n *\n * @return array\n ", "meta": {"filepath": "src/Illuminate/Contracts/Validation/Validator.php", "language": "php", "file_size": 1389, "cut_index": 524, "middle_length": 229}} {"prefix": "ace Repository extends CacheInterface\n{\n /**\n * Retrieve an item from the cache and delete it.\n *\n * @template TCacheValue\n *\n * @param \\UnitEnum|array|string $key\n * @param TCacheValue|(\\Closure(): TCacheValue) $default\n * @return (TCacheValue is null ? mixed : TCacheValue)\n */\n public function pull($key, $default = null);\n\n /**\n * Store an item in the cache.\n *\n * @param \\UnitEnum|string $key\n * @param mixed $value\n * @param \\DateTimeIn", "suffix": "ey\n * @param mixed $value\n * @param \\DateTimeInterface|\\DateInterval|int|null $ttl\n * @return bool\n */\n public function add($key, $value, $ttl = null);\n\n /**\n * Increment the value of an item in the cache.\n *\n * @param", "middle": "terface|\\DateInterval|int|null $ttl\n * @return bool\n */\n public function put($key, $value, $ttl = null);\n\n /**\n * Store an item in the cache if the key does not exist.\n *\n * @param \\UnitEnum|string $k", "meta": {"filepath": "src/Illuminate/Contracts/Cache/Repository.php", "language": "php", "file_size": 3224, "cut_index": 614, "middle_length": 229}} {"prefix": "terface Kernel\n{\n /**\n * Bootstrap the application for HTTP requests.\n *\n * @return void\n */\n public function bootstrap();\n\n /**\n * Handle an incoming HTTP request.\n *\n * @param \\Symfony\\Component\\HttpFoundation\\Request $request\n * @return \\Symfony\\Component\\HttpFoundation\\Response\n */\n public function handle($request);\n\n /**\n * Perform any final actions for the request lifecycle.\n *\n * @param \\Symfony\\Component\\HttpFoundation\\Request $reque", "suffix": "Response $response\n * @return void\n */\n public function terminate($request, $response);\n\n /**\n * Get the Laravel application instance.\n *\n * @return \\Illuminate\\Contracts\\Foundation\\Application\n */\n public function getAppl", "middle": "st\n * @param \\Symfony\\Component\\HttpFoundation\\", "meta": {"filepath": "src/Illuminate/Contracts/Http/Kernel.php", "language": "php", "file_size": 880, "cut_index": 559, "middle_length": 52}} {"prefix": "\nnamespace Illuminate\\Contracts\\Debug;\n\nuse Throwable;\n\n/**\n * @method bool isReporting(\\Throwable $e)\n * @method array buildContextForException()\n */\ninterface ExceptionHandler\n{\n /**\n * Report or log an exception.\n *\n * @param \\Throwable $e\n * @return void\n *\n * @throws \\Throwable\n */\n public function report(Throwable $e);\n\n /**\n * Determine if the exception should be reported.\n *\n * @param \\Throwable $e\n * @return bool\n */\n public function s", "suffix": "e\n *\n * @throws \\Throwable\n */\n public function render($request, Throwable $e);\n\n /**\n * Render an exception to the console.\n *\n * @param \\Symfony\\Component\\Console\\Output\\OutputInterface $output\n * @param \\Throwable $", "middle": "houldReport(Throwable $e);\n\n /**\n * Render an exception into an HTTP response.\n *\n * @param \\Illuminate\\Http\\Request $request\n * @param \\Throwable $e\n * @return \\Symfony\\Component\\HttpFoundation\\Respons", "meta": {"filepath": "src/Illuminate/Contracts/Debug/ExceptionHandler.php", "language": "php", "file_size": 1194, "cut_index": 518, "middle_length": 229}} {"prefix": "\n * @return string\n */\n public function version();\n\n /**\n * Get the base path of the Laravel installation.\n *\n * @param string $path\n * @return string\n */\n public function basePath($path = '');\n\n /**\n * Get the path to the bootstrap directory.\n *\n * @param string $path\n * @return string\n */\n public function bootstrapPath($path = '');\n\n /**\n * Get the path to the application configuration files.\n *\n * @param string $path\n ", "suffix": "h = '');\n\n /**\n * Get the path to the language files.\n *\n * @param string $path\n * @return string\n */\n public function langPath($path = '');\n\n /**\n * Get the path to the public directory.\n *\n * @param string $pa", "middle": " * @return string\n */\n public function configPath($path = '');\n\n /**\n * Get the path to the database directory.\n *\n * @param string $path\n * @return string\n */\n public function databasePath($pat", "meta": {"filepath": "src/Illuminate/Contracts/Foundation/Application.php", "language": "php", "file_size": 5606, "cut_index": 716, "middle_length": 229}} {"prefix": "te\\Contracts\\Process;\n\ninterface ProcessResult\n{\n /**\n * Get the original command executed by the process.\n *\n * @return string\n */\n public function command();\n\n /**\n * Determine if the process was successful.\n *\n * @return bool\n */\n public function successful();\n\n /**\n * Determine if the process failed.\n *\n * @return bool\n */\n public function failed();\n\n /**\n * Get the exit code of the process.\n *\n * @return int|null\n */\n ", "suffix": " * @param string $output\n * @return bool\n */\n public function seeInOutput(string $output);\n\n /**\n * Get the error output of the process.\n *\n * @return string\n */\n public function errorOutput();\n\n /**\n * Determin", "middle": " public function exitCode();\n\n /**\n * Get the standard output of the process.\n *\n * @return string\n */\n public function output();\n\n /**\n * Determine if the output contains the given string.\n *\n ", "meta": {"filepath": "src/Illuminate/Contracts/Process/ProcessResult.php", "language": "php", "file_size": 1654, "cut_index": 537, "middle_length": 229}} {"prefix": "pace Illuminate\\Contracts\\Cookie;\n\ninterface Factory\n{\n /**\n * Create a new cookie instance.\n *\n * @param string $name\n * @param string $value\n * @param int $minutes\n * @param string|null $path\n * @param string|null $domain\n * @param bool|null $secure\n * @param bool $httpOnly\n * @param bool $raw\n * @param string|null $sameSite\n * @return \\Symfony\\Component\\HttpFoundation\\Cookie\n */\n public function make($name, $value, $minutes = 0, ", "suffix": " * @param string|null $path\n * @param string|null $domain\n * @param bool|null $secure\n * @param bool $httpOnly\n * @param bool $raw\n * @param string|null $sameSite\n * @return \\Symfony\\Component\\HttpFoundation\\Cookie\n ", "middle": "$path = null, $domain = null, $secure = null, $httpOnly = true, $raw = false, $sameSite = null);\n\n /**\n * Create a cookie that lasts \"forever\" (400 days).\n *\n * @param string $name\n * @param string $value\n ", "meta": {"filepath": "src/Illuminate/Contracts/Cookie/Factory.php", "language": "php", "file_size": 1433, "cut_index": 524, "middle_length": 229}} {"prefix": "hp\n\nnamespace Illuminate\\Contracts\\Auth;\n\ninterface Guard\n{\n /**\n * Determine if the current user is authenticated.\n *\n * @return bool\n */\n public function check();\n\n /**\n * Determine if the current user is a guest.\n *\n * @return bool\n */\n public function guest();\n\n /**\n * Get the currently authenticated user.\n *\n * @return \\Illuminate\\Contracts\\Auth\\Authenticatable|null\n */\n public function user();\n\n /**\n * Get the ID for the currentl", "suffix": "n validate(array $credentials = []);\n\n /**\n * Determine if the guard has a user instance.\n *\n * @return bool\n */\n public function hasUser();\n\n /**\n * Set the current user.\n *\n * @param \\Illuminate\\Contracts\\Auth\\Authen", "middle": "y authenticated user.\n *\n * @return int|string|null\n */\n public function id();\n\n /**\n * Validate a user's credentials.\n *\n * @param array $credentials\n * @return bool\n */\n public functio", "meta": {"filepath": "src/Illuminate/Contracts/Auth/Guard.php", "language": "php", "file_size": 1100, "cut_index": 515, "middle_length": 229}} {"prefix": "/**\n * @template TKey of array-key\n *\n * @template-covariant TValue\n *\n * @method $this through(callable(TValue): mixed $callback)\n */\ninterface CursorPaginator\n{\n /**\n * Get the URL for a given cursor.\n *\n * @param \\Illuminate\\Pagination\\Cursor|null $cursor\n * @return string\n */\n public function url($cursor);\n\n /**\n * Add a set of query string values to the paginator.\n *\n * @param array|string|null $key\n * @param string|null $value\n * @return $this\n ", "suffix": "ragment($fragment = null);\n\n /**\n * Add all current query string values to the paginator.\n *\n * @return $this\n */\n public function withQueryString();\n\n /**\n * Get the URL for the previous page, or null.\n *\n * @return st", "middle": " */\n public function appends($key, $value = null);\n\n /**\n * Get / set the URL fragment to be appended to URLs.\n *\n * @param string|null $fragment\n * @return $this|string|null\n */\n public function f", "meta": {"filepath": "src/Illuminate/Contracts/Pagination/CursorPaginator.php", "language": "php", "file_size": 2870, "cut_index": 563, "middle_length": 229}} {"prefix": "\nnamespace Illuminate\\Contracts\\JsonSchema;\n\nuse Closure;\n\ninterface JsonSchema\n{\n /**\n * Create a new object schema instance.\n *\n * @param (Closure(JsonSchema): array)|array $properties\n * @return \\Illuminate\\JsonSchema\\Types\\ObjectType\n */\n public function object(Closure|array $properties = []);\n\n /**\n * Create a new array property instance.\n *\n * @return \\Illuminate\\JsonSchema\\", "suffix": "e a new integer property instance.\n *\n * @return \\Illuminate\\JsonSchema\\Types\\IntegerType\n */\n public function integer();\n\n /**\n * Create a new number property instance.\n *\n * @return \\Illuminate\\JsonSchema\\Types\\NumberType\n ", "middle": "Types\\ArrayType\n */\n public function array();\n\n /**\n * Create a new string property instance.\n *\n * @return \\Illuminate\\JsonSchema\\Types\\StringType\n */\n public function string();\n\n /**\n * Creat", "meta": {"filepath": "src/Illuminate/Contracts/JsonSchema/JsonSchema.php", "language": "php", "file_size": 1199, "cut_index": 518, "middle_length": 229}} {"prefix": "\\Attribute\\AsCommand;\nuse Symfony\\Component\\Console\\Command\\Command as SymfonyCommand;\nuse Symfony\\Component\\Console\\Exception\\CommandNotFoundException;\nuse Symfony\\Component\\Console\\Input\\ArrayInput;\nuse Symfony\\Component\\Console\\Input\\InputDefinition;\nuse Symfony\\Component\\Console\\Input\\InputOption;\nuse Symfony\\Component\\Console\\Input\\StringInput;\nuse Symfony\\Component\\Console\\Output\\BufferedOutput;\n\nuse function Illuminate\\Support\\artisan_binary;\nuse function Illuminate\\Support\\php_binary;\n\nclass Applica", "suffix": "ent dispatcher instance.\n *\n * @var \\Illuminate\\Contracts\\Events\\Dispatcher\n */\n protected $events;\n\n /**\n * The output from the previous command.\n *\n * @var \\Symfony\\Component\\Console\\Output\\BufferedOutput\n */\n protect", "middle": "tion extends SymfonyApplication implements ApplicationContract\n{\n /**\n * The Laravel application instance.\n *\n * @var \\Illuminate\\Contracts\\Container\\Container\n */\n protected $laravel;\n\n /**\n * The ev", "meta": {"filepath": "src/Illuminate/Console/Application.php", "language": "php", "file_size": 9523, "cut_index": 921, "middle_length": 229}} {"prefix": "pace Illuminate\\Console;\n\nuse function Laravel\\Prompts\\confirm;\n\ntrait ConfirmableTrait\n{\n /**\n * Confirm before proceeding with the action.\n *\n * This method only asks for confirmation in production.\n *\n * @template TReturn of bool = bool\n *\n * @param string $warning\n * @param (\\Closure(): TReturn)|TReturn|null $callback\n * @return (TReturn is false ? true : bool)\n */\n public function confirmToProceed($warning = 'Application In Production', $callback = null", "suffix": "n('force')) {\n return true;\n }\n\n $this->components->alert($warning);\n\n $confirmed = confirm('Are you sure you want to run this command?', default: false);\n\n if (! $confirmed) {\n $thi", "middle": ")\n {\n $callback = is_null($callback) ? $this->getDefaultConfirmCallback() : $callback;\n\n $shouldConfirm = value($callback);\n\n if ($shouldConfirm) {\n if ($this->hasOption('force') && $this->optio", "meta": {"filepath": "src/Illuminate/Console/ConfirmableTrait.php", "language": "php", "file_size": 1414, "cut_index": 524, "middle_length": 229}} {"prefix": "te\\Console;\n\nuse Psr\\Container\\ContainerInterface;\nuse Symfony\\Component\\Console\\Command\\Command;\nuse Symfony\\Component\\Console\\CommandLoader\\CommandLoaderInterface;\nuse Symfony\\Component\\Console\\Exception\\CommandNotFoundException;\n\nclass ContainerCommandLoader implements CommandLoaderInterface\n{\n /**\n * The container instance.\n *\n * @var \\Psr\\Container\\ContainerInterface\n */\n protected $container;\n\n /**\n * A map of command names to classes.\n *\n * @var array $commandMap\n */\n public function __construct(ContainerInterface $container, array $commandMap)\n {\n $this->container = $container;\n $this->commandMap = $commandMap;\n }\n\n /**\n * Resolve a command fr", "middle": "uminate\\Console\\Command|string>\n */\n protected $commandMap;\n\n /**\n * Create a new command loader instance.\n *\n * @param \\Psr\\Container\\ContainerInterface $container\n * @param arraycache->store($this->store);\n\n $expiresAt = method_exists($command, 'isolationLockExpiresAt')", "middle": "*\n * @param \\Illuminate\\Contracts\\Cache\\Factory $cache\n */\n public function __construct(Cache $cache)\n {\n $this->cache = $cache;\n }\n\n /**\n * Attempt to obtain a command mutex for the given command", "meta": {"filepath": "src/Illuminate/Console/CacheCommandMutex.php", "language": "php", "file_size": 3672, "cut_index": 614, "middle_length": 229}} {"prefix": "\nnamespace Illuminate\\Contracts\\Validation;\n\ninterface Factory\n{\n /**\n * Create a new Validator instance.\n *\n * @param array $data\n * @param array $rules\n * @param array $messages\n * @param array $attributes\n * @return \\Illuminate\\Contracts\\Validation\\Validator\n */\n public function make(array $data, array $rules, array $messages = [], array $attributes = []);\n\n /**\n * Register a custom validator extension.\n *\n * @param string $rule\n * @param", "suffix": "\n * @param string $rule\n * @param \\Closure|string $extension\n * @param string|null $message\n * @return void\n */\n public function extendImplicit($rule, $extension, $message = null);\n\n /**\n * Register a custom implicit val", "middle": " \\Closure|string $extension\n * @param string|null $message\n * @return void\n */\n public function extend($rule, $extension, $message = null);\n\n /**\n * Register a custom implicit validator extension.\n *", "meta": {"filepath": "src/Illuminate/Contracts/Validation/Factory.php", "language": "php", "file_size": 1184, "cut_index": 518, "middle_length": 229}} {"prefix": "face Store\n{\n /**\n * Retrieve an item from the cache by key.\n *\n * @param string $key\n * @return mixed\n */\n public function get($key);\n\n /**\n * Retrieve multiple items from the cache by key.\n *\n * Items not found in the cache will have a null value.\n *\n * @param array $keys\n * @return array\n */\n public function many(array $keys);\n\n /**\n * Store an item in the cache for a given number of seconds.\n *\n * @param string $key\n * ", "suffix": " array $values\n * @param int $seconds\n * @return bool\n */\n public function putMany(array $values, $seconds);\n\n /**\n * Increment the value of an item in the cache.\n *\n * @param string $key\n * @param mixed $value\n ", "middle": "@param mixed $value\n * @param int $seconds\n * @return bool\n */\n public function put($key, $value, $seconds);\n\n /**\n * Store multiple items in the cache for a given number of seconds.\n *\n * @param", "meta": {"filepath": "src/Illuminate/Contracts/Cache/Store.php", "language": "php", "file_size": 2083, "cut_index": 563, "middle_length": 229}} {"prefix": "te\\Contracts\\Events;\n\ninterface Dispatcher\n{\n /**\n * Register an event listener with the dispatcher.\n *\n * @param \\Closure|string|array $events\n * @param \\Closure|string|array|null $listener\n * @return void\n */\n public function listen($events, $listener = null);\n\n /**\n * Determine if a given event has listeners.\n *\n * @param string $eventName\n * @return bool\n */\n public function hasListeners($eventName);\n\n /**\n * Register an event subscrib", "suffix": " *\n * @param string|object $event\n * @param mixed $payload\n * @return mixed\n */\n public function until($event, $payload = []);\n\n /**\n * Dispatch an event and call the listeners.\n *\n * @param string|object $event\n ", "middle": "er with the dispatcher.\n *\n * @param object|string $subscriber\n * @return void\n */\n public function subscribe($subscriber);\n\n /**\n * Dispatch an event until the first non-null response is returned.\n ", "meta": {"filepath": "src/Illuminate/Contracts/Events/Dispatcher.php", "language": "php", "file_size": 1824, "cut_index": 537, "middle_length": 229}} {"prefix": "rt\\Traits\\Macroable;\nuse ReflectionClass;\nuse Symfony\\Component\\Console\\Command\\Command as SymfonyCommand;\nuse Symfony\\Component\\Console\\Input\\InputInterface;\nuse Symfony\\Component\\Console\\Input\\InputOption;\nuse Symfony\\Component\\Console\\Output\\OutputInterface;\nuse Throwable;\n\nclass Command extends SymfonyCommand\n{\n use Concerns\\CallsCommands,\n Concerns\\ConfiguresPrompts,\n Concerns\\HasParameters,\n Concerns\\InteractsWithIO,\n Concerns\\InteractsWithSignals,\n Concerns\\Promp", "suffix": " console command.\n *\n * @var string\n */\n protected $signature;\n\n /**\n * The console command name.\n *\n * @var string\n */\n protected $name;\n\n /**\n * The console command description.\n *\n * @var string\n *", "middle": "tsForMissingInput,\n Macroable;\n\n /**\n * The Laravel application instance.\n *\n * @var \\Illuminate\\Contracts\\Foundation\\Application\n */\n protected $laravel;\n\n /**\n * The name and signature of the", "meta": {"filepath": "src/Illuminate/Console/Command.php", "language": "php", "file_size": 10729, "cut_index": 921, "middle_length": 229}} {"prefix": "/**\n * @template TKey of array-key\n *\n * @template-covariant TValue\n *\n * @method $this through(callable(TValue): mixed $callback)\n */\ninterface Paginator\n{\n /**\n * Get the URL for a given page.\n *\n * @param int $page\n * @return string\n */\n public function url($page);\n\n /**\n * Add a set of query string values to the paginator.\n *\n * @param array|string|null $key\n * @param string|null $value\n * @return $this\n */\n public function appends($key, $val", "suffix": "Add all current query string values to the paginator.\n *\n * @return $this\n */\n public function withQueryString();\n\n /**\n * The URL for the next page, or null.\n *\n * @return string|null\n */\n public function nextPageUrl()", "middle": "ue = null);\n\n /**\n * Get / set the URL fragment to be appended to URLs.\n *\n * @param string|null $fragment\n * @return $this|string|null\n */\n public function fragment($fragment = null);\n\n /**\n * ", "meta": {"filepath": "src/Illuminate/Contracts/Pagination/Paginator.php", "language": "php", "file_size": 2756, "cut_index": 563, "middle_length": 229}} {"prefix": "uminate\\Support\\Reflector;\nuse InvalidArgumentException;\nuse LogicException;\nuse RuntimeException;\nuse Throwable;\n\nclass CallbackEvent extends Event\n{\n /**\n * The callback to call.\n *\n * @var string\n */\n protected $callback;\n\n /**\n * The parameters to pass to the method.\n *\n * @var array\n */\n protected $parameters;\n\n /**\n * The result of the callback's execution.\n *\n * @var mixed\n */\n protected $result;\n\n /**\n * The exception that was ", "suffix": " * @param string|callable $callback\n * @param array $parameters\n * @param \\DateTimeZone|string|null $timezone\n *\n * @throws \\InvalidArgumentException\n */\n public function __construct(EventMutex $mutex, $callback, array $para", "middle": "thrown when calling the callback, if any.\n *\n * @var \\Throwable|null\n */\n protected $exception;\n\n /**\n * Create a new event instance.\n *\n * @param \\Illuminate\\Console\\Scheduling\\EventMutex $mutex\n ", "meta": {"filepath": "src/Illuminate/Console/Scheduling/CallbackEvent.php", "language": "php", "file_size": 4925, "cut_index": 614, "middle_length": 229}} {"prefix": "e\\Filesystem\\Filesystem;\n\nuse function Illuminate\\Filesystem\\join_paths;\n\nabstract class MigrationGeneratorCommand extends Command\n{\n /**\n * The filesystem instance.\n *\n * @var \\Illuminate\\Filesystem\\Filesystem\n */\n protected $files;\n\n /**\n * Create a new migration generator command instance.\n *\n * @param \\Illuminate\\Filesystem\\Filesystem $files\n */\n public function __construct(Filesystem $files)\n {\n parent::__construct();\n\n $this->files = $file", "suffix": "ng\n */\n abstract protected function migrationStubFile();\n\n /**\n * Execute the console command.\n *\n * @return int\n */\n public function handle()\n {\n $table = $this->migrationTableName();\n\n if ($this->migrationExi", "middle": "s;\n }\n\n /**\n * Get the migration table name.\n *\n * @return string\n */\n abstract protected function migrationTableName();\n\n /**\n * Get the path to the migration stub file.\n *\n * @return stri", "meta": {"filepath": "src/Illuminate/Console/MigrationGeneratorCommand.php", "language": "php", "file_size": 2488, "cut_index": 563, "middle_length": 229}} {"prefix": "t\\InputArgument;\nuse Symfony\\Component\\Console\\Input\\InputOption;\n\nclass Parser\n{\n /**\n * Parse the given console command definition into an array.\n *\n * @param string $expression\n * @return array{string, array{}, array{}}|array{string, \\Symfony\\Component\\Console\\Input\\InputArgument[], \\Symfony\\Component\\Console\\Input\\InputOption[]}\n *\n * @throws \\InvalidArgumentException\n */\n public static function parse(string $expression)\n {\n $name = static::name($expression)", "suffix": "*\n * Extract the name of the command from the expression.\n *\n * @param string $expression\n * @return string\n *\n * @throws \\InvalidArgumentException\n */\n protected static function name(string $expression)\n {\n if (!", "middle": ";\n\n if (preg_match_all('/\\{\\s*(.*?)\\s*\\}/', $expression, $matches) && count($matches[1])) {\n return array_merge([$name], static::parameters($matches[1]));\n }\n\n return [$name, [], []];\n }\n\n /*", "meta": {"filepath": "src/Illuminate/Console/Parser.php", "language": "php", "file_size": 4740, "cut_index": 614, "middle_length": 229}} {"prefix": " * Indicates if the command should be prohibited from running.\n *\n * @var bool\n */\n protected static $prohibitedFromRunning = false;\n\n /**\n * Indicate whether the command should be prohibited from running.\n *\n * @param bool $prohibit\n * @return void\n */\n public static function prohibit($prohibit = true)\n {\n static::$prohibitedFromRunning = $prohibit;\n }\n\n /**\n * Determine if the command is prohibited from running and display a warning if so.\n ", "suffix": "\n */\n protected function isProhibited(bool $quiet = false)\n {\n if (! static::$prohibitedFromRunning) {\n return false;\n }\n\n if (! $quiet) {\n $this->components->warn('This command is prohibited from runnin", "middle": " *\n * @param bool $quiet\n * @return bool", "meta": {"filepath": "src/Illuminate/Console/Prohibitable.php", "language": "php", "file_size": 956, "cut_index": 582, "middle_length": 52}} {"prefix": "t\\Console\\Input\\ArrayInput;\nuse Symfony\\Component\\Console\\Output\\NullOutput;\nuse Symfony\\Component\\Console\\Output\\OutputInterface;\n\ntrait CallsCommands\n{\n /**\n * Resolve the console command instance for the given command.\n *\n * @param \\Symfony\\Component\\Console\\Command\\Command|string $command\n * @return \\Symfony\\Component\\Console\\Command\\Command\n */\n abstract protected function resolveCommand($command);\n\n /**\n * Call another console command.\n *\n * @param \\Symfony\\", "suffix": " $this->output);\n }\n\n /**\n * Call another console command without output.\n *\n * @param \\Symfony\\Component\\Console\\Command\\Command|string $command\n * @param array $arguments\n * @return int\n */\n public function callSilent", "middle": "Component\\Console\\Command\\Command|string $command\n * @param array $arguments\n * @return int\n */\n public function call($command, array $arguments = [])\n {\n return $this->runCommand($command, $arguments,", "meta": {"filepath": "src/Illuminate/Console/Concerns/CallsCommands.php", "language": "php", "file_size": 3223, "cut_index": 614, "middle_length": 229}} {"prefix": "pace Illuminate\\Console\\Concerns;\n\nuse Illuminate\\Support\\Stringable;\nuse Symfony\\Component\\Console\\Input\\InputOption;\n\ntrait CreatesMatchingTest\n{\n /**\n * Add the standard command options for generating matching tests.\n *\n * @return void\n */\n protected function addTestOptions()\n {\n foreach (['test' => 'Test', 'pest' => 'Pest', 'phpunit' => 'PHPUnit'] as $option => $name) {\n $this->getDefinition()->addOption(new InputOption(\n $option,\n ", "suffix": " * @param string $path\n * @return bool\n */\n protected function handleTestCreation($path)\n {\n if (! $this->option('test') && ! $this->option('pest') && ! $this->option('phpunit')) {\n return false;\n }\n\n return ", "middle": " null,\n InputOption::VALUE_NONE,\n \"Generate an accompanying {$name} test for the {$this->type}\"\n ));\n }\n }\n\n /**\n * Create the matching test case if requested.\n *\n ", "meta": {"filepath": "src/Illuminate/Console/Concerns/CreatesMatchingTest.php", "language": "php", "file_size": 1373, "cut_index": 524, "middle_length": 229}} {"prefix": "\\Question\\ChoiceQuestion;\nuse Symfony\\Component\\Console\\Question\\Question;\n\ntrait InteractsWithIO\n{\n /**\n * The console components factory.\n *\n * @var \\Illuminate\\Console\\View\\Components\\Factory\n */\n protected $components;\n\n /**\n * The input interface implementation.\n *\n * @var \\Symfony\\Component\\Console\\Input\\InputInterface\n */\n protected $input;\n\n /**\n * The output interface implementation.\n *\n * @var \\Illuminate\\Console\\OutputStyle\n */\n pr", "suffix": " /**\n * The mapping between human-readable verbosity levels and Symfony's OutputInterface.\n *\n * @var array\n */\n protected $verbosityMap = [\n 'v' => OutputI", "middle": "otected $output;\n\n /**\n * The default verbosity of output commands.\n *\n * @var \\Symfony\\Component\\Console\\Output\\OutputInterface::VERBOSITY_*\n */\n protected $verbosity = OutputInterface::VERBOSITY_NORMAL;\n\n ", "meta": {"filepath": "src/Illuminate/Console/Concerns/InteractsWithIO.php", "language": "php", "file_size": 12934, "cut_index": 921, "middle_length": 229}} {"prefix": "rMissingInput as PromptsForMissingInputContract;\nuse Illuminate\\Support\\Arr;\nuse Illuminate\\Support\\Collection;\nuse Symfony\\Component\\Console\\Input\\InputArgument;\nuse Symfony\\Component\\Console\\Input\\InputInterface;\nuse Symfony\\Component\\Console\\Output\\OutputInterface;\n\nuse function Laravel\\Prompts\\text;\n\ntrait PromptsForMissingInput\n{\n /**\n * Interact with the user before validating the input.\n *\n * @param \\Symfony\\Component\\Console\\Input\\InputInterface $input\n * @param \\Symfony\\Compon", "suffix": "tanceof PromptsForMissingInputContract) {\n $this->promptForMissingArguments($input, $output);\n }\n }\n\n /**\n * Prompt the user for any missing arguments.\n *\n * @param \\Symfony\\Component\\Console\\Input\\InputInterface $inpu", "middle": "ent\\Console\\Output\\OutputInterface $output\n * @return void\n */\n protected function interact(InputInterface $input, OutputInterface $output): void\n {\n parent::interact($input, $output);\n\n if ($this ins", "meta": {"filepath": "src/Illuminate/Console/Concerns/PromptsForMissingInput.php", "language": "php", "file_size": 3989, "cut_index": 614, "middle_length": 229}} {"prefix": "e DateTimeInterface;\nuse Illuminate\\Cache\\DynamoDbStore;\nuse Illuminate\\Contracts\\Cache\\Factory as Cache;\nuse Illuminate\\Contracts\\Cache\\LockProvider;\n\nclass CacheSchedulingMutex implements SchedulingMutex, CacheAware\n{\n /**\n * The cache factory implementation.\n *\n * @var \\Illuminate\\Contracts\\Cache\\Factory\n */\n public $cache;\n\n /**\n * The cache store that should be used.\n *\n * @var string|null\n */\n public $store;\n\n /**\n * Create a new scheduling strategy.\n", "suffix": " event.\n *\n * @param \\Illuminate\\Console\\Scheduling\\Event $event\n * @param \\DateTimeInterface $time\n * @return bool\n */\n public function create(Event $event, DateTimeInterface $time)\n {\n $mutexName = $event->mutexName()", "middle": " *\n * @param \\Illuminate\\Contracts\\Cache\\Factory $cache\n */\n public function __construct(Cache $cache)\n {\n $this->cache = $cache;\n }\n\n /**\n * Attempt to obtain a scheduling mutex for the given", "meta": {"filepath": "src/Illuminate/Console/Scheduling/CacheSchedulingMutex.php", "language": "php", "file_size": 2622, "cut_index": 563, "middle_length": 229}} {"prefix": "nent\\Console\\Input\\InputInterface;\nuse Symfony\\Component\\Console\\Output\\OutputInterface;\nuse Symfony\\Component\\Console\\Question\\Question;\nuse Symfony\\Component\\Console\\Style\\SymfonyStyle;\n\nclass OutputStyle extends SymfonyStyle implements NewLineAware\n{\n /**\n * The output instance.\n *\n * @var \\Symfony\\Component\\Console\\Output\\OutputInterface\n */\n private $output;\n\n /**\n * The number of trailing new lines written by the last output.\n *\n * This is initialized as 1 to accou", "suffix": " * @deprecated use $newLinesWritten\n */\n protected $newLineWritten = false;\n\n /**\n * Create a new Console OutputStyle instance.\n *\n * @param \\Symfony\\Component\\Console\\Input\\InputInterface $input\n * @param \\Symfony\\Component\\", "middle": "nt for the new line written by the shell after executing a command.\n *\n * @var int\n */\n protected $newLinesWritten = 1;\n\n /**\n * If the last output written wrote a new line.\n *\n * @var bool\n *\n ", "meta": {"filepath": "src/Illuminate/Console/OutputStyle.php", "language": "php", "file_size": 4612, "cut_index": 614, "middle_length": 229}} {"prefix": "egistry instance.\n *\n * @var \\Symfony\\Component\\Console\\SignalRegistry\\SignalRegistry\n */\n protected $registry;\n\n /**\n * The signal registry's previous list of handlers.\n *\n * @var array>|null\n */\n protected $previousHandlers;\n\n /**\n * The current availability resolver, if any.\n *\n * @var (callable(): bool)|null\n */\n protected static $availabilityResolver;\n\n /**\n * Create a new signal registrar instance.\n ", "suffix": "andlers();\n }\n\n /**\n * Register a new signal handler.\n *\n * @param int $signal\n * @param callable(int $signal): void $callback\n * @return void\n */\n public function register($signal, $callback)\n {\n $this->previ", "middle": " *\n * @param \\Symfony\\Component\\Console\\SignalRegistry\\SignalRegistry $registry\n */\n public function __construct($registry)\n {\n $this->registry = $registry;\n\n $this->previousHandlers = $this->getH", "meta": {"filepath": "src/Illuminate/Console/Signals.php", "language": "php", "file_size": 3519, "cut_index": 614, "middle_length": 229}} {"prefix": "Symfony\\Component\\Console\\Completion\\CompletionInput;\nuse Symfony\\Component\\Console\\Completion\\CompletionSuggestions;\nuse Symfony\\Component\\Console\\Completion\\Suggestion;\nuse Symfony\\Component\\Console\\Input\\InputArgument;\nuse Symfony\\Component\\Console\\Input\\InputOption;\n\ntrait HasParameters\n{\n /**\n * Specify the arguments and options on the command.\n *\n * @return void\n */\n protected function specifyParameters()\n {\n // We will loop through all of the arguments and options for ", "suffix": "s) {\n if ($arguments instanceof InputArgument) {\n $this->getDefinition()->addArgument($arguments);\n } else {\n $this->addArgument(...$arguments);\n }\n }\n\n foreach ($this->getOptions", "middle": "the command and\n // set them all on the base command instance. This specifies what can get\n // passed into these commands as \"parameters\" to control the execution.\n foreach ($this->getArguments() as $argument", "meta": {"filepath": "src/Illuminate/Console/Concerns/HasParameters.php", "language": "php", "file_size": 2207, "cut_index": 563, "middle_length": 229}} {"prefix": "e Illuminate\\Cache\\DynamoDbStore;\nuse Illuminate\\Contracts\\Cache\\Factory as Cache;\nuse Illuminate\\Contracts\\Cache\\LockProvider;\n\nclass CacheEventMutex implements EventMutex, CacheAware\n{\n /**\n * The cache repository implementation.\n *\n * @var \\Illuminate\\Contracts\\Cache\\Factory\n */\n public $cache;\n\n /**\n * The cache store that should be used.\n *\n * @var string|null\n */\n public $store;\n\n /**\n * Create a new overlapping strategy.\n *\n * @param \\Illumi", "suffix": "luminate\\Console\\Scheduling\\Event $event\n * @return bool\n */\n public function create(Event $event)\n {\n if ($this->shouldUseLocks($this->cache->store($this->store)->getStore())) {\n return $this->cache->store($this->store)->g", "middle": "nate\\Contracts\\Cache\\Factory $cache\n */\n public function __construct(Cache $cache)\n {\n $this->cache = $cache;\n }\n\n /**\n * Attempt to obtain an event mutex for the given event.\n *\n * @param \\Il", "meta": {"filepath": "src/Illuminate/Console/Scheduling/CacheEventMutex.php", "language": "php", "file_size": 2972, "cut_index": 563, "middle_length": 229}} {"prefix": "ensureEndsWithPunctuation($text);\n\n $text = \" $text\";\n\n $default = $question->getDefault();\n\n if ($question->isMultiline()) {\n $text .= sprintf(' (press %s to continue)', 'Windows' == ", "middle": "return void\n */\n #[\\Override]\n protected function writePrompt(OutputInterface $output, Question $question): void\n {\n $text = OutputFormatter::escapeTrailingBackslash($question->getQuestion());\n\n $text =", "meta": {"filepath": "src/Illuminate/Console/QuestionHelper.php", "language": "php", "file_size": 2634, "cut_index": 563, "middle_length": 229}} {"prefix": "\nuse Laravel\\Prompts\\TextareaPrompt;\nuse Laravel\\Prompts\\TextPrompt;\nuse stdClass;\nuse Symfony\\Component\\Console\\Input\\InputInterface;\n\ntrait ConfiguresPrompts\n{\n /**\n * Configure the prompt fallbacks.\n *\n * @param \\Symfony\\Component\\Console\\Input\\InputInterface $input\n * @return void\n */\n protected function configurePrompts(InputInterface $input)\n {\n Prompt::setOutput($this->output);\n\n Prompt::interactive(($input->isInteractive() && defined('STDIN') && stream_is", "suffix": ">runningUnitTests());\n\n TextPrompt::fallbackUsing(fn (TextPrompt $prompt) => $this->promptUntilValid(\n fn () => $this->components->ask($prompt->label, $prompt->default ?: null) ?? '',\n $prompt->required,\n $prompt->va", "middle": "atty(STDIN)) || $this->laravel->runningUnitTests());\n\n Prompt::validateUsing(fn (Prompt $prompt) => $this->validatePrompt($prompt->value(), $prompt->validate));\n\n Prompt::fallbackWhen(windows_os() || $this->laravel-", "meta": {"filepath": "src/Illuminate/Console/Concerns/ConfiguresPrompts.php", "language": "php", "file_size": 9385, "cut_index": 921, "middle_length": 229}} {"prefix": "e Illuminate\\Console\\Application;\nuse Illuminate\\Support\\ProcessUtils;\n\nclass CommandBuilder\n{\n /**\n * Build the command for the given event.\n *\n * @param \\Illuminate\\Console\\Scheduling\\Event $event\n * @return string\n */\n public function buildCommand(Event $event)\n {\n if ($event->runInBackground) {\n return $this->buildBackgroundCommand($event);\n }\n\n return $this->buildForegroundCommand($event);\n }\n\n /**\n * Build the command for running", "suffix": "peArgument($event->output);\n\n return laravel_cloud()\n ? $this->ensureCorrectUser($event, $event->command.' 2>&1 | tee '.($event->shouldAppendOutput ? '-a ' : '').$output)\n : $this->ensureCorrectUser($event, $event->command.($ev", "middle": " the event in the foreground.\n *\n * @param \\Illuminate\\Console\\Scheduling\\Event $event\n * @return string\n */\n protected function buildForegroundCommand(Event $event)\n {\n $output = ProcessUtils::esca", "meta": {"filepath": "src/Illuminate/Console/Scheduling/CommandBuilder.php", "language": "php", "file_size": 2374, "cut_index": 563, "middle_length": 229}} {"prefix": "pace Illuminate\\Console\\Concerns;\n\nuse Illuminate\\Console\\Signals;\nuse Illuminate\\Support\\Collection;\n\ntrait InteractsWithSignals\n{\n /**\n * The signal registrar instance.\n *\n * @var \\Illuminate\\Console\\Signals|null\n */\n protected $signals;\n\n /**\n * Define a callback to be run when the given signal(s) occurs.\n *\n * @template TSignals of iterable|int\n *\n * @param (\\Closure():(TSignals))|TSignals $signals\n * @param callable(int $signal): void ", "suffix": "getApplication()->getSignalRegistry(),\n );\n\n Collection::wrap(value($signals))\n ->each(fn ($signal) => $this->signals->register($signal, $callback));\n });\n }\n\n /**\n * Untrap signal handlers set within t", "middle": " $callback\n * @return void\n */\n public function trap($signals, $callback)\n {\n Signals::whenAvailable(function () use ($signals, $callback) {\n $this->signals ??= new Signals(\n $this->", "meta": {"filepath": "src/Illuminate/Console/Concerns/InteractsWithSignals.php", "language": "php", "file_size": 1262, "cut_index": 524, "middle_length": 229}} {"prefix": "timeException;\n\nclass Env\n{\n /**\n * Indicates if the putenv adapter is enabled.\n *\n * @var bool\n */\n protected static $putenv = true;\n\n /**\n * The environment repository instance.\n *\n * @var \\Dotenv\\Repository\\RepositoryInterface|null\n */\n protected static $repository;\n\n /**\n * The list of custom adapters for loading environment variables.\n *\n * @var array\n */\n protected static $customAdapters = [];\n\n /**\n * Enable the putenv ", "suffix": "rn void\n */\n public static function disablePutenv()\n {\n static::$putenv = false;\n static::$repository = null;\n }\n\n /**\n * Register a custom adapter creator Closure.\n */\n public static function extend(Closure $callba", "middle": "adapter.\n *\n * @return void\n */\n public static function enablePutenv()\n {\n static::$putenv = true;\n static::$repository = null;\n }\n\n /**\n * Disable the putenv adapter.\n *\n * @retu", "meta": {"filepath": "src/Illuminate/Support/Env.php", "language": "php", "file_size": 8543, "cut_index": 716, "middle_length": 229}} {"prefix": ";\n\nuse Illuminate\\Console\\OutputStyle;\nuse Illuminate\\Console\\QuestionHelper;\nuse ReflectionClass;\nuse Symfony\\Component\\Console\\Helper\\SymfonyQuestionHelper;\n\nuse function Termwind\\render;\nuse function Termwind\\renderUsing;\n\nabstract class Component\n{\n /**\n * The output style implementation.\n *\n * @var \\Illuminate\\Console\\OutputStyle\n */\n protected $output;\n\n /**\n * The list of mutators to apply on the view data.\n *\n * @var array\n */\n ", "suffix": "}\n\n /**\n * Renders the given view.\n *\n * @param string $view\n * @param \\Illuminate\\Contracts\\Support\\Arrayable|array $data\n * @param int $verbosity\n * @return void\n */\n protected function renderView($view, $data, $ve", "middle": " protected $mutators;\n\n /**\n * Creates a new component instance.\n *\n * @param \\Illuminate\\Console\\OutputStyle $output\n */\n public function __construct($output)\n {\n $this->output = $output;\n ", "meta": {"filepath": "src/Illuminate/Console/View/Components/Component.php", "language": "php", "file_size": 2957, "cut_index": 563, "middle_length": 229}} {"prefix": "te\\Console\\View\\Components;\n\nuse Illuminate\\Console\\Contracts\\NewLineAware;\nuse Symfony\\Component\\Console\\Output\\OutputInterface;\n\nclass Line extends Component\n{\n /**\n * The possible line styles.\n *\n * @var array>\n */\n protected static $styles = [\n 'info' => [\n 'bgColor' => 'blue',\n 'fgColor' => 'white',\n 'title' => 'info',\n ],\n 'success' => [\n 'bgColor' => 'green',\n 'fgColor' => '", "suffix": " 'red',\n 'fgColor' => 'white',\n 'title' => 'error',\n ],\n ];\n\n /**\n * Renders the component using the given arguments.\n *\n * @param string $style\n * @param string $string\n * @param int $verbosity\n", "middle": "white',\n 'title' => 'success',\n ],\n 'warn' => [\n 'bgColor' => 'yellow',\n 'fgColor' => 'black',\n 'title' => 'warn',\n ],\n 'error' => [\n 'bgColor' =>", "meta": {"filepath": "src/Illuminate/Console/View/Components/Line.php", "language": "php", "file_size": 1620, "cut_index": 537, "middle_length": 229}} {"prefix": ";\n\nuse Illuminate\\Console\\View\\TaskResult;\nuse Illuminate\\Support\\InteractsWithTime;\nuse Symfony\\Component\\Console\\Output\\OutputInterface;\nuse Throwable;\n\nuse function Termwind\\terminal;\n\nclass Task extends Component\n{\n use InteractsWithTime;\n\n /**\n * Renders the component using the given arguments.\n *\n * @param string $description\n * @param (callable(): bool)|null $task\n * @param int $verbosity\n * @return void\n *\n * @throws \\Throwable\n */\n public function ", "suffix": "ureNoPunctuation::class,\n Mutators\\EnsureRelativePaths::class,\n ]);\n\n $descriptionWidth = mb_strlen(preg_replace(\"/\\<[\\w=#\\/\\;,:.&,%?]+\\>|\\\\e\\[\\d+m/\", '$1', $description) ?? '');\n\n $this->output->write(\" $description \", fal", "middle": "render($description, $task = null, $verbosity = OutputInterface::VERBOSITY_NORMAL)\n {\n $description = $this->mutate($description, [\n Mutators\\EnsureDynamicContentIsHighlighted::class,\n Mutators\\Ens", "meta": {"filepath": "src/Illuminate/Console/View/Components/Task.php", "language": "php", "file_size": 2158, "cut_index": 563, "middle_length": 229}} {"prefix": "rderWhenProxy\n{\n /**\n * The target being conditionally operated on.\n *\n * @var mixed\n */\n protected $target;\n\n /**\n * The condition for proxying.\n *\n * @var bool\n */\n protected $condition;\n\n /**\n * Indicates whether the proxy has a condition.\n *\n * @var bool\n */\n protected $hasCondition = false;\n\n /**\n * Determine whether the condition should be negated.\n *\n * @var bool\n */\n protected $negateConditionOnCapture;\n\n /**\n", "suffix": "@param bool $condition\n * @return $this\n */\n public function condition($condition)\n {\n [$this->condition, $this->hasCondition] = [$condition, true];\n\n return $this;\n }\n\n /**\n * Indicate that the condition should be n", "middle": " * Create a new proxy instance.\n *\n * @param mixed $target\n */\n public function __construct($target)\n {\n $this->target = $target;\n }\n\n /**\n * Set the condition on the proxy.\n *\n * ", "meta": {"filepath": "src/Illuminate/Conditionable/HigherOrderWhenProxy.php", "language": "php", "file_size": 2229, "cut_index": 563, "middle_length": 229}} {"prefix": "sFrequencies, ReflectsClosures, Tappable;\n\n /**\n * The command string.\n *\n * @var string|null\n */\n public $command;\n\n /**\n * The location that output should be sent to.\n *\n * @var string\n */\n public $output = '/dev/null';\n\n /**\n * Indicates whether output should be appended.\n *\n * @var bool\n */\n public $shouldAppendOutput = false;\n\n /**\n * The array of callbacks to be run before the event is started.\n *\n * @var array\n */\n ", "suffix": "\n *\n * @var \\Illuminate\\Console\\Scheduling\\EventMutex\n */\n public $mutex;\n\n /**\n * The mutex name resolver callback.\n *\n * @var \\Closure|null\n */\n public $mutexNameResolver;\n\n /**\n * The last time the event was c", "middle": " protected $beforeCallbacks = [];\n\n /**\n * The array of callbacks to be run after the event is finished.\n *\n * @var array\n */\n protected $afterCallbacks = [];\n\n /**\n * The event mutex implementation.", "meta": {"filepath": "src/Illuminate/Console/Scheduling/Event.php", "language": "php", "file_size": 24372, "cut_index": 1331, "middle_length": 229}} {"prefix": "\n\n return $this;\n }\n\n /**\n * Schedule the event to run between start and end time.\n *\n * @param string $startTime\n * @param string $endTime\n * @return $this\n */\n public function between($startTime, $endTime)\n {\n return $this->when($this->inTimeInterval($startTime, $endTime));\n }\n\n /**\n * Schedule the event to not run between start and end time.\n *\n * @param string $startTime\n * @param string $endTime\n * @return $this\n */", "suffix": "ram string $startTime\n * @param string $endTime\n * @return \\Closure\n */\n private function inTimeInterval($startTime, $endTime)\n {\n [$now, $startTime, $endTime] = [\n Carbon::now($this->timezone),\n Carbon::p", "middle": "\n public function unlessBetween($startTime, $endTime)\n {\n return $this->skip($this->inTimeInterval($startTime, $endTime));\n }\n\n /**\n * Schedule the event to run between start and end time.\n *\n * @pa", "meta": {"filepath": "src/Illuminate/Console/Scheduling/ManagesFrequencies.php", "language": "php", "file_size": 15467, "cut_index": 921, "middle_length": 229}} {"prefix": "BeUnique;\nuse Illuminate\\Contracts\\Queue\\ShouldQueue;\nuse Illuminate\\Queue\\CallQueuedClosure;\nuse Illuminate\\Support\\Collection;\nuse Illuminate\\Support\\ProcessUtils;\nuse Illuminate\\Support\\Traits\\Macroable;\nuse RuntimeException;\nuse Symfony\\Component\\Console\\Command\\Command as SymfonyCommand;\n\nuse function Illuminate\\Support\\enum_value;\n\n/**\n * @mixin \\Illuminate\\Console\\Scheduling\\PendingEventAttributes\n */\nclass Schedule\n{\n use Macroable {\n __call as macroCall;\n }\n\n const SUNDAY = 0;\n\n ", "suffix": "e\\Scheduling\\Event[]\n */\n protected $events = [];\n\n /**\n * The event mutex implementation.\n *\n * @var \\Illuminate\\Console\\Scheduling\\EventMutex\n */\n protected $eventMutex;\n\n /**\n * The scheduling mutex implementation.\n ", "middle": "const MONDAY = 1;\n\n const TUESDAY = 2;\n\n const WEDNESDAY = 3;\n\n const THURSDAY = 4;\n\n const FRIDAY = 5;\n\n const SATURDAY = 6;\n\n /**\n * All of the events on the schedule.\n *\n * @var \\Illuminate\\Consol", "meta": {"filepath": "src/Illuminate/Console/Scheduling/Schedule.php", "language": "php", "file_size": 15046, "cut_index": 921, "middle_length": 229}} {"prefix": "pace Illuminate\\Console\\Scheduling;\n\nuse Illuminate\\Console\\Command;\nuse Illuminate\\Contracts\\Cache\\Repository as Cache;\nuse Illuminate\\Support\\Facades\\Date;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\n\n#[AsCommand(name: 'schedule:interrupt')]\nclass ScheduleInterruptCommand extends Command\n{\n /**\n * The console command name.\n *\n * @var string\n */\n protected $name = 'schedule:interrupt';\n\n /**\n * The console command description.\n *\n * @var string\n */\n protec", "suffix": "e interrupt command.\n *\n * @param \\Illuminate\\Contracts\\Cache\\Repository $cache\n */\n public function __construct(Cache $cache)\n {\n parent::__construct();\n\n $this->cache = $cache;\n }\n\n /**\n * Execute the console c", "middle": "ted $description = 'Interrupt the current schedule run';\n\n /**\n * The cache store implementation.\n *\n * @var \\Illuminate\\Contracts\\Cache\\Repository\n */\n protected $cache;\n\n /**\n * Create a new schedul", "meta": {"filepath": "src/Illuminate/Console/Scheduling/ScheduleInterruptCommand.php", "language": "php", "file_size": 1266, "cut_index": 524, "middle_length": 229}} {"prefix": "\nnamespace Illuminate\\Console\\Scheduling;\n\nuse Illuminate\\Console\\Command;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\n\n#[AsCommand(name: 'schedule:clear-cache')]\nclass ScheduleClearCacheCommand extends Command\n{\n /**\n * The console command name.\n *\n * @var string\n */\n protected $name = 'schedule:clear-cache';\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected $description = 'Delete the cached mutex files created by scheduler';\n\n ", "suffix": " foreach ($schedule->events() as $event) {\n if ($event->mutex->exists($event)) {\n $this->components->info(sprintf('Deleting mutex for [%s]', $event->command));\n\n $event->mutex->forget($event);\n\n $", "middle": "/**\n * Execute the console command.\n *\n * @param \\Illuminate\\Console\\Scheduling\\Schedule $schedule\n * @return void\n */\n public function handle(Schedule $schedule)\n {\n $mutexCleared = false;\n\n ", "meta": {"filepath": "src/Illuminate/Console/Scheduling/ScheduleClearCacheCommand.php", "language": "php", "file_size": 1165, "cut_index": 518, "middle_length": 229}} {"prefix": "Illuminate\\Console\\Scheduling;\n\nuse Illuminate\\Console\\Command;\nuse Illuminate\\Console\\Events\\SchedulePaused;\nuse Illuminate\\Contracts\\Cache\\Repository as Cache;\nuse Illuminate\\Contracts\\Events\\Dispatcher;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\n\n#[AsCommand(name: 'schedule:pause')]\nclass SchedulePauseCommand extends Command\n{\n /**\n * The console command description.\n *\n * @var string\n */\n protected $description = 'Pause the scheduler';\n\n /**\n * Execute the console co", "suffix": "function handle(Cache $cache, Dispatcher $dispatcher)\n {\n $cache->forever('illuminate:schedule:paused', true);\n\n $dispatcher->dispatch(new SchedulePaused);\n\n $this->components->info('Scheduled task processing has been paused.');\n\n ", "middle": "mmand.\n *\n * @return int\n */\n public ", "meta": {"filepath": "src/Illuminate/Console/Scheduling/SchedulePauseCommand.php", "language": "php", "file_size": 861, "cut_index": 529, "middle_length": 52}} {"prefix": "e\\Events\\ScheduledTaskFinished;\nuse Illuminate\\Console\\Events\\ScheduledTaskSkipped;\nuse Illuminate\\Console\\Events\\ScheduledTaskStarting;\nuse Illuminate\\Contracts\\Cache\\Repository as Cache;\nuse Illuminate\\Contracts\\Debug\\ExceptionHandler;\nuse Illuminate\\Contracts\\Events\\Dispatcher;\nuse Illuminate\\Support\\Carbon;\nuse Illuminate\\Support\\Facades\\Date;\nuse Illuminate\\Support\\Sleep;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\nuse Throwable;\n\n#[AsCommand(name: 'schedule:run')]\nclass ScheduleRunCommand exten", "suffix": "\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected $description = 'Run the scheduled commands';\n\n /**\n * The schedule instance.\n *\n * @var \\Illuminate\\Console\\Scheduling\\Schedule\n */\n pro", "middle": "ds Command\n{\n /**\n * The name and signature of the console command.\n *\n * @var string\n */\n protected $signature = 'schedule:run {--whisper : Do not output message indicating that no jobs were ready to run}';", "meta": {"filepath": "src/Illuminate/Console/Scheduling/ScheduleRunCommand.php", "language": "php", "file_size": 8826, "cut_index": 716, "middle_length": 229}} {"prefix": "e Illuminate\\Console\\Application;\nuse Illuminate\\Console\\Command;\nuse Illuminate\\Support\\Carbon;\nuse Illuminate\\Support\\ProcessUtils;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\nuse Symfony\\Component\\Console\\Output\\OutputInterface;\nuse Symfony\\Component\\Process\\Process;\n\n#[AsCommand(name: 'schedule:work')]\nclass ScheduleWorkCommand extends Command\n{\n /**\n * The name and signature of the console command.\n *\n * @var string\n */\n protected $signature = 'schedule:work\n {--run-", "suffix": "ring\n */\n protected $description = 'Start the schedule worker';\n\n /**\n * Execute the console command.\n *\n * @return never\n */\n public function handle()\n {\n $this->components->info(\n 'Running scheduled tasks", "middle": "output-file= : The file to direct schedule:run output to}\n {--whisper : Do not output message indicating that no jobs were ready to run}';\n\n /**\n * The console command description.\n *\n * @var st", "meta": {"filepath": "src/Illuminate/Console/Scheduling/ScheduleWorkCommand.php", "language": "php", "file_size": 2403, "cut_index": 563, "middle_length": 229}} {"prefix": ";\n\nuse InvalidArgumentException;\n\n/**\n * @method void alert(string $string, int $verbosity = \\Symfony\\Component\\Console\\Output\\OutputInterface::VERBOSITY_NORMAL)\n * @method mixed ask(string $question, string $default = null, bool $multiline = false)\n * @method mixed askWithCompletion(string $question, array|callable $choices, string $default = null)\n * @method void bulletList(array $elements, int $verbosity = \\Symfony\\Component\\Console\\Output\\OutputInterface::VERBOSITY_NORMAL)\n * @method mixed choice(string", "suffix": "Console\\Output\\OutputInterface::VERBOSITY_NORMAL)\n * @method void success(string $string, int $verbosity = \\Symfony\\Component\\Console\\Output\\OutputInterface::VERBOSITY_NORMAL)\n * @method void error(string $string, int $verbosity = \\Symfony\\Component\\Consol", "middle": " $question, array $choices, $default = null, int $attempts = null, bool $multiple = false)\n * @method bool confirm(string $question, bool $default = false)\n * @method void info(string $string, int $verbosity = \\Symfony\\Component\\", "meta": {"filepath": "src/Illuminate/Console/View/Components/Factory.php", "language": "php", "file_size": 2675, "cut_index": 563, "middle_length": 229}} {"prefix": "onent\\Console\\Output\\OutputInterface;\n\nclass TwoColumnDetail extends Component\n{\n /**\n * Renders the component using the given arguments.\n *\n * @param string $first\n * @param string|null $second\n * @param int $verbosity\n * @return void\n */\n public function render($first, $second = null, $verbosity = OutputInterface::VERBOSITY_NORMAL)\n {\n $first = $this->mutate($first, [\n Mutators\\EnsureDynamicContentIsHighlighted::class,\n Mutators\\Ensur", "suffix": "lativePaths::class,\n ]);\n\n $second = $this->mutate($second, [\n Mutators\\EnsureDynamicContentIsHighlighted::class,\n Mutators\\EnsureRelativePaths::class,\n ]);\n\n $this->renderView('two-column-detail', [\n ", "middle": "eNoPunctuation::class,\n Mutators\\EnsureRe", "meta": {"filepath": "src/Illuminate/Console/View/Components/TwoColumnDetail.php", "language": "php", "file_size": 980, "cut_index": 582, "middle_length": 52}} {"prefix": "ng\n */\n public $expression = '* * * * *';\n\n /**\n * How often to repeat the event during a minute.\n *\n * @var int|null\n */\n public $repeatSeconds = null;\n\n /**\n * The timezone the date should be evaluated on.\n *\n * @var \\DateTimeZone|string\n */\n public $timezone;\n\n /**\n * The user the command should run as.\n *\n * @var string|null\n */\n public $user;\n\n /**\n * The list of environments the command should run under.\n *\n * @var", "suffix": "mmand should run even when the scheduler is paused.\n *\n * @var bool\n */\n public $evenWhenPaused = false;\n\n /**\n * Indicates if the command should not overlap itself.\n *\n * @var bool\n */\n public $withoutOverlapping = fal", "middle": " array\n */\n public $environments = [];\n\n /**\n * Indicates if the command should run in maintenance mode.\n *\n * @var bool\n */\n public $evenInMaintenanceMode = false;\n\n /**\n * Indicates if the co", "meta": {"filepath": "src/Illuminate/Console/Scheduling/ManagesAttributes.php", "language": "php", "file_size": 5935, "cut_index": 716, "middle_length": 229}} {"prefix": "pace Illuminate\\Console\\Scheduling;\n\nuse Illuminate\\Console\\Command;\nuse Illuminate\\Console\\Events\\ScheduledBackgroundTaskFinished;\nuse Illuminate\\Contracts\\Events\\Dispatcher;\nuse Illuminate\\Support\\Collection;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\n\n#[AsCommand(name: 'schedule:finish')]\nclass ScheduleFinishCommand extends Command\n{\n /**\n * The console command name.\n *\n * @var string\n */\n protected $signature = 'schedule:finish {id} {code=0}';\n\n /**\n * The console co", "suffix": " * @var bool\n */\n protected $hidden = true;\n\n /**\n * Execute the console command.\n *\n * @param \\Illuminate\\Console\\Scheduling\\Schedule $schedule\n * @return void\n */\n public function handle(Schedule $schedule)\n {\n ", "middle": "mmand description.\n *\n * @var string\n */\n protected $description = 'Handle the completion of a scheduled command';\n\n /**\n * Indicates whether the command should be shown in the Artisan command list.\n *\n ", "meta": {"filepath": "src/Illuminate/Console/Scheduling/ScheduleFinishCommand.php", "language": "php", "file_size": 1383, "cut_index": 524, "middle_length": 229}} {"prefix": "forget('illuminate:schedule:paused');\n\n $dispatcher->dispatch(new ScheduleResumed);\n\n $this->components->info('Scheduled task processing has resumed.');\n", "middle": "he schedule';\n\n /**\n * The console command name aliases.\n *\n * @var list\n */\n protected $aliases = ['schedule:continue'];\n\n /**\n * Execute the console command.\n *\n * @return int\n *", "meta": {"filepath": "src/Illuminate/Console/Scheduling/ScheduleResumeCommand.php", "language": "php", "file_size": 1024, "cut_index": 512, "middle_length": 229}} {"prefix": "pace Illuminate\\Console\\View\\Components;\n\nuse Symfony\\Component\\Console\\Question\\ChoiceQuestion;\n\nclass Choice extends Component\n{\n /**\n * Renders the component using the given arguments.\n *\n * @param string $question\n * @param array $choices\n * @param mixed $default\n * @param int|null $attempts\n * @param bool $multiple\n * @return mixed\n */\n public function render($question, $choices, $default = null, $attempts = null, $multiple = false)", "suffix": " ->setMultiselect($multiple)\n ),\n );\n }\n\n /**\n * Get a ChoiceQuestion instance that handles array keys like Prompts.\n *\n * @param string $question\n * @param array $choices\n * @param mixed $default\n", "middle": "\n {\n return $this->usingQuestionHelper(\n fn () => $this->output->askQuestion(\n $this->getChoiceQuestion($question, $choices, $default)\n ->setMaxAttempts($attempts)\n ", "meta": {"filepath": "src/Illuminate/Console/View/Components/Choice.php", "language": "php", "file_size": 1404, "cut_index": 524, "middle_length": 229}} {"prefix": "t cron expression to the display timezone.\n *\n * Returns one or more expressions when values straddle a day boundary.\n *\n * @param \\Illuminate\\Console\\Scheduling\\Event $event\n * @param \\DateTimeZone $timezone\n * @return array\n */\n public static function forEvent(Event $event, DateTimeZone $timezone)\n {\n $eventTimezone = static::resolveEventTimezone($event, $timezone);\n\n [$totalOffsetMinutes, $hourOffset, $minuteOffset] = static::offsetComponents(\n ", "suffix": "atic::shiftAndGroup($segments[0], $minuteOffset, 60);\n\n $expressions = [];\n\n foreach ($minuteGroups as $minuteCarry => $minuteValues) {\n $hourGroups = static::shiftAndGroup($segments[1], $hourOffset + $minuteCarry, 24);\n\n ", "middle": " $eventTimezone, $timezone\n );\n\n if ($totalOffsetMinutes === 0) {\n return [$event->expression];\n }\n\n $segments = preg_split(\"/\\s+/\", $event->expression);\n $minuteGroups = st", "meta": {"filepath": "src/Illuminate/Console/Scheduling/CronExpressionTimezoneConverter.php", "language": "php", "file_size": 5141, "cut_index": 716, "middle_length": 229}} {"prefix": "\n */\nclass PendingEventAttributes\n{\n use ManagesAttributes, ManagesFrequencies;\n\n /**\n * Event lifecycle and output methods that should be deferred and replayed on each event in the group.\n *\n * @var array\n */\n public const DEFERRED_EVENT_METHODS = [\n 'before',\n 'after',\n 'then',\n 'thenWithOutput',\n 'onSuccess',\n 'onSuccessWithOutput',\n 'onFailure',\n 'onFailureWithOutput',\n 'pingBefore',\n 'pingBeforeI", "suffix": " 'emailWrittenOutputTo',\n 'emailOutputOnFailure',\n ];\n\n /**\n * The recorded macro and deferred method calls to replay on each event.\n *\n * @var array\n */\n protected array $macros = [];\n\n /**\n", "middle": "f',\n 'thenPing',\n 'thenPingIf',\n 'pingOnSuccess',\n 'pingOnSuccessIf',\n 'pingOnFailure',\n 'pingOnFailureIf',\n 'sendOutputTo',\n 'appendOutputTo',\n 'emailOutputTo',\n ", "meta": {"filepath": "src/Illuminate/Console/Scheduling/PendingEventAttributes.php", "language": "php", "file_size": 3760, "cut_index": 614, "middle_length": 229}} {"prefix": "nsole\\Command;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\n\nuse function Laravel\\Prompts\\select;\n\n#[AsCommand(name: 'schedule:test')]\nclass ScheduleTestCommand extends Command\n{\n /**\n * The console command name.\n *\n * @var string\n */\n protected $signature = 'schedule:test {--name= : The name of the scheduled command to run}';\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected $description = 'Run a scheduled command';\n\n /**\n * ", "suffix": "\n\n $commands = $schedule->events();\n\n $commandNames = [];\n\n foreach ($commands as $command) {\n $commandNames[] = $command->command ?? $command->getSummaryForDisplay();\n }\n\n if (empty($commandNames)) {\n ", "middle": "Execute the console command.\n *\n * @param \\Illuminate\\Console\\Scheduling\\Schedule $schedule\n * @return void\n */\n public function handle(Schedule $schedule)\n {\n $phpBinary = Application::phpBinary();", "meta": {"filepath": "src/Illuminate/Console/Scheduling/ScheduleTestCommand.php", "language": "php", "file_size": 3466, "cut_index": 614, "middle_length": 229}} {"prefix": " ScheduleListCommand extends Command\n{\n /**\n * The console command name.\n *\n * @var string\n */\n protected $signature = 'schedule:list\n {--timezone= : The timezone that times should be displayed in}\n {--environment=* : Display the tasks scheduled to run on this environment}\n {--next : Sort the listed tasks by their next due date}\n {--json : Output the scheduled tasks as JSON}\n ';\n\n /**\n * The console command description.\n *\n * @var string\n ", "suffix": "e console command.\n *\n * @param \\Illuminate\\Console\\Scheduling\\Schedule $schedule\n * @return void\n *\n * @throws \\Exception\n */\n public function handle(Schedule $schedule)\n {\n $environments = Arr::wrap($this->option('e", "middle": " */\n protected $description = 'List all scheduled tasks';\n\n /**\n * The terminal width resolver callback.\n *\n * @var \\Closure|null\n */\n protected static $terminalWidthResolver;\n\n /**\n * Execute th", "meta": {"filepath": "src/Illuminate/Console/Scheduling/ScheduleListCommand.php", "language": "php", "file_size": 12477, "cut_index": 921, "middle_length": 229}} {"prefix": "/**\n * The default memory cost factor.\n *\n * @var int\n */\n protected $memory = 1024;\n\n /**\n * The default time cost factor.\n *\n * @var int\n */\n protected $time = 2;\n\n /**\n * The default threads factor.\n *\n * @var int\n */\n protected $threads = 2;\n\n /**\n * Indicates whether to perform an algorithm check.\n *\n * @var bool\n */\n protected $verifyAlgorithm = false;\n\n /**\n * Create a new hasher instance.\n *\n * @param", "suffix": "is->threads($options);\n $this->verifyAlgorithm = $options['verify'] ?? $this->verifyAlgorithm;\n }\n\n /**\n * Hash the given value.\n *\n * @param string $value\n * @param array $options\n * @return string\n *\n * @throw", "middle": " array $options\n */\n public function __construct(array $options = [])\n {\n $this->time = $options['time'] ?? $this->time;\n $this->memory = $options['memory'] ?? $this->memory;\n $this->threads = $th", "meta": {"filepath": "src/Illuminate/Hashing/ArgonHasher.php", "language": "php", "file_size": 5891, "cut_index": 716, "middle_length": 229}} {"prefix": "Manager;\n\n/**\n * @mixin \\Illuminate\\Contracts\\Hashing\\Hasher\n */\nclass HashManager extends Manager implements Hasher\n{\n /**\n * Create an instance of the Bcrypt hash Driver.\n *\n * @return \\Illuminate\\Hashing\\BcryptHasher\n */\n public function createBcryptDriver()\n {\n return new BcryptHasher($this->config->get('hashing.bcrypt') ?? []);\n }\n\n /**\n * Create an instance of the Argon2i hash Driver.\n *\n * @return \\Illuminate\\Hashing\\ArgonHasher\n */\n public fun", "suffix": "sher\n */\n public function createArgon2idDriver()\n {\n return new Argon2IdHasher($this->config->get('hashing.argon') ?? []);\n }\n\n /**\n * Get information about the given hashed value.\n *\n * @param string $hashedValue\n ", "middle": "ction createArgonDriver()\n {\n return new ArgonHasher($this->config->get('hashing.argon') ?? []);\n }\n\n /**\n * Create an instance of the Argon2id hash Driver.\n *\n * @return \\Illuminate\\Hashing\\Argon2IdHa", "meta": {"filepath": "src/Illuminate/Hashing/HashManager.php", "language": "php", "file_size": 3075, "cut_index": 614, "middle_length": 229}} {"prefix": "hp\n\nnamespace Illuminate\\Concurrency;\n\nuse Carbon\\CarbonInterval;\nuse Closure;\nuse Illuminate\\Contracts\\Concurrency\\Driver;\nuse Illuminate\\Support\\Arr;\nuse Illuminate\\Support\\Defer\\DeferredCallback;\nuse Spatie\\Fork\\Fork;\n\nuse function Illuminate\\Support\\defer;\n\nclass ForkDriver implements Driver\n{\n /**\n * Run the given tasks concurrently and return an array containing the results.\n */\n public function run(Closure|array $tasks, CarbonInterval|int|null $timeout = null): array\n {\n $task", "suffix": " $results = Fork::new()->run(...$values);\n\n ksort($results);\n\n return array_combine($keys, $results);\n }\n\n /**\n * Start the given tasks in the background after the current task has finished.\n */\n public function defer(Clos", "middle": "s = Arr::wrap($tasks);\n\n $keys = array_keys($tasks);\n $values = array_values($tasks);\n\n /** @phpstan-ignore class.notFound (spatie/fork is not installed as it is practically incompatible with Windows) */\n ", "meta": {"filepath": "src/Illuminate/Concurrency/ForkDriver.php", "language": "php", "file_size": 1101, "cut_index": 515, "middle_length": 229}} {"prefix": "Illuminate\\Concurrency;\n\nuse Carbon\\CarbonInterval;\nuse Closure;\nuse Illuminate\\Contracts\\Concurrency\\Driver;\nuse Illuminate\\Support\\Collection;\nuse Illuminate\\Support\\Defer\\DeferredCallback;\n\nuse function Illuminate\\Support\\defer;\n\nclass SyncDriver implements Driver\n{\n /**\n * Run the given tasks concurrently and return an array containing the results.\n */\n public function run(Closure|array $tasks, CarbonInterval|int|null $timeout = null): array\n {\n return Collection::wrap($tasks)->m", "suffix": "();\n }\n\n /**\n * Start the given tasks in the background after the current task has finished.\n */\n public function defer(Closure|array $tasks): DeferredCallback\n {\n return defer(fn () => Collection::wrap($tasks)->each(fn ($task) =", "middle": "ap(\n fn ($task) => $task()\n )->all", "meta": {"filepath": "src/Illuminate/Concurrency/SyncDriver.php", "language": "php", "file_size": 858, "cut_index": 529, "middle_length": 52}} {"prefix": "imeException;\nuse Throwable;\n\nuse function Illuminate\\Support\\enum_value;\n\n/**\n * @mixin \\Illuminate\\Log\\Logger\n */\nclass LogManager implements LoggerInterface\n{\n use ParsesLogConfiguration, RebindsCallbacksToSelf;\n\n /**\n * The application instance.\n *\n * @var \\Illuminate\\Contracts\\Foundation\\Application\n */\n protected $app;\n\n /**\n * The array of resolved channels.\n *\n * @var array\n */\n protected $channels = [];\n\n /**\n * The context shared across channel", "suffix": "ndard date format to use when writing logs.\n *\n * @var string\n */\n protected $dateFormat = 'Y-m-d H:i:s';\n\n /**\n * Create a new Log manager instance.\n *\n * @param \\Illuminate\\Contracts\\Foundation\\Application $app\n */\n ", "middle": "s and stacks.\n *\n * @var array\n */\n protected $sharedContext = [];\n\n /**\n * The registered custom driver creators.\n *\n * @var array\n */\n protected $customCreators = [];\n\n /**\n * The sta", "meta": {"filepath": "src/Illuminate/Log/LogManager.php", "language": "php", "file_size": 22047, "cut_index": 1331, "middle_length": 229}} {"prefix": "ng logger implementation.\n *\n * @var \\Psr\\Log\\LoggerInterface\n */\n protected $logger;\n\n /**\n * The event dispatcher instance.\n *\n * @var \\Illuminate\\Contracts\\Events\\Dispatcher|null\n */\n protected $dispatcher;\n\n /**\n * Any context to be added to logs.\n *\n * @var array\n */\n protected $context = [];\n\n /**\n * Create a new log writer instance.\n *\n * @param \\Psr\\Log\\LoggerInterface $logger\n * @param \\Illuminate\\Contracts\\Events\\Disp", "suffix": "n emergency message to the logs.\n *\n * @param \\Illuminate\\Contracts\\Support\\Arrayable|\\Illuminate\\Contracts\\Support\\Jsonable|\\Illuminate\\Support\\Stringable|array|string $message\n * @param array $context\n * @return void\n */\n publi", "middle": "atcher|null $dispatcher\n */\n public function __construct(LoggerInterface $logger, ?Dispatcher $dispatcher = null)\n {\n $this->logger = $logger;\n $this->dispatcher = $dispatcher;\n }\n\n /**\n * Log a", "meta": {"filepath": "src/Illuminate/Log/Logger.php", "language": "php", "file_size": 9401, "cut_index": 921, "middle_length": 229}} {"prefix": "te\\Log\\Context;\n\nuse Illuminate\\Contracts\\Log\\ContextLogProcessor as ContextLogProcessorContract;\nuse Illuminate\\Queue\\Events\\JobProcessing;\nuse Illuminate\\Queue\\Queue;\nuse Illuminate\\Support\\Env;\nuse Illuminate\\Support\\Facades\\Context;\nuse Illuminate\\Support\\ServiceProvider;\n\nclass ContextServiceProvider extends ServiceProvider\n{\n /**\n * Register the service provider.\n *\n * @return void\n */\n public function register()\n {\n $this->app->scoped(Repository::class);\n\n if ($", "suffix": "decode($context, associative: true)) {\n $repository->hydrate($context);\n }\n });\n }\n\n $this->app->bind(ContextLogProcessorContract::class, fn () => new ContextLogProcessor());\n }\n\n /**\n * ", "middle": "this->app->runningInConsole()) {\n $this->app->resolving(Repository::class, function (Repository $repository) {\n $context = Env::get('__LARAVEL_CONTEXT');\n\n if ($context && $context = json_", "meta": {"filepath": "src/Illuminate/Log/Context/ContextServiceProvider.php", "language": "php", "file_size": 1700, "cut_index": 537, "middle_length": 229}} {"prefix": "te\\Log\\Formatters;\n\nuse Illuminate\\Container\\Container;\nuse Illuminate\\Contracts\\Debug\\ExceptionHandler;\nuse Monolog\\Formatter\\JsonFormatter as MonologJsonFormatter;\nuse Throwable;\n\nclass JsonFormatter extends MonologJsonFormatter\n{\n #[\\Override]\n protected function normalizeException(Throwable $e, int $depth = 0): array\n {\n $response = parent::normalizeException($e, $depth);\n\n try {\n $handler = Container::getInstance()->make(ExceptionHandler::class);\n } catch (Throw", "suffix": ", 'buildContextForException')\n && is_array($normalizedHandlerExceptionContext = $this->normalize($handler->buildContextForException($e), $depth + 1))\n ) {\n $response = array_merge(\n $normalizedHan", "middle": "able) {\n return array_merge($this->getExceptionContext($e, $depth), $response);\n }\n\n if ((! method_exists($handler, 'isReporting')) || ! $handler->isReporting($e)) {\n if (method_exists($handler", "meta": {"filepath": "src/Illuminate/Log/Formatters/JsonFormatter.php", "language": "php", "file_size": 1813, "cut_index": 537, "middle_length": 229}} {"prefix": "use Illuminate\\Support\\Traits\\Macroable;\n\nclass Benchmark\n{\n use Macroable;\n\n /**\n * Measure a callable or array of callables over the given number of iterations.\n *\n * @param \\Closure|array $benchmarkables\n * @param int $iterations\n * @return array|float\n */\n public static function measure(Closure|array $benchmarkables, int $iterations = 1): array|float\n {\n return Collection::wrap($benchmarkables)->map(function ($callback) use ($itera", "suffix": "hrtime(true) - $start) / 1_000_000;\n })->average();\n })->when(\n $benchmarkables instanceof Closure,\n fn ($c) => $c->first(),\n fn ($c) => $c->all(),\n );\n }\n\n /**\n * Measure a callable once ", "middle": "tions) {\n return Collection::range(1, $iterations)->map(function () use ($callback) {\n gc_collect_cycles();\n\n $start = hrtime(true);\n\n $callback();\n\n return (", "meta": {"filepath": "src/Illuminate/Support/Benchmark.php", "language": "php", "file_size": 2102, "cut_index": 563, "middle_length": 229}} {"prefix": "rbon as BaseCarbon;\nuse Carbon\\CarbonImmutable as BaseCarbonImmutable;\nuse Illuminate\\Support\\Traits\\Conditionable;\nuse Illuminate\\Support\\Traits\\Dumpable;\nuse Ramsey\\Uuid\\Uuid;\nuse Symfony\\Component\\Uid\\Ulid;\n\nclass Carbon extends BaseCarbon\n{\n use Conditionable, Dumpable;\n\n /**\n * {@inheritdoc}\n */\n public static function setTestNow(mixed $testNow = null): void\n {\n BaseCarbon::setTestNow($testNow);\n BaseCarbonImmutable::setTestNow($testNow);\n }\n\n /**\n * Create a", "suffix": "Uuid::fromString($id);\n }\n\n return static::createFromInterface($id->getDateTime());\n }\n\n /**\n * Get the current date / time plus a given amount of time.\n */\n public function plus(\n int $years = 0,\n int $months =", "middle": " Carbon instance from a given ordered UUID or ULID.\n */\n public static function createFromId(Uuid|Ulid|string $id): static\n {\n if (is_string($id)) {\n $id = Ulid::isValid($id) ? Ulid::fromString($id) : ", "meta": {"filepath": "src/Illuminate/Support/Carbon.php", "language": "php", "file_size": 2162, "cut_index": 563, "middle_length": 229}} {"prefix": " /**\n * The drivers aliases map.\n *\n * @var array\n */\n protected static $driverAliases = [\n 'mssql' => 'sqlsrv',\n 'mysql2' => 'mysql', // RDS\n 'postgres' => 'pgsql',\n 'postgresql' => 'pgsql',\n 'sqlite3' => 'sqlite',\n 'redis' => 'tcp',\n 'rediss' => 'tls',\n ];\n\n /**\n * Parse the database configuration, hydrating options using a database configuration URL if possible.\n *\n * @param array|string", "suffix": "'url');\n\n if (! $url) {\n return $config;\n }\n\n $rawComponents = $this->parseUrl($url);\n\n $decodedComponents = $this->parseStringsToNativeTypes(\n array_map(rawurldecode(...), $rawComponents)\n );\n\n ", "middle": " $config\n * @return array\n */\n public function parseConfiguration($config)\n {\n if (is_string($config)) {\n $config = ['url' => $config];\n }\n\n $url = Arr::pull($config, ", "meta": {"filepath": "src/Illuminate/Support/ConfigurationUrlParser.php", "language": "php", "file_size": 4526, "cut_index": 614, "middle_length": 229}} {"prefix": "timezone = null)\n * @method \\Illuminate\\Support\\Carbon createFromDate($year = null, $month = null, $day = null, $timezone = null)\n * @method \\Illuminate\\Support\\Carbon|null createFromFormat($format, $time, $timezone = null)\n * @method \\Illuminate\\Support\\Carbon|null createFromIsoFormat(string $format, string $time, $timezone = null, ?string $locale = 'en', ?\\Symfony\\Contracts\\Translation\\TranslatorInterface $translator = null)\n * @method \\Illuminate\\Support\\Carbon|null createFromLocaleFormat(string $format,", "suffix": "mTime($hour = 0, $minute = 0, $second = 0, $timezone = null)\n * @method \\Illuminate\\Support\\Carbon createFromTimeString(string $time, \\DateTimeZone|string|int|null $timezone = null)\n * @method \\Illuminate\\Support\\Carbon createFromTimestamp(string|int|float", "middle": " string $locale, string $time, $timezone = null)\n * @method \\Illuminate\\Support\\Carbon|null createFromLocaleIsoFormat(string $format, string $locale, string $time, $timezone = null)\n * @method \\Illuminate\\Support\\Carbon createFro", "meta": {"filepath": "src/Illuminate/Support/DateFactory.php", "language": "php", "file_size": 10722, "cut_index": 921, "middle_length": 229}} {"prefix": "\nnamespace Illuminate\\Hashing;\n\nuse RuntimeException;\n\nclass Argon2IdHasher extends ArgonHasher\n{\n /**\n * Check the given plain value against a hash.\n *\n * @param string $value\n * @param string $hashedValue\n * @param array $options\n * @return bool\n *\n * @throws \\RuntimeException\n */\n public function check(#[\\SensitiveParameter] $value, $hashedValue, array $options = [])\n {\n if (is_null($hashedValue) || (string) $hashedValue === '') {\n retu", "suffix": "password_verify($value, $hashedValue);\n }\n\n /**\n * Verify the hashed value's algorithm.\n *\n * @param string $hashedValue\n * @return bool\n */\n protected function isUsingCorrectAlgorithm($hashedValue)\n {\n return $this", "middle": "rn false;\n }\n\n if ($this->verifyAlgorithm && ! $this->isUsingCorrectAlgorithm($hashedValue)) {\n throw new RuntimeException('This password does not use the Argon2id algorithm.');\n }\n\n return ", "meta": {"filepath": "src/Illuminate/Hashing/Argon2IdHasher.php", "language": "php", "file_size": 1242, "cut_index": 518, "middle_length": 229}} {"prefix": "ract;\nuse InvalidArgumentException;\nuse RuntimeException;\n\nclass BcryptHasher extends AbstractHasher implements HasherContract\n{\n /**\n * The default cost factor.\n *\n * @var int\n */\n protected $rounds = 12;\n\n /**\n * Indicates whether to perform an algorithm check.\n *\n * @var bool\n */\n protected $verifyAlgorithm = false;\n\n /**\n * The maximum allowed length of strings that can be hashed.\n *\n * @var int|null\n */\n protected $limit;\n\n /**\n *", "suffix": " $options['verify'] ?? $this->verifyAlgorithm;\n $this->limit = $options['limit'] ?? $this->limit;\n }\n\n /**\n * Hash the given value.\n *\n * @param string $value\n * @param array $options\n * @return string\n *\n * @th", "middle": " Create a new hasher instance.\n *\n * @param array $options\n */\n public function __construct(array $options = [])\n {\n $this->rounds = $options['rounds'] ?? $this->rounds;\n $this->verifyAlgorithm =", "meta": {"filepath": "src/Illuminate/Hashing/BcryptHasher.php", "language": "php", "file_size": 4288, "cut_index": 614, "middle_length": 229}} {"prefix": "lluminate\\Console\\Application;\nuse Illuminate\\Contracts\\Concurrency\\Driver;\nuse Illuminate\\Process\\Factory as ProcessFactory;\nuse Illuminate\\Process\\Pool;\nuse Illuminate\\Support\\Arr;\nuse Illuminate\\Support\\Defer\\DeferredCallback;\nuse Laravel\\SerializableClosure\\SerializableClosure;\n\nuse function Illuminate\\Support\\defer;\n\nclass ProcessDriver implements Driver\n{\n /**\n * Create a new process based concurrency driver.\n */\n public function __construct(protected ProcessFactory $processFactory)\n ", "suffix": "ut = null): array\n {\n $command = Application::formatCommandString('invoke-serialized-closure');\n\n $results = $this->processFactory->pool(function (Pool $pool) use ($tasks, $command, $timeout) {\n foreach (Arr::wrap($tasks) as $ke", "middle": "{\n //\n }\n\n /**\n * Run the given tasks concurrently and return an array containing the results.\n *\n * @throws \\Throwable\n */\n public function run(Closure|array $tasks, CarbonInterval|int|null $timeo", "meta": {"filepath": "src/Illuminate/Concurrency/ProcessDriver.php", "language": "php", "file_size": 3064, "cut_index": 614, "middle_length": 229}} {"prefix": "te\\Log;\n\nuse InvalidArgumentException;\nuse Monolog\\Level;\n\ntrait ParsesLogConfiguration\n{\n /**\n * The Log levels.\n *\n * @var array\n */\n protected $levels = [\n 'debug' => Level::Debug,\n 'info' => Level::Info,\n 'notice' => Level::Notice,\n 'warning' => Level::Warning,\n 'error' => Level::Error,\n 'critical' => Level::Critical,\n 'alert' => Level::Alert,\n 'emergency' => Level::Emergency,\n ];\n\n /**\n * Get fallback log channel na", "suffix": " * @throws \\InvalidArgumentException\n */\n protected function level(array $config)\n {\n $level = $config['level'] ?? 'debug';\n\n if (isset($this->levels[$level])) {\n return $this->levels[$level];\n }\n\n throw ne", "middle": "me.\n *\n * @return string\n */\n abstract protected function getFallbackChannelName();\n\n /**\n * Parse the string level into a Monolog constant.\n *\n * @param array $config\n * @return int\n *\n ", "meta": {"filepath": "src/Illuminate/Log/ParsesLogConfiguration.php", "language": "php", "file_size": 1814, "cut_index": 537, "middle_length": 229}} {"prefix": "ort\\Traits\\Conditionable;\nuse Illuminate\\Support\\Traits\\Macroable;\nuse RuntimeException;\nuse Throwable;\n\nclass Repository\n{\n use Conditionable, Macroable, SerializesModels;\n\n /**\n * The event dispatcher instance.\n *\n * @var \\Illuminate\\Contracts\\Events\\Dispatcher\n */\n protected $events;\n\n /**\n * The contextual data.\n *\n * @var array\n */\n protected $data = [];\n\n /**\n * The hidden contextual data.\n *\n * @var array\n ", "suffix": " Context instance.\n */\n public function __construct(Dispatcher $events)\n {\n $this->events = $events;\n }\n\n /**\n * Determine if the given key exists.\n *\n * @param string $key\n * @return bool\n */\n public functio", "middle": " */\n protected $hidden = [];\n\n /**\n * The callback that should handle unserialize exceptions.\n *\n * @var callable|null\n */\n protected static $handleUnserializeExceptionsUsing;\n\n /**\n * Create a new", "meta": {"filepath": "src/Illuminate/Log/Context/Repository.php", "language": "php", "file_size": 16861, "cut_index": 921, "middle_length": 229}} {"prefix": "gumentException;\nuse Ramsey\\Uuid\\Uuid;\nuse Ramsey\\Uuid\\UuidInterface;\nuse Symfony\\Component\\Uid\\Ulid;\n\nclass BinaryCodec\n{\n /** @var array */\n protected static array $customCodecs = [];\n\n /**\n * Register a custom codec.\n */\n public static function register(string $name, callable $encode, callable $decode): void\n {\n self::$customCodecs[$name] = [\n 'encode' => ", "suffix": " string $format): ?string\n {\n if (blank($value)) {\n return null;\n }\n\n if (isset(self::$customCodecs[$format])) {\n return (self::$customCodecs[$format]['encode'])($value);\n }\n\n return match ($forma", "middle": "$encode,\n 'decode' => $decode,\n ];\n }\n\n /**\n * Encode a value to binary.\n *\n * @throws \\InvalidArgumentException\n */\n public static function encode(UuidInterface|Ulid|string|null $value,", "meta": {"filepath": "src/Illuminate/Support/BinaryCodec.php", "language": "php", "file_size": 2973, "cut_index": 563, "middle_length": 229}} {"prefix": "osure;\nuse Illuminate\\Support\\HigherOrderWhenProxy;\n\ntrait Conditionable\n{\n /**\n * Apply the callback if the given \"value\" is (or resolves to) truthy.\n *\n * @template TWhenParameter\n * @template TWhenReturnType\n *\n * @param (\\Closure($this): TWhenParameter)|TWhenParameter|null $value\n * @param (callable($this, TWhenParameter): TWhenReturnType)|null $callback\n * @param (callable($this, TWhenParameter): TWhenReturnType)|null $default\n * @return $this|TWhenReturnTyp", "suffix": " return new HigherOrderWhenProxy($this);\n }\n\n if (func_num_args() === 1) {\n return (new HigherOrderWhenProxy($this))->condition($value);\n }\n\n if ($value) {\n return $callback($this, $value) ?? $this;\n ", "middle": "e\n */\n public function when($value = null, ?callable $callback = null, ?callable $default = null)\n {\n $value = $value instanceof Closure ? $value($this) : $value;\n\n if (func_num_args() === 0) {\n ", "meta": {"filepath": "src/Illuminate/Conditionable/Traits/Conditionable.php", "language": "php", "file_size": 2256, "cut_index": 563, "middle_length": 229}} {"prefix": "m;\nuse Illuminate\\Contracts\\Support\\DeferringDisplayableValue;\nuse Illuminate\\Contracts\\Support\\Htmlable;\n\nclass EncodedHtmlString extends HtmlString\n{\n /**\n * The HTML string.\n *\n * @var \\Illuminate\\Contracts\\Support\\DeferringDisplayableValue|\\Illuminate\\Contracts\\Support\\Htmlable|\\BackedEnum|string|int|float|null\n */\n protected $html;\n\n /**\n * The callback that should be used to encode the HTML strings.\n *\n * @var callable|null\n */\n protected static $encodeUsing", "suffix": " * @param bool $doubleEncode\n */\n public function __construct($html = '', protected bool $doubleEncode = true)\n {\n parent::__construct($html);\n }\n\n /**\n * Convert the special characters in the given value.\n *\n * @inter", "middle": "Factory;\n\n /**\n * Create a new encoded HTML string instance.\n *\n * @param \\Illuminate\\Contracts\\Support\\DeferringDisplayableValue|\\Illuminate\\Contracts\\Support\\Htmlable|\\BackedEnum|string|int|float|null $html\n ", "meta": {"filepath": "src/Illuminate/Support/EncodedHtmlString.php", "language": "php", "file_size": 2575, "cut_index": 563, "middle_length": 229}} {"prefix": "inate\\Process\\Factory as ProcessFactory;\nuse Illuminate\\Support\\MultipleInstanceManager;\nuse RuntimeException;\nuse Spatie\\Fork\\Fork;\n\nuse function Illuminate\\Support\\enum_value;\n\n/**\n * @mixin \\Illuminate\\Contracts\\Concurrency\\Driver\n */\nclass ConcurrencyManager extends MultipleInstanceManager\n{\n /**\n * Get a driver instance by name.\n *\n * @param \\UnitEnum|string|null $name\n * @return mixed\n */\n public function driver($name = null)\n {\n return $this->instance(enum_value(", "suffix": "iver($this->app->make(ProcessFactory::class));\n }\n\n /**\n * Create an instance of the fork concurrency driver.\n *\n * @return \\Illuminate\\Concurrency\\ForkDriver\n *\n * @throws \\RuntimeException\n */\n public function createForkD", "middle": "$name));\n }\n\n /**\n * Create an instance of the process concurrency driver.\n *\n * @return \\Illuminate\\Concurrency\\ProcessDriver\n */\n public function createProcessDriver()\n {\n return new ProcessDr", "meta": {"filepath": "src/Illuminate/Concurrency/ConcurrencyManager.php", "language": "php", "file_size": 2544, "cut_index": 563, "middle_length": 229}} {"prefix": "espace Illuminate\\Log\\Context;\n\nuse Illuminate\\Container\\Container;\nuse Illuminate\\Contracts\\Log\\ContextLogProcessor as ContextLogProcessorContract;\nuse Illuminate\\Log\\Context\\Repository as ContextRepository;\nuse Monolog\\LogRecord;\n\nclass ContextLogProcessor implements ContextLogProcessorContract\n{\n /**\n * Add contextual data to the log's \"extra\" parameter.\n *\n * @param \\Monolog\\LogRecord $record\n * @return \\Monolog\\LogRecord\n */\n public function __invoke(LogRecord $record): LogR", "suffix": " $app = Container::getInstance();\n\n if (! $app->bound(ContextRepository::class)) {\n return $record;\n }\n\n return $record->with(extra: [\n ...$record->extra,\n ...$app->get(ContextRepository::class)->a", "middle": "ecord\n {\n ", "meta": {"filepath": "src/Illuminate/Log/Context/ContextLogProcessor.php", "language": "php", "file_size": 818, "cut_index": 522, "middle_length": 14}} {"prefix": "\nclass Composer\n{\n /**\n * The filesystem instance.\n *\n * @var \\Illuminate\\Filesystem\\Filesystem\n */\n protected $files;\n\n /**\n * The working path to regenerate from.\n *\n * @var string|null\n */\n protected $workingPath;\n\n /**\n * Create a new Composer manager instance.\n *\n * @param \\Illuminate\\Filesystem\\Filesystem $files\n * @param string|null $workingPath\n */\n public function __construct(Filesystem $files, $workingPath = null)\n {\n ", "suffix": "untimeException\n */\n public function hasPackage($package)\n {\n $composer = json_decode(file_get_contents($this->findComposerFile()), true);\n\n return array_key_exists($package, $composer['require'] ?? [])\n || array_key_exis", "middle": " $this->files = $files;\n $this->workingPath = $workingPath;\n }\n\n /**\n * Determine if the given Composer package is installed.\n *\n * @param string $package\n * @return bool\n *\n * @throws \\R", "meta": {"filepath": "src/Illuminate/Support/Composer.php", "language": "php", "file_size": 7005, "cut_index": 716, "middle_length": 229}} {"prefix": "\\ResetCommand;\nuse Illuminate\\Database\\Console\\Migrations\\RollbackCommand;\nuse Illuminate\\Database\\Console\\WipeCommand;\n\n/**\n * @method static \\Illuminate\\Database\\Connection connection(\\UnitEnum|string|null $name = null)\n * @method static \\Illuminate\\Database\\ConnectionInterface build(array $config)\n * @method static string calculateDynamicConnectionName(array $config)\n * @method static \\Illuminate\\Database\\ConnectionInterface connectUsing(\\UnitEnum|string $name, array $config, bool $force = false)\n * @met", "suffix": "ethod static mixed usingConnection(\\UnitEnum|string $name, callable $callback)\n * @method static string getDefaultConnection()\n * @method static void setDefaultConnection(string $name)\n * @method static string[] supportedDrivers()\n * @method static string[", "middle": "hod static void purge(\\UnitEnum|string|null $name = null)\n * @method static void disconnect(\\UnitEnum|string|null $name = null)\n * @method static \\Illuminate\\Database\\Connection reconnect(\\UnitEnum|string|null $name = null)\n * @m", "meta": {"filepath": "src/Illuminate/Support/Facades/DB.php", "language": "php", "file_size": 8589, "cut_index": 716, "middle_length": 229}} {"prefix": "hp\n\nnamespace Illuminate\\Support;\n\nuse Illuminate\\Contracts\\Support\\Htmlable;\nuse Stringable;\n\nclass HtmlString implements Htmlable, Stringable\n{\n /**\n * The HTML string.\n *\n * @var string\n */\n protected $html;\n\n /**\n * Create a new HTML string instance.\n *\n * @param string $html\n */\n public function __construct($html = '')\n {\n $this->html = $html;\n }\n\n /**\n * Get the HTML string.\n *\n * @return string\n */\n public function toHtm", "suffix": " /**\n * Determine if the given HTML string is not empty.\n *\n * @return bool\n */\n public function isNotEmpty()\n {\n return ! $this->isEmpty();\n }\n\n /**\n * Get the HTML string.\n *\n * @return string\n */\n pu", "middle": "l()\n {\n return $this->html;\n }\n\n /**\n * Determine if the given HTML string is empty.\n *\n * @return bool\n */\n public function isEmpty()\n {\n return ($this->html ?? '') === '';\n }\n\n ", "meta": {"filepath": "src/Illuminate/Support/HtmlString.php", "language": "php", "file_size": 1079, "cut_index": 515, "middle_length": 229}} {"prefix": "acts\\Support\\Htmlable;\nuse Illuminate\\Contracts\\Support\\Jsonable;\nuse JsonSerializable;\nuse Stringable;\nuse UnitEnum;\n\nclass Js implements Htmlable, Stringable\n{\n /**\n * The JavaScript string.\n *\n * @var string\n */\n protected $js;\n\n /**\n * Flags that should be used when encoding to JSON.\n *\n * @var int\n */\n protected const REQUIRED_FLAGS = 0\n | JSON_HEX_TAG\n | JSON_HEX_APOS\n | JSON_HEX_AMP\n | JSON_HEX_QUOT\n | JSON_UNESCAPED_UNICO", "suffix": "function __construct($data, $flags = 0, $depth = 512)\n {\n $this->js = $this->convertDataToJavaScriptExpression($data, $flags, $depth);\n }\n\n /**\n * Create a new JavaScript string from the given data.\n *\n * @param mixed $data\n ", "middle": "DE\n | JSON_THROW_ON_ERROR;\n\n /**\n * Create a new class instance.\n *\n * @param mixed $data\n * @param int|null $flags\n * @param int $depth\n *\n * @throws \\JsonException\n */\n public ", "meta": {"filepath": "src/Illuminate/Support/Js.php", "language": "php", "file_size": 3948, "cut_index": 614, "middle_length": 229}} {"prefix": "mber of potential opportunities to win.\n *\n * @var int|null\n */\n protected $outOf;\n\n /**\n * The winning callback.\n *\n * @var null|callable\n */\n protected $winner;\n\n /**\n * The losing callback.\n *\n * @var null|callable\n */\n protected $loser;\n\n /**\n * The factory that should be used to generate results.\n *\n * @var callable|null\n */\n protected static $resultFactory;\n\n /**\n * Create a new Lottery instance.\n *\n * @par", "suffix": "chances > 1) {\n throw new RuntimeException('Float must not be greater than 1.');\n }\n\n if ($outOf !== null && $outOf < 1) {\n throw new RuntimeException('Lottery \"out of\" value must be greater than or equal to 1.');\n ", "middle": "am int|float $chances\n * @param int<1, max>|null $outOf\n *\n * @throws \\RuntimeException\n */\n public function __construct($chances, $outOf = null)\n {\n if ($outOf === null && is_float($chances) && $", "meta": {"filepath": "src/Illuminate/Support/Lottery.php", "language": "php", "file_size": 6195, "cut_index": 716, "middle_length": 229}} {"prefix": "the registered messages.\n *\n * @var array>\n */\n protected $messages = [];\n\n /**\n * Default format for message output.\n *\n * @var string\n */\n protected $format = ':message';\n\n /**\n * Create a new message bag instance.\n *\n * @param array> $messages\n */\n public function __construct(array $messages = [])\n {\n foreach ($messages as $key => $value) {\n $value = $value instan", "suffix": " public function keys()\n {\n return array_keys($this->messages);\n }\n\n /**\n * Add a message to the message bag.\n *\n * @param string $key\n * @param string $message\n * @return $this\n */\n public function add($ke", "middle": "ceof Arrayable ? $value->toArray() : (array) $value;\n\n $this->messages[$key] = array_unique($value);\n }\n }\n\n /**\n * Get the keys present in the message bag.\n *\n * @return array\n */\n", "meta": {"filepath": "src/Illuminate/Support/MessageBag.php", "language": "php", "file_size": 10802, "cut_index": 921, "middle_length": 229}} {"prefix": "sed items.\n *\n * @var array\n */\n protected $parsed = [];\n\n /**\n * Parse a key into namespace, group, and item.\n *\n * @param string $key\n * @return array\n */\n public function parseKey($key)\n {\n // If we've already parsed the given key, we'll return the cached version we\n // already have, as this will save us some processing. We cache off every\n // key we parse so we can quickly return it on all subsequent requests.\n if (isset($this->pa", "suffix": "a\n // tool for organizing configuration items for things such as modules.\n if (! str_contains($key, '::')) {\n $segments = explode('.', $key);\n\n $parsed = $this->parseBasicSegments($segments);\n } else {\n ", "middle": "rsed[$key])) {\n return $this->parsed[$key];\n }\n\n // If the key does not contain a double colon, it means the key is not in a\n // namespace, and is just a regular configuration item. Namespaces are ", "meta": {"filepath": "src/Illuminate/Support/NamespacedItemResolver.php", "language": "php", "file_size": 3412, "cut_index": 614, "middle_length": 229}} {"prefix": "te\\Support;\n\nuse WeakMap;\n\nclass Once\n{\n /**\n * The current globally used instance.\n *\n * @var static|null\n */\n protected static ?self $instance = null;\n\n /**\n * Indicates if the once instance is enabled.\n *\n * @var bool\n */\n protected static bool $enabled = true;\n\n /**\n * Create a new once instance.\n *\n * @param \\WeakMap> $values\n */\n protected function __construct(protected WeakMap $values)\n {\n //\n ", "suffix": " the given onceable.\n *\n * @param Onceable $onceable\n * @return mixed\n */\n public function value(Onceable $onceable)\n {\n if (! static::$enabled) {\n return call_user_func($onceable->callable);\n }\n\n $ob", "middle": " }\n\n /**\n * Create a new once instance.\n *\n * @return static\n */\n public static function instance()\n {\n return static::$instance ??= new static(new WeakMap);\n }\n\n /**\n * Get the value of", "meta": {"filepath": "src/Illuminate/Support/Once.php", "language": "php", "file_size": 1905, "cut_index": 537, "middle_length": 229}} {"prefix": "ss;\nuse ArrayObject;\nuse Illuminate\\Support\\Traits\\Macroable;\n\nclass Optional implements ArrayAccess\n{\n use Macroable {\n __call as macroCall;\n }\n\n /**\n * The underlying object.\n *\n * @var mixed\n */\n protected $value;\n\n /**\n * Create a new optional instance.\n *\n * @param mixed $value\n */\n public function __construct($value)\n {\n $this->value = $value;\n }\n\n /**\n * Dynamically access a property on the underlying object.\n *\n *", "suffix": "property exists on the underlying object.\n *\n * @param mixed $name\n * @return bool\n */\n public function __isset($name)\n {\n if (is_object($this->value)) {\n return isset($this->value->{$name});\n }\n\n if ", "middle": " @param string $key\n * @return mixed\n */\n public function __get($key)\n {\n if (is_object($this->value)) {\n return $this->value->{$key} ?? null;\n }\n }\n\n /**\n * Dynamically check a ", "meta": {"filepath": "src/Illuminate/Support/Optional.php", "language": "php", "file_size": 2715, "cut_index": 563, "middle_length": 229}} {"prefix": "Inflector\\InflectorFactory;\n\nclass Pluralizer\n{\n /**\n * The cached inflector instance.\n *\n * @var static\n */\n protected static $inflector;\n\n /**\n * The language that should be used by the inflector.\n *\n * @var string\n */\n protected static $language = 'english';\n\n /**\n * Uncountable non-nouns word forms.\n *\n * Contains words supported by Doctrine/Inflector/Rules/English/Uninflected.php\n *\n * @var string[]\n */\n public static $uncountabl", "suffix": "lic static function plural($value, $count = 2)\n {\n if (is_countable($count)) {\n $count = count($count);\n }\n\n if ((int) abs($count) === 1 || static::uncountable($value) || preg_match('/^(.*)[A-Za-z0-9\\x{0080}-\\x{FFFF}]$/u'", "middle": "e = [\n 'recommended',\n 'related',\n ];\n\n /**\n * Get the plural form of an English word.\n *\n * @param string $value\n * @param int|array|\\Countable $count\n * @return string\n */\n pub", "meta": {"filepath": "src/Illuminate/Support/Pluralizer.php", "language": "php", "file_size": 2908, "cut_index": 563, "middle_length": 229}} {"prefix": "rict_types=1);\n\nnamespace Illuminate\\Support;\n\nuse Closure;\nuse ReflectionFunction;\n\ntrait RebindsCallbacksToSelf\n{\n /**\n * Binds the provided callback to the class instance.\n *\n * @throws \\ReflectionException\n */\n protected function bindCallbackToSelf(Closure $callback): ?Closure\n {\n $reflector = new ReflectionFunction($callback);\n\n // We only want to rebind anonymous functions.\n if ($reflector->isAnonymous()) {\n if ($reflector->isStatic()) {\n ", "suffix": ".\n $callback = $callback->bindTo(null, static::class);\n } else {\n // Non-static functions are bound to $this.\n $callback = $callback->bindTo($this, static::class);\n }\n }\n\n ret", "middle": " // Static functions are bound without $this", "meta": {"filepath": "src/Illuminate/Support/RebindsCallbacksToSelf.php", "language": "php", "file_size": 860, "cut_index": 529, "middle_length": 52}} {"prefix": "se Illuminate\\Console\\Command;\nuse ReflectionClass;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\nuse Throwable;\n\n#[AsCommand(name: 'invoke-serialized-closure')]\nclass InvokeSerializedClosureCommand extends Command\n{\n /**\n * The console command signature.\n *\n * @var string\n */\n protected $signature = 'invoke-serialized-closure {code? : The serialized closure}';\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected $description = 'Invoke t", "suffix": " *\n * @return void\n *\n * @throws \\RuntimeException\n */\n public function handle()\n {\n try {\n $this->output->write(json_encode([\n 'successful' => true,\n 'result' => serialize($this->lar", "middle": "he given serialized closure';\n\n /**\n * Indicates whether the command should be shown in the Artisan command list.\n *\n * @var bool\n */\n protected $hidden = true;\n\n /**\n * Execute the console command.\n ", "meta": {"filepath": "src/Illuminate/Concurrency/Console/InvokeSerializedClosureCommand.php", "language": "php", "file_size": 2372, "cut_index": 563, "middle_length": 229}} {"prefix": ";\nuse Illuminate\\Support\\Traits\\InteractsWithData;\nuse Illuminate\\Support\\Traits\\Macroable;\nuse IteratorAggregate;\nuse JsonSerializable;\nuse Traversable;\n\n/**\n * @template TKey of array-key\n * @template TValue\n *\n * @implements \\Illuminate\\Contracts\\Support\\Arrayable\n * @implements \\ArrayAccess\n */\nclass Fluent implements Arrayable, ArrayAccess, IteratorAggregate, Jsonable, JsonSerializable\n{\n use Conditionable, InteractsWithData, Macroable {\n __call as macroCall;\n }", "suffix": "TValue> $attributes\n */\n public function __construct($attributes = [])\n {\n $this->fill($attributes);\n }\n\n /**\n * Create a new fluent instance.\n *\n * @param iterable $attributes\n * @return static\n ", "middle": "\n\n /**\n * All of the attributes set on the fluent instance.\n *\n * @var array\n */\n protected $attributes = [];\n\n /**\n * Create a new fluent instance.\n *\n * @param iterable\n ", "suffix": "ram \\Illuminate\\Contracts\\Container\\Container $container\n */\n public function __construct(Container $container)\n {\n $this->container = $container;\n $this->config = $container->make('config');\n }\n\n /**\n * Get the default ", "middle": " */\n protected $customCreators = [];\n\n /**\n * The array of created \"drivers\".\n *\n * @var array\n */\n protected $drivers = [];\n\n /**\n * Create a new manager instance.\n *\n * @pa", "meta": {"filepath": "src/Illuminate/Support/Manager.php", "language": "php", "file_size": 4906, "cut_index": 614, "middle_length": 229}} {"prefix": "ormat the given number according to the current locale.\n *\n * @param int|float $number\n * @param int|null $precision\n * @param int|null $maxPrecision\n * @param string|null $locale\n * @return string|false\n */\n public static function format(int|float $number, ?int $precision = null, ?int $maxPrecision = null, ?string $locale = null)\n {\n static::ensureIntlExtensionIsInstalled();\n\n $formatter = new NumberFormatter($locale ?? static::$locale, NumberFormatte", "suffix": "erFormatter::FRACTION_DIGITS, $precision);\n }\n\n return $formatter->format($number);\n }\n\n /**\n * Parse the given string according to the specified format type.\n *\n * @param string $string\n * @param int|null $type\n ", "middle": "r::DECIMAL);\n\n if (! is_null($maxPrecision)) {\n $formatter->setAttribute(NumberFormatter::MAX_FRACTION_DIGITS, $maxPrecision);\n } elseif (! is_null($precision)) {\n $formatter->setAttribute(Numb", "meta": {"filepath": "src/Illuminate/Support/Number.php", "language": "php", "file_size": 12992, "cut_index": 921, "middle_length": 229}} {"prefix": "use Illuminate\\Contracts\\Support\\HasOnceHash;\nuse Laravel\\SerializableClosure\\Support\\ReflectionClosure;\n\nclass Onceable\n{\n /**\n * Create a new onceable instance.\n *\n * @param string $hash\n * @param object|null $object\n * @param callable $callable\n */\n public function __construct(\n public string $hash,\n public ?object $object,\n public $callable,\n ) {\n //\n }\n\n /**\n * Tries to create a new onceable instance from the given trace.\n ", "suffix": "ace, $callable))) {\n $object = static::objectFromTrace($trace);\n\n return new static($hash, $object, $callable);\n }\n }\n\n /**\n * Computes the object of the onceable from the given trace, if any.\n *\n * @param ar", "middle": " *\n * @param array> $trace\n * @return static|null\n */\n public static function tryFromTrace(array $trace, callable $callable)\n {\n if (! is_null($hash = static::hashFromTrace($tr", "meta": {"filepath": "src/Illuminate/Support/Onceable.php", "language": "php", "file_size": 2548, "cut_index": 563, "middle_length": 229}} {"prefix": "sUtils is a bunch of utility methods.\n *\n * This class was originally copied from Symfony 3.\n */\nclass ProcessUtils\n{\n /**\n * Escapes a string to be used as a shell argument.\n *\n * @param string $argument\n * @return string\n */\n public static function escapeArgument($argument)\n {\n // Fix for PHP bug #43784 escapeshellarg removes % from given string\n // Fix for PHP bug #49446 escapeshellarg doesn't work on Windows\n // @see https://bugs.php.net/bug.php?id=437", "suffix": "quote = false;\n\n foreach (preg_split('/(\")/', $argument, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE) as $part) {\n if ($part === '\"') {\n $escapedArgument .= '\\\\\"';\n } elseif (self::isSurrou", "middle": "84\n // @see https://bugs.php.net/bug.php?id=49446\n if ('\\\\' === DIRECTORY_SEPARATOR) {\n if ($argument === '') {\n return '\"\"';\n }\n\n $escapedArgument = '';\n $", "meta": {"filepath": "src/Illuminate/Support/ProcessUtils.php", "language": "php", "file_size": 2050, "cut_index": 563, "middle_length": 229}} {"prefix": "rbonInterval;\nuse DateInterval;\nuse DateTimeInterface;\n\ntrait InteractsWithTime\n{\n /**\n * Get the number of seconds until the given DateTime.\n *\n * @param \\DateTimeInterface|\\DateInterval|int $delay\n * @return int\n */\n protected function secondsUntil($delay)\n {\n $delay = $this->parseDateInterval($delay);\n\n return $delay instanceof DateTimeInterface\n ? max(0, $delay->getTimestamp() - $this->currentTime())\n : (int) $delay;\n }\n\n /**\n ", "suffix": "($delay);\n\n return $delay instanceof DateTimeInterface\n ? $delay->getTimestamp()\n : Carbon::now()->addSeconds($delay)->getTimestamp();\n }\n\n /**\n * If the given value is an interval, convert it to a DateTime instance.\n", "middle": "* Get the \"available at\" UNIX timestamp.\n *\n * @param \\DateTimeInterface|\\DateInterval|int $delay\n * @return int\n */\n protected function availableAt($delay = 0)\n {\n $delay = $this->parseDateInterval", "meta": {"filepath": "src/Illuminate/Support/InteractsWithTime.php", "language": "php", "file_size": 2076, "cut_index": 563, "middle_length": 229}} {"prefix": "hp\n\nnamespace Illuminate\\Support;\n\nclass AggregateServiceProvider extends ServiceProvider\n{\n /**\n * The provider class names.\n *\n * @var array>\n */\n protected $providers = [];\n\n /**\n * An array of the service provider instances.\n *\n * @var array\n */\n protected $instances = [];\n\n /**\n * Register the service provider.\n *\n * @return void\n */\n public ", "suffix": "ed by the provider.\n *\n * @return array\n */\n public function provides()\n {\n $provides = [];\n\n foreach ($this->providers as $provider) {\n $instance = $this->app->resolveProvider($provider);\n\n ", "middle": "function register()\n {\n $this->instances = [];\n\n foreach ($this->providers as $provider) {\n $this->instances[] = $this->app->register($provider);\n }\n }\n\n /**\n * Get the services provid", "meta": {"filepath": "src/Illuminate/Support/AggregateServiceProvider.php", "language": "php", "file_size": 1106, "cut_index": 515, "middle_length": 229}} {"prefix": " /**\n * The application instance.\n *\n * @var \\Illuminate\\Contracts\\Foundation\\Application\n */\n protected $app;\n\n /**\n * The configuration repository instance.\n *\n * @var \\Illuminate\\Contracts\\Config\\Repository\n */\n protected $config;\n\n /**\n * The array of resolved instances.\n *\n * @var array\n */\n protected $instances = [];\n\n /**\n * The registered custom instance creators.\n *\n * @var array\n */\n protected $customCreators = ", "suffix": "nate\\Contracts\\Foundation\\Application $app\n */\n public function __construct($app)\n {\n $this->app = $app;\n $this->config = $app->make('config');\n }\n\n /**\n * Get the default instance name.\n *\n * @return string\n ", "middle": "[];\n\n /**\n * The key name of the \"driver\" equivalent configuration option.\n *\n * @var string\n */\n protected $driverKey = 'driver';\n\n /**\n * Create a new manager instance.\n *\n * @param \\Illumi", "meta": {"filepath": "src/Illuminate/Support/MultipleInstanceManager.php", "language": "php", "file_size": 5652, "cut_index": 716, "middle_length": 229}} {"prefix": " *\n * @var array\n */\n protected $providers;\n\n /**\n * Create a new default provider collection.\n *\n * @param array|null $providers\n */\n public function __construct(?array $providers = null)\n {\n $this->providers = $providers ?: [\n \\Illuminate\\Auth\\AuthServiceProvider::class,\n \\Illuminate\\Broadcasting\\BroadcastServiceProvider::class,\n \\Illuminate\\Bus\\BusServiceProvider::class,\n \\Illuminate\\Ca", "suffix": "ceProvider::class,\n \\Illuminate\\Database\\DatabaseServiceProvider::class,\n \\Illuminate\\Encryption\\EncryptionServiceProvider::class,\n \\Illuminate\\Filesystem\\FilesystemServiceProvider::class,\n \\Illuminate\\Foundation", "middle": "che\\CacheServiceProvider::class,\n \\Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider::class,\n \\Illuminate\\Concurrency\\ConcurrencyServiceProvider::class,\n \\Illuminate\\Cookie\\CookieServi", "meta": {"filepath": "src/Illuminate/Support/DefaultProviders.php", "language": "php", "file_size": 3339, "cut_index": 614, "middle_length": 229}} {"prefix": "g.\n *\n * @var bool\n */\n protected static $syncWithCarbon = false;\n\n /**\n * The total duration to sleep.\n *\n * @var \\Carbon\\CarbonInterval\n */\n public $duration;\n\n /**\n * The callback that determines if sleeping should continue.\n *\n * @var \\Closure\n */\n public $while;\n\n /**\n * The pending duration to sleep.\n *\n * @var int|float|null\n */\n protected $pending = null;\n\n /**\n * Indicates that all sleeping should be faked.\n ", "suffix": "e = [];\n\n /**\n * Indicates if the instance should sleep.\n *\n * @var bool\n */\n protected $shouldSleep = true;\n\n /**\n * Indicates if the instance already slept via `then()`.\n *\n * @var bool\n */\n protected $alreadyS", "middle": " *\n * @var bool\n */\n protected static $fake = false;\n\n /**\n * The sequence of sleep durations encountered while faking.\n *\n * @var array\n */\n protected static $sequenc", "meta": {"filepath": "src/Illuminate/Support/Sleep.php", "language": "php", "file_size": 12430, "cut_index": 921, "middle_length": 229}} {"prefix": "eturn $this\n */\n public function newLine($count = 1)\n {\n return $this->append(str_repeat(PHP_EOL, $count));\n }\n\n /**\n * Transliterate a UTF-8 value to ASCII.\n *\n * @param string $language\n * @return static\n */\n public function ascii($language = 'en')\n {\n return new static(Str::ascii($this->value, $language));\n }\n\n /**\n * Get the trailing name component of the path.\n *\n * @param string $suffix\n * @return static\n */\n publ", "suffix": " */\n public function charAt($index)\n {\n return Str::charAt($this->value, $index);\n }\n\n /**\n * Remove the given string if it exists at the start of the current string.\n *\n * @param string|array $needle\n * @return stati", "middle": "ic function basename($suffix = '')\n {\n return new static(basename($this->value, $suffix));\n }\n\n /**\n * Get the character at the specified index.\n *\n * @param int $index\n * @return string|false\n ", "meta": {"filepath": "src/Illuminate/Support/Stringable.php", "language": "php", "file_size": 39545, "cut_index": 2151, "middle_length": 229}} {"prefix": "e;\nuse League\\Uri\\Contracts\\UriInterface;\nuse League\\Uri\\Uri as LeagueUri;\nuse SensitiveParameter;\nuse Stringable;\n\nclass Uri implements Htmlable, JsonSerializable, Responsable, Stringable\n{\n use Conditionable, Dumpable, Macroable, Tappable;\n\n /**\n * The URI instance.\n */\n protected UriInterface $uri;\n\n /**\n * The URL generator resolver.\n */\n protected static ?Closure $urlGeneratorResolver = null;\n\n /**\n * Create a new parsed URI instance.\n */\n public function __", "suffix": "on of(UriInterface|Stringable|string $uri = ''): static\n {\n return new static($uri);\n }\n\n /**\n * Get a URI instance of an absolute URL for the given path.\n */\n public static function to(string $path): static\n {\n return ", "middle": "construct(UriInterface|Stringable|string $uri = '')\n {\n $this->uri = $uri instanceof UriInterface ? $uri : LeagueUri::new((string) $uri);\n }\n\n /**\n * Create a new URI instance.\n */\n public static functi", "meta": {"filepath": "src/Illuminate/Support/Uri.php", "language": "php", "file_size": 11836, "cut_index": 921, "middle_length": 229}} {"prefix": "a;\nuse Illuminate\\Support\\Traits\\Dumpable;\nuse Illuminate\\Support\\Traits\\InteractsWithData;\nuse Traversable;\n\nclass ValidatedInput implements ValidatedData\n{\n use Dumpable, InteractsWithData;\n\n /**\n * The underlying input.\n *\n * @var array\n */\n protected $input;\n\n /**\n * Create a new validated input container.\n *\n * @param array $input\n */\n public function __construct(array $input)\n {\n $this->input = $input;\n }\n\n /**\n * Merge the validated", "suffix": " /**\n * Get the raw, underlying input array.\n *\n * @param mixed $keys\n * @return array\n */\n public function all($keys = null)\n {\n if (! $keys) {\n return $this->input;\n }\n\n $input = [];\n\n ", "middle": " input with the given array of additional data.\n *\n * @param array $items\n * @return static\n */\n public function merge(array $items)\n {\n return new static(array_merge($this->all(), $items));\n }\n\n", "meta": {"filepath": "src/Illuminate/Support/ValidatedInput.php", "language": "php", "file_size": 4732, "cut_index": 614, "middle_length": 229}} {"prefix": ";\nuse Illuminate\\Contracts\\Support\\MessageBag as MessageBagContract;\nuse Stringable;\n\n/**\n * @mixin \\Illuminate\\Contracts\\Support\\MessageBag\n */\nclass ViewErrorBag implements Countable, Stringable\n{\n /**\n * The array of the view error bags.\n *\n * @var array\n */\n protected $bags = [];\n\n /**\n * Checks if a named MessageBag exists in the bags.\n *\n * @param string $key\n * @return bool\n */\n public function hasBag(", "suffix": " public function getBag($key)\n {\n return Arr::get($this->bags, $key) ?: new MessageBag;\n }\n\n /**\n * Get all the bags.\n *\n * @return array\n */\n public function getBags()\n ", "middle": "$key = 'default')\n {\n return isset($this->bags[$key]);\n }\n\n /**\n * Get a MessageBag instance from the bags.\n *\n * @param string $key\n * @return \\Illuminate\\Contracts\\Support\\MessageBag\n */\n ", "meta": {"filepath": "src/Illuminate/Support/ViewErrorBag.php", "language": "php", "file_size": 2755, "cut_index": 563, "middle_length": 229}} {"prefix": "pace Illuminate\\Support\\Traits;\n\nuse Illuminate\\Contracts\\Container\\Container;\nuse Illuminate\\Support\\Fluent;\n\ntrait CapsuleManagerTrait\n{\n /**\n * The current globally used instance.\n *\n * @var object\n */\n protected static $instance;\n\n /**\n * The container instance.\n *\n * @var \\Illuminate\\Contracts\\Container\\Container\n */\n protected $container;\n\n /**\n * Setup the IoC container instance.\n *\n * @param \\Illuminate\\Contracts\\Container\\Container $conta", "suffix": "'config', new Fluent);\n }\n }\n\n /**\n * Make this capsule instance available globally.\n *\n * @return void\n */\n public function setAsGlobal()\n {\n static::$instance = $this;\n }\n\n /**\n * Get the IoC container ", "middle": "iner\n * @return void\n */\n protected function setupContainer(Container $container)\n {\n $this->container = $container;\n\n if (! $this->container->bound('config')) {\n $this->container->instance(", "meta": {"filepath": "src/Illuminate/Support/Traits/CapsuleManagerTrait.php", "language": "php", "file_size": 1431, "cut_index": 524, "middle_length": 229}} {"prefix": "ixed $keys\n * @return array\n */\n abstract public function all($keys = null);\n\n /**\n * Retrieve data from the instance.\n *\n * @param string|null $key\n * @param mixed $default\n * @return mixed\n */\n abstract protected function data($key = null, $default = null);\n\n /**\n * Determine if the data contains a given key.\n *\n * @param string|array $key\n * @return bool\n */\n public function exists($key)\n {\n return $this->has($key);\n }", "suffix": " $data = $this->all();\n\n foreach ($keys as $value) {\n if (! Arr::has($data, $value)) {\n return false;\n }\n }\n\n return true;\n }\n\n /**\n * Determine if the instance contains any of the given", "middle": "\n\n /**\n * Determine if the data contains a given key.\n *\n * @param string|array $key\n * @return bool\n */\n public function has($key)\n {\n $keys = is_array($key) ? $key : func_get_args();\n\n ", "meta": {"filepath": "src/Illuminate/Support/Traits/InteractsWithData.php", "language": "php", "file_size": 11130, "cut_index": 921, "middle_length": 229}} {"prefix": "ception;\nuse ReflectionClass;\n\ntrait ReadsClassAttributes\n{\n /**\n * Get a configuration value from an attribute, falling back to a property.\n *\n * @param object $target\n * @param class-string $attributeClass\n * @param string|null $property\n * @param mixed $default\n * @return mixed\n */\n protected function getAttributeValue($target, string $attributeClass, ?string $property = null, $default = null)\n {\n $reflection = new ReflectionClass($target);\n\n ", "suffix": " if ($instance = $this->getAttributeInstance($target, $attributeClass)) {\n return $this->extractAttributeValue($instance);\n }\n\n return $target->{$property} ?? $default;\n }\n\n /**\n * Extract the value from an attribute ins", "middle": " $defaultProperties = $reflection->getDefaultProperties();\n\n if (isset($target->{$property}) && $target->{$property} !== ($defaultProperties[$property] ?? null)) {\n return $target->{$property};\n }\n\n ", "meta": {"filepath": "src/Illuminate/Support/Traits/ReadsClassAttributes.php", "language": "php", "file_size": 2040, "cut_index": 563, "middle_length": 229}} {"prefix": "(\\UnitEnum|string|null $name = null)\n * @method static \\Illuminate\\Auth\\SessionGuard createSessionDriver(string $name, array $config)\n * @method static \\Illuminate\\Auth\\TokenGuard createTokenDriver(string $name, array $config)\n * @method static string getDefaultDriver()\n * @method static void shouldUse(\\UnitEnum|string|null $name)\n * @method static void setDefaultDriver(\\UnitEnum|string $name)\n * @method static \\Illuminate\\Auth\\AuthManager viaRequest(string $driver, callable $callback)\n * @method static \\Cl", "suffix": "\\Auth\\AuthManager provider(string $name, \\Closure $callback)\n * @method static bool hasResolvedGuards()\n * @method static \\Illuminate\\Auth\\AuthManager forgetGuards()\n * @method static \\Illuminate\\Auth\\AuthManager setApplication(\\Illuminate\\Contracts\\Founda", "middle": "osure userResolver()\n * @method static \\Illuminate\\Auth\\AuthManager resolveUsersUsing(\\Closure $userResolver)\n * @method static \\Illuminate\\Auth\\AuthManager extend(string $driver, \\Closure $callback)\n * @method static \\Illuminate", "meta": {"filepath": "src/Illuminate/Support/Facades/Auth.php", "language": "php", "file_size": 5190, "cut_index": 716, "middle_length": 229}} {"prefix": "lluminate\\Contracts\\Broadcasting\\Factory as BroadcastingFactoryContract;\n\n/**\n * @method static void routes(array|null $attributes = null)\n * @method static void userRoutes(array|null $attributes = null)\n * @method static void channelRoutes(array|null $attributes = null)\n * @method static string|null socket(\\Illuminate\\Http\\Request|null $request = null)\n * @method static \\Illuminate\\Broadcasting\\AnonymousEvent on(\\Illuminate\\Broadcasting\\Channel|array|string $channels)\n * @method static \\Illuminate\\Broadcas", "suffix": "atic void queue(mixed $event)\n * @method static mixed connection(\\UnitEnum|string|null $name = null)\n * @method static mixed driver(\\UnitEnum|string|null $name = null)\n * @method static \\Pusher\\Pusher pusher(array $config)\n * @method static \\Ably\\AblyRest ", "middle": "ting\\AnonymousEvent private(string $channel)\n * @method static \\Illuminate\\Broadcasting\\AnonymousEvent presence(string $channel)\n * @method static \\Illuminate\\Broadcasting\\PendingBroadcast event(mixed $event = null)\n * @method st", "meta": {"filepath": "src/Illuminate/Support/Facades/Broadcast.php", "language": "php", "file_size": 2813, "cut_index": 563, "middle_length": 229}} {"prefix": "ache\\Repository driver(\\UnitEnum|string|null $driver = null)\n * @method static \\Illuminate\\Contracts\\Cache\\Repository memo(\\UnitEnum|string|null $driver = null)\n * @method static \\Illuminate\\Contracts\\Cache\\Repository resolve(string $name)\n * @method static \\Illuminate\\Cache\\Repository build(array $config)\n * @method static \\Illuminate\\Cache\\Repository repository(\\Illuminate\\Contracts\\Cache\\Store $store, array $config = [])\n * @method static void refreshEventDispatcher()\n * @method static string getDefaultD", "suffix": "ame = null)\n * @method static \\Illuminate\\Cache\\CacheManager extend(string $driver, \\Closure $callback)\n * @method static \\Illuminate\\Cache\\CacheManager setApplication(\\Illuminate\\Contracts\\Foundation\\Application $app)\n * @method static void handleUnserial", "middle": "river()\n * @method static void setDefaultDriver(\\UnitEnum|string $name)\n * @method static \\Illuminate\\Cache\\CacheManager forgetDriver(array|\\UnitEnum|string|null $name = null)\n * @method static void purge(\\UnitEnum|string|null $n", "meta": {"filepath": "src/Illuminate/Support/Facades/Cache.php", "language": "php", "file_size": 6041, "cut_index": 716, "middle_length": 229}} {"prefix": "pace Illuminate\\Support\\Facades;\n\nuse Illuminate\\Concurrency\\ConcurrencyManager;\n\n/**\n * @method static mixed driver(\\UnitEnum|string|null $name = null)\n * @method static \\Illuminate\\Concurrency\\ProcessDriver createProcessDriver()\n * @method static \\Illuminate\\Concurrency\\ForkDriver createForkDriver()\n * @method static \\Illuminate\\Concurrency\\SyncDriver createSyncDriver()\n * @method static string getDefaultInstance()\n * @method static void setDefaultInstance(string $name)\n * @method static array getInstance", "suffix": "$name = null)\n * @method static \\Illuminate\\Concurrency\\ConcurrencyManager extend(string $name, \\Closure $callback)\n * @method static \\Illuminate\\Concurrency\\ConcurrencyManager setApplication(\\Illuminate\\Contracts\\Foundation\\Application $app)\n * @method st", "middle": "Config(string $name)\n * @method static mixed instance(string|null $name = null)\n * @method static \\Illuminate\\Concurrency\\ConcurrencyManager forgetInstance(array|string|null $name = null)\n * @method static void purge(string|null ", "meta": {"filepath": "src/Illuminate/Support/Facades/Concurrency.php", "language": "php", "file_size": 1479, "cut_index": 524, "middle_length": 229}} {"prefix": "pace Illuminate\\Support\\Facades;\n\n/**\n * @method static bool has(string $key)\n * @method static mixed get(array|string $key, mixed $default = null)\n * @method static array getMany(array $keys)\n * @method static string string(string $key, \\Closure|string|null $default = null)\n * @method static int integer(string $key, \\Closure|int|null $default = null)\n * @method static float float(string $key, \\Closure|float|null $default = null)\n * @method static bool boolean(string $key, \\Closure|bool|null $default = null", "suffix": "ng $key, mixed $value = null)\n * @method static void prepend(string $key, mixed $value)\n * @method static void push(string $key, mixed $value)\n * @method static array all()\n * @method static void macro(string $name, object|callable $macro)\n * @method stati", "middle": ")\n * @method static array array(string $key, \\Closure|array|null $default = null)\n * @method static \\Illuminate\\Support\\Collection collection(string $key, \\Closure|array|null $default = null)\n * @method static void set(array|stri", "meta": {"filepath": "src/Illuminate/Support/Facades/Config.php", "language": "php", "file_size": 1400, "cut_index": 524, "middle_length": 229}} {"prefix": ", string $cipher)\n * @method static string generateKey(string $cipher)\n * @method static string encrypt(mixed $value, bool $serialize = true)\n * @method static string encryptString(string $value)\n * @method static mixed decrypt(string $payload, bool $unserialize = true)\n * @method static string decryptString(string $payload)\n * @method static bool appearsEncrypted(mixed $value)\n * @method static string getKey()\n * @method static array getAllKeys()\n * @method static array getPreviousKeys()\n * @method static ", "suffix": "$keys)\n *\n * @see \\Illuminate\\Encryption\\Encrypter\n */\nclass Crypt extends Facade\n{\n /**\n * Get the registered name of the component.\n *\n * @return string\n */\n protected static function getFacadeAccessor()\n {\n return 'encryp", "middle": "\\Illuminate\\Encryption\\Encrypter previousKeys(array ", "meta": {"filepath": "src/Illuminate/Support/Facades/Crypt.php", "language": "php", "file_size": 928, "cut_index": 606, "middle_length": 52}} {"prefix": "te\\Support;\n\nuse Throwable;\n\nclass Timebox\n{\n /**\n * Indicates if the timebox is allowed to return early.\n *\n * @var bool\n */\n public $earlyReturn = false;\n\n /**\n * Invoke the given callback within the specified timebox minimum.\n *\n * @template TCallReturnType\n *\n * @param (callable($this): TCallReturnType) $callback\n * @param int $microseconds\n * @return TCallReturnType\n *\n * @throws \\Throwable\n */\n public function call(callable $callb", "suffix": "\n $remainder = (int) ($microseconds - ((microtime(true) - $start) * 1_000_000));\n\n if (! $this->earlyReturn && $remainder > 0) {\n $this->usleep($remainder);\n }\n\n if ($exception) {\n throw $exception;\n ", "middle": "ack, int $microseconds)\n {\n $exception = null;\n\n $start = microtime(true);\n\n try {\n $result = $callback($this);\n } catch (Throwable $caught) {\n $exception = $caught;\n }\n", "meta": {"filepath": "src/Illuminate/Support/Timebox.php", "language": "php", "file_size": 1698, "cut_index": 537, "middle_length": 229}} {"prefix": "inate\\Support\\Defer\\DeferredCallback;\nuse Illuminate\\Support\\Defer\\DeferredCallbackCollection;\nuse Illuminate\\Support\\Facades\\Date;\nuse Symfony\\Component\\Process\\PhpExecutableFinder;\n\nif (! function_exists('Illuminate\\Support\\defer')) {\n /**\n * Defer execution of the given callback.\n *\n * @param callable|null $callback\n * @param string|null $name\n * @param bool $always\n * @return ($callback is null ? \\Illuminate\\Support\\Defer\\DeferredCallbackCollection : \\Illuminate\\Support\\", "suffix": "p(DeferredCallbackCollection::class);\n }\n\n return tap(\n new DeferredCallback($callback, $name, $always),\n fn ($deferred) => app(DeferredCallbackCollection::class)[] = $deferred\n );\n }\n}\n\nif (! function_exists('", "middle": "Defer\\DeferredCallback)\n */\n function defer(?callable $callback = null, ?string $name = null, bool $always = false): DeferredCallback|DeferredCallbackCollection\n {\n if ($callback === null) {\n return ap", "meta": {"filepath": "src/Illuminate/Support/functions.php", "language": "php", "file_size": 4241, "cut_index": 614, "middle_length": 229}} {"prefix": "te\\Support\\Traits;\n\nuse BadMethodCallException;\nuse Error;\n\ntrait ForwardsCalls\n{\n /**\n * Forward a method call to the given object.\n *\n * @param mixed $object\n * @param string $method\n * @param array $parameters\n * @return mixed\n *\n * @throws \\BadMethodCallException\n */\n protected function forwardCallTo($object, $method, $parameters)\n {\n try {\n return $object->{$method}(...$parameters);\n } catch (Error|BadMethodCallException $e) {\n", "suffix": "hes['class'] != get_class($object) ||\n $matches['method'] != $method) {\n throw $e;\n }\n\n static::throwBadMethodCallException($method);\n }\n }\n\n /**\n * Forward a method call to the given obj", "middle": " $pattern = '~^Call to undefined method (?P[^:]+)::(?P[^\\(]+)\\(\\)$~';\n\n if (! preg_match($pattern, $e->getMessage(), $matches)) {\n throw $e;\n }\n\n if ($matc", "meta": {"filepath": "src/Illuminate/Support/Traits/ForwardsCalls.php", "language": "php", "file_size": 1874, "cut_index": 537, "middle_length": 229}} {"prefix": "te\\Support\\Facades;\n\nuse Illuminate\\Contracts\\Console\\Kernel as ConsoleKernelContract;\n\n/**\n * @method static int handle(\\Symfony\\Component\\Console\\Input\\InputInterface $input, \\Symfony\\Component\\Console\\Output\\OutputInterface|null $output = null)\n * @method static void terminate(\\Symfony\\Component\\Console\\Input\\InputInterface $input, int $status)\n * @method static void whenCommandLifecycleIsLongerThan(\\DateTimeInterface|\\Carbon\\CarbonInterval|float|int $threshold, callable $handler)\n * @method static \\Illu", "suffix": "$callback)\n * @method static void registerCommand(\\Symfony\\Component\\Console\\Command\\Command $command)\n * @method static int call(\\Symfony\\Component\\Console\\Command\\Command|string $command, array $parameters = [], \\Symfony\\Component\\Console\\Output\\OutputIn", "middle": "minate\\Support\\Carbon|null commandStartedAt()\n * @method static \\Illuminate\\Console\\Scheduling\\Schedule resolveConsoleSchedule()\n * @method static \\Illuminate\\Foundation\\Console\\ClosureCommand command(string $signature, \\Closure ", "meta": {"filepath": "src/Illuminate/Support/Facades/Artisan.php", "language": "php", "file_size": 1952, "cut_index": 537, "middle_length": 229}} {"prefix": "te\\Support\\Testing\\Fakes\\BusFake;\n\n/**\n * @method static mixed dispatch(mixed $command)\n * @method static mixed dispatchSync(mixed $command, mixed $handler = null)\n * @method static mixed dispatchNow(mixed $command, mixed $handler = null)\n * @method static \\Illuminate\\Bus\\Batch|null findBatch(string $batchId)\n * @method static \\Illuminate\\Bus\\PendingBatch batch(\\Illuminate\\Support\\Collection|mixed $jobs)\n * @method static \\Illuminate\\Foundation\\Bus\\PendingChain chain(\\Illuminate\\Support\\Collection|array|nul", "suffix": "se(mixed $command, mixed $handler = null)\n * @method static \\Illuminate\\Bus\\Dispatcher pipeThrough(array $pipes)\n * @method static \\Illuminate\\Bus\\Dispatcher map(array $map)\n * @method static \\Illuminate\\Bus\\Dispatcher withDispatchingAfterResponses()\n * @m", "middle": "l $jobs = null)\n * @method static bool hasCommandHandler(mixed $command)\n * @method static mixed getCommandHandler(mixed $command)\n * @method static mixed dispatchToQueue(mixed $command)\n * @method static void dispatchAfterRespon", "meta": {"filepath": "src/Illuminate/Support/Facades/Bus.php", "language": "php", "file_size": 5340, "cut_index": 716, "middle_length": 229}} {"prefix": "tatic bool missing(string $key)\n * @method static bool hasHidden(string $key)\n * @method static bool missingHidden(string $key)\n * @method static array all()\n * @method static array allHidden()\n * @method static mixed get(string $key, mixed $default = null)\n * @method static mixed getHidden(string $key, mixed $default = null)\n * @method static mixed pull(string $key, mixed $default = null)\n * @method static mixed pullHidden(string $key, mixed $default = null)\n * @method static array only(array $keys)\n * @me", "suffix": "ll)\n * @method static \\Illuminate\\Log\\Context\\Repository addHidden(string|array $key, mixed $value = null)\n * @method static mixed remember(string $key, mixed $value)\n * @method static mixed rememberHidden(string $key, mixed $value)\n * @method static \\Illu", "middle": "thod static array onlyHidden(array $keys)\n * @method static array except(array $keys)\n * @method static array exceptHidden(array $keys)\n * @method static \\Illuminate\\Log\\Context\\Repository add(string|array $key, mixed $value = nu", "meta": {"filepath": "src/Illuminate/Support/Facades/Context.php", "language": "php", "file_size": 3475, "cut_index": 614, "middle_length": 229}} {"prefix": "cased words.\n *\n * @var array\n */\n protected static $studlyCache = [];\n\n /**\n * The callback that should be used to generate UUIDs.\n *\n * @var (callable(): \\Ramsey\\Uuid\\UuidInterface)|null\n */\n protected static $uuidFactory;\n\n /**\n * The callback that should be used to generate ULIDs.\n *\n * @var (callable(): \\Symfony\\Component\\Uid\\Ulid)|null\n */\n protected static $ulidFactory;\n\n /**\n * The callback that should be used to gener", "suffix": "* @return \\Illuminate\\Support\\Stringable\n */\n public static function of($string)\n {\n return new Stringable($string);\n }\n\n /**\n * Return the remainder of a string after the first occurrence of a given value.\n *\n * @param ", "middle": "ate random strings.\n *\n * @var (callable(int): string)|null\n */\n protected static $randomStringFactory;\n\n /**\n * Get a new stringable object from the given string.\n *\n * @param string $string\n ", "meta": {"filepath": "src/Illuminate/Support/Str.php", "language": "php", "file_size": 66174, "cut_index": 2151, "middle_length": 229}} {"prefix": "luminate\\Notifications\\ChannelManager;\nuse Illuminate\\Support\\Testing\\Fakes\\NotificationFake;\n\n/**\n * @method static void send(\\Illuminate\\Support\\Collection|mixed $notifiables, mixed $notification)\n * @method static void sendNow(\\Illuminate\\Support\\Collection|mixed $notifiables, mixed $notification, array|null $channels = null)\n * @method static mixed channel(\\UnitEnum|string|null $name = null)\n * @method static mixed driver(\\UnitEnum|string|null $driver = null)\n * @method static string getDefaultDriver()\n", "suffix": "r extend(string $driver, \\Closure $callback)\n * @method static array getDrivers()\n * @method static \\Illuminate\\Contracts\\Container\\Container getContainer()\n * @method static \\Illuminate\\Notifications\\ChannelManager setContainer(\\Illuminate\\Contracts\\Conta", "middle": " * @method static string deliversVia()\n * @method static void deliverVia(string $channel)\n * @method static \\Illuminate\\Notifications\\ChannelManager locale(string $locale)\n * @method static \\Illuminate\\Notifications\\ChannelManage", "meta": {"filepath": "src/Illuminate/Support/Facades/Notification.php", "language": "php", "file_size": 4138, "cut_index": 614, "middle_length": 229}} {"prefix": "lluminate\\Contracts\\Auth\\PasswordBroker;\n\n/**\n * @method static \\Illuminate\\Contracts\\Auth\\PasswordBroker broker(\\UnitEnum|string|null $name = null)\n * @method static string getDefaultDriver()\n * @method static void setDefaultDriver(\\UnitEnum|string $name)\n * @method static string sendResetLink(array $credentials, \\Closure|null $callback = null)\n * @method static mixed reset(array $credentials, \\Closure $callback)\n * @method static \\Illuminate\\Contracts\\Auth\\CanResetPassword|null getUser(array $credentials)", "suffix": "ts\\Auth\\CanResetPassword $user, string $token)\n * @method static \\Illuminate\\Auth\\Passwords\\TokenRepositoryInterface getRepository()\n * @method static \\Illuminate\\Support\\Timebox getTimebox()\n *\n * @see \\Illuminate\\Auth\\Passwords\\PasswordBrokerManager\n * @", "middle": "\n * @method static string createToken(\\Illuminate\\Contracts\\Auth\\CanResetPassword $user)\n * @method static void deleteToken(\\Illuminate\\Contracts\\Auth\\CanResetPassword $user)\n * @method static bool tokenExists(\\Illuminate\\Contrac", "meta": {"filepath": "src/Illuminate/Support/Facades/Password.php", "language": "php", "file_size": 2463, "cut_index": 563, "middle_length": 229}} {"prefix": "thod static \\Illuminate\\Process\\PendingProcess command(array|string $command)\n * @method static \\Illuminate\\Process\\PendingProcess path(string $path)\n * @method static \\Illuminate\\Process\\PendingProcess timeout(\\Carbon\\CarbonInterval|int $timeout)\n * @method static \\Illuminate\\Process\\PendingProcess idleTimeout(\\Carbon\\CarbonInterval|int $timeout)\n * @method static \\Illuminate\\Process\\PendingProcess forever()\n * @method static \\Illuminate\\Process\\PendingProcess env(array $environment)\n * @method static \\Ill", "suffix": "e)\n * @method static \\Illuminate\\Process\\PendingProcess options(array $options)\n * @method static \\Illuminate\\Contracts\\Process\\ProcessResult run(array|string|null $command = null, callable|null $output = null)\n * @method static \\Illuminate\\Process\\Invoked", "middle": "uminate\\Process\\PendingProcess input(\\Traversable|resource|string|int|float|bool|null $input)\n * @method static \\Illuminate\\Process\\PendingProcess quietly()\n * @method static \\Illuminate\\Process\\PendingProcess tty(bool $tty = tru", "meta": {"filepath": "src/Illuminate/Support/Facades/Process.php", "language": "php", "file_size": 4225, "cut_index": 614, "middle_length": 229}} {"prefix": "ull)\n * @method static string getPath()\n * @method static void setPath(string $path)\n * @method static string compileString(string $value)\n * @method static string render(string $string, array $data = [], bool $deleteCachedView = false)\n * @method static string renderComponent(\\Illuminate\\View\\Component $component)\n * @method static string stripParentheses(string $expression)\n * @method static void extend(callable $compiler)\n * @method static array getExtensions()\n * @method static void if(string $name, cal", "suffix": ", string $prefix = '')\n * @method static array getClassComponentAliases()\n * @method static void anonymousComponentPath(string $path, string|null $prefix = null)\n * @method static void anonymousComponentNamespace(string $directory, string|null $prefix = nu", "middle": "lable $callback)\n * @method static bool check(string $name, mixed ...$parameters)\n * @method static void component(string $class, string|null $alias = null, string $prefix = '')\n * @method static void components(array $components", "meta": {"filepath": "src/Illuminate/Support/Facades/Blade.php", "language": "php", "file_size": 3135, "cut_index": 614, "middle_length": 229}} {"prefix": "* @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)\n * @method static \\Symfony\\Component\\HttpFoundation\\Cookie forever(string $name, string $value, string|null $path = null, string|null $domain = null, bool|null $secure = null, bool $httpOnly = true, bool $raw = false, string|null $sameSite = null)\n *", "suffix": "y\\Component\\HttpFoundation\\Cookie|null queued(string $key, mixed $default = null, string|null $path = null)\n * @method static void queue(mixed ...$parameters)\n * @method static void expire(string $name, string|null $path = null, string|null $domain = null)", "middle": " @method static \\Symfony\\Component\\HttpFoundation\\Cookie forget(string $name, string|null $path = null, string|null $domain = null)\n * @method static bool hasQueued(string $key, string|null $path = null)\n * @method static \\Symfon", "meta": {"filepath": "src/Illuminate/Support/Facades/Cookie.php", "language": "php", "file_size": 2449, "cut_index": 563, "middle_length": 229}} {"prefix": "luminate\\Support\\Sleep;\nuse Illuminate\\Support\\Str;\nuse Illuminate\\Support\\Stringable as SupportStringable;\n\nif (! function_exists('append_config')) {\n /**\n * Assign high numeric IDs to a config item to force appending.\n *\n * @param array $array\n */\n function append_config(array $array): array\n {\n $start = 9999;\n\n foreach ($array as $key => $value) {\n if (is_numeric($key)) {\n $start++;\n\n $array[$start] = Arr::pull($array, $key", "suffix": "assert-if-true !=numeric|bool $value\n *\n * @param mixed $value\n */\n function blank($value): bool\n {\n if (is_null($value)) {\n return true;\n }\n\n if (is_string($value)) {\n return trim($value) === ", "middle": ");\n }\n }\n\n return $array;\n }\n}\n\nif (! function_exists('blank')) {\n /**\n * Determine if the given value is \"blank\".\n *\n * @phpstan-assert-if-false !=null|'' $value\n *\n * @phpstan-", "meta": {"filepath": "src/Illuminate/Support/helpers.php", "language": "php", "file_size": 13667, "cut_index": 921, "middle_length": 229}} {"prefix": ".php\n *\n * @method static mixed use(mixed $handler)\n * @method static void useDefault()\n * @method static void useCallable(callable $callable)\n * @method static void useClass(string $dateClass)\n * @method static void useFactory(object $factory)\n * @method static bool canBeCreatedFromFormat(?string $date, string $format)\n * @method static \\Illuminate\\Support\\Carbon|null create($year = 0, $month = 1, $day = 1, $hour = 0, $minute = 0, $second = 0, $timezone = null)\n * @method static \\Illuminate\\Support\\Carbon ", "suffix": "ateFromIsoFormat(string $format, string $time, $timezone = null, ?string $locale = 'en', ?\\Symfony\\Contracts\\Translation\\TranslatorInterface $translator = null)\n * @method static \\Illuminate\\Support\\Carbon|null createFromLocaleFormat(string $format, string", "middle": "createFromDate($year = null, $month = null, $day = null, $timezone = null)\n * @method static \\Illuminate\\Support\\Carbon|null createFromFormat($format, $time, $timezone = null)\n * @method static \\Illuminate\\Support\\Carbon|null cre", "meta": {"filepath": "src/Illuminate/Support/Facades/Date.php", "language": "php", "file_size": 8379, "cut_index": 716, "middle_length": 229}} {"prefix": "eException;\n\nabstract class Facade\n{\n /**\n * The application instance being facaded.\n *\n * @var \\Illuminate\\Contracts\\Foundation\\Application|null\n */\n protected static $app;\n\n /**\n * The resolved object instances.\n *\n * @var array\n */\n protected static $resolvedInstance;\n\n /**\n * Indicates if the resolved instance should be cached.\n *\n * @var bool\n */\n protected static $cached = true;\n\n /**\n * Run a Closure when the facade has been res", "suffix": "sor) === true) {\n $callback(static::getFacadeRoot(), static::$app);\n }\n\n static::$app->afterResolving($accessor, function ($service, $app) use ($callback) {\n $callback($service, $app);\n });\n }\n\n /**\n * C", "middle": "olved.\n *\n * @param \\Closure $callback\n * @return void\n */\n public static function resolved(Closure $callback)\n {\n $accessor = static::getFacadeAccessor();\n\n if (static::$app->resolved($acces", "meta": {"filepath": "src/Illuminate/Support/Facades/Facade.php", "language": "php", "file_size": 9330, "cut_index": 921, "middle_length": 229}} {"prefix": "od static bool missing(string $path)\n * @method static string get(string $path, bool $lock = false)\n * @method static array json(string $path, int $flags = 0, bool $lock = false)\n * @method static string sharedGet(string $path)\n * @method static mixed getRequire(string $path, array $data = [])\n * @method static mixed requireOnce(string $path, array $data = [])\n * @method static \\Illuminate\\Support\\LazyCollection lines(string $path)\n * @method static string|false hash(string $path, string $algorithm = 'md5')", "suffix": "rray|string $replace, string $path)\n * @method static int prepend(string $path, string $data)\n * @method static int append(string $path, string $data, bool $lock = false)\n * @method static mixed chmod(string $path, int|null $mode = null)\n * @method static ", "middle": "\n * @method static int|bool put(string $path, string $contents, bool $lock = false)\n * @method static void replace(string $path, string $content, int|null $mode = null)\n * @method static void replaceInFile(array|string $search, a", "meta": {"filepath": "src/Illuminate/Support/Facades/File.php", "language": "php", "file_size": 4026, "cut_index": 614, "middle_length": 229}} {"prefix": "t\\Factory globalOptions(\\Closure|array $options)\n * @method static \\GuzzleHttp\\Promise\\PromiseInterface response(array|string|null $body = null, int $status = 200, array $headers = [])\n * @method static \\GuzzleHttp\\Psr7\\Response psr7Response(array|string|null $body = null, int $status = 200, array $headers = [])\n * @method static \\Illuminate\\Http\\Client\\RequestException failedRequest(array|string|null $body = null, int $status = 200, array $headers = [])\n * @method static \\Closure failedConnection(string|nu", "suffix": "array|null $only = null)\n * @method static \\Illuminate\\Http\\Client\\Factory record()\n * @method static void recordRequestResponsePair(\\Illuminate\\Http\\Client\\Request $request, \\Illuminate\\Http\\Client\\Response|null $response)\n * @method static void assertSen", "middle": "ll $message = null)\n * @method static \\Illuminate\\Http\\Client\\ResponseSequence sequence(array $responses = [])\n * @method static bool preventingStrayRequests()\n * @method static \\Illuminate\\Http\\Client\\Factory allowStrayRequests(", "meta": {"filepath": "src/Illuminate/Support/Facades/Http.php", "language": "php", "file_size": 11002, "cut_index": 921, "middle_length": 229}} {"prefix": "* @method static \\Psr\\Log\\LoggerInterface build(array $config)\n * @method static \\Psr\\Log\\LoggerInterface stack(array $channels, string|null $channel = null)\n * @method static \\Psr\\Log\\LoggerInterface channel(\\UnitEnum|string|null $channel = null)\n * @method static \\Psr\\Log\\LoggerInterface driver(\\UnitEnum|string|null $driver = null)\n * @method static \\Illuminate\\Log\\LogManager shareContext(array $context)\n * @method static array sharedContext()\n * @method static \\Illuminate\\Log\\LogManager withoutContext(st", "suffix": "inate\\Log\\LogManager extend(string $driver, \\Closure $callback)\n * @method static void forgetChannel(string|null $driver = null)\n * @method static array getChannels()\n * @method static void emergency(string|\\Stringable $message, array $context = [])\n * @me", "middle": "ring[]|null $keys = null)\n * @method static \\Illuminate\\Log\\LogManager flushSharedContext()\n * @method static string|null getDefaultDriver()\n * @method static void setDefaultDriver(\\UnitEnum|string $name)\n * @method static \\Illum", "meta": {"filepath": "src/Illuminate/Support/Facades/Log.php", "language": "php", "file_size": 2909, "cut_index": 563, "middle_length": 229}} {"prefix": "n\\MaintenanceModeManager;\n\n/**\n * @method static string getDefaultDriver()\n * @method static mixed driver(\\UnitEnum|string|null $driver = null)\n * @method static \\Illuminate\\Foundation\\MaintenanceModeManager extend(string $driver, \\Closure $callback)\n * @method static array getDrivers()\n * @method static \\Illuminate\\Contracts\\Container\\Container getContainer()\n * @method static \\Illuminate\\Foundation\\MaintenanceModeManager setContainer(\\Illuminate\\Contracts\\Container\\Container $container)\n * @method static ", "suffix": "Drivers()\n *\n * @see \\Illuminate\\Foundation\\MaintenanceModeManager\n */\nclass MaintenanceMode extends Facade\n{\n /**\n * Get the registered name of the component.\n *\n * @return string\n */\n protected static function getFacadeAccessor()\n ", "middle": "\\Illuminate\\Foundation\\MaintenanceModeManager forget", "meta": {"filepath": "src/Illuminate/Support/Facades/MaintenanceMode.php", "language": "php", "file_size": 948, "cut_index": 582, "middle_length": 52}} {"prefix": "pace Illuminate\\Support\\Facades;\n\n/**\n * @method static void resolveOptionsUsing(\\Closure|null $resolver)\n * @method static void resolveTokenUsing(\\Closure|null $resolver)\n * @method static void setUpProcess(callable $callback)\n * @method static void setUpTestCase(callable $callback)\n * @method static void setUpTestDatabaseBeforeMigrating(callable $callback)\n * @method static void setUpTestDatabase(callable $callback)\n * @method static void tearDownProcess(callable $callback)\n * @method static void tearDown", "suffix": "reMigratingCallbacks(string $database)\n * @method static void callSetUpTestDatabaseCallbacks(string $database)\n * @method static void callTearDownProcessCallbacks()\n * @method static void callTearDownTestCaseCallbacks(\\Illuminate\\Foundation\\Testing\\TestCas", "middle": "TestCase(callable $callback)\n * @method static void callSetUpProcessCallbacks()\n * @method static void callSetUpTestCaseCallbacks(\\Illuminate\\Foundation\\Testing\\TestCase $testCase)\n * @method static void callSetUpTestDatabaseBefo", "meta": {"filepath": "src/Illuminate/Support/Facades/ParallelTesting.php", "language": "php", "file_size": 1415, "cut_index": 524, "middle_length": 229}} {"prefix": "ng(string $bootstrapper, \\Closure $callback)\n * @method static void afterBootstrapping(string $bootstrapper, \\Closure $callback)\n * @method static bool hasBeenBootstrapped()\n * @method static \\Illuminate\\Foundation\\Application setBasePath(string $basePath)\n * @method static string path(string $path = '')\n * @method static \\Illuminate\\Foundation\\Application useAppPath(string $path)\n * @method static string basePath(string $path = '')\n * @method static string bootstrapPath(string $path = '')\n * @method static", "suffix": "seConfigPath(string $path)\n * @method static string databasePath(string $path = '')\n * @method static \\Illuminate\\Foundation\\Application useDatabasePath(string $path)\n * @method static string langPath(string $path = '')\n * @method static \\Illuminate\\Founda", "middle": " string getBootstrapProvidersPath()\n * @method static \\Illuminate\\Foundation\\Application useBootstrapPath(string $path)\n * @method static string configPath(string $path = '')\n * @method static \\Illuminate\\Foundation\\Application u", "meta": {"filepath": "src/Illuminate/Support/Facades/App.php", "language": "php", "file_size": 9787, "cut_index": 921, "middle_length": 229}} {"prefix": "te\\Support;\n\nuse Illuminate\\Contracts\\Support\\Arrayable;\nuse Illuminate\\Support\\Traits\\InteractsWithData;\nuse League\\Uri\\QueryString;\nuse Stringable;\n\nclass UriQueryString implements Arrayable, Stringable\n{\n use InteractsWithData;\n\n /**\n * Create a new URI query string instance.\n */\n public function __construct(protected Uri $uri)\n {\n //\n }\n\n /**\n * Retrieve all data from the instance.\n *\n * @param mixed $keys\n * @return array\n */\n public function al", "suffix": ":set($results, $key, Arr::get($query, $key));\n }\n\n return $results;\n }\n\n /**\n * Retrieve data from the instance.\n *\n * @param string|null $key\n * @param mixed $default\n * @return mixed\n */\n protected funct", "middle": "l($keys = null)\n {\n $query = $this->toArray();\n\n if (! $keys) {\n return $query;\n }\n\n $results = [];\n\n foreach (is_array($keys) ? $keys : func_get_args() as $key) {\n Arr:", "meta": {"filepath": "src/Illuminate/Support/UriQueryString.php", "language": "php", "file_size": 1984, "cut_index": 537, "middle_length": 229}} {"prefix": "llable|array|string $events, \\Illuminate\\Events\\QueuedClosure|callable|array|string|null $listener = null)\n * @method static bool hasListeners(string $eventName)\n * @method static bool hasWildcardListeners(string $eventName)\n * @method static void push(string $event, object|array $payload = [])\n * @method static void flush(string $event)\n * @method static void subscribe(object|string $subscriber)\n * @method static array|null until(string|object $event, mixed $payload = [])\n * @method static array|null dispa", "suffix": "d static \\Closure createClassListener(string $listener, bool $wildcard = false)\n * @method static void forget(string $event)\n * @method static void forgetPushed()\n * @method static \\Illuminate\\Events\\Dispatcher setQueueResolver(callable $resolver)\n * @meth", "middle": "tch(string|object $event, mixed $payload = [], bool $halt = false)\n * @method static array getListeners(string $eventName)\n * @method static \\Closure makeListener(\\Closure|string|array $listener, bool $wildcard = false)\n * @metho", "meta": {"filepath": "src/Illuminate/Support/Facades/Event.php", "language": "php", "file_size": 5194, "cut_index": 716, "middle_length": 229}} {"prefix": "pace Illuminate\\Support\\Facades;\n\n/**\n * @method static \\Illuminate\\Hashing\\BcryptHasher createBcryptDriver()\n * @method static \\Illuminate\\Hashing\\ArgonHasher createArgonDriver()\n * @method static \\Illuminate\\Hashing\\Argon2IdHasher createArgon2idDriver()\n * @method static array info(string $hashedValue)\n * @method static string make(string $value, array $options = [])\n * @method static bool check(string $value, string $hashedValue, array $options = [])\n * @method static bool needsRehash(string $hashedValue", "suffix": "ger extend(string $driver, \\Closure $callback)\n * @method static array getDrivers()\n * @method static \\Illuminate\\Contracts\\Container\\Container getContainer()\n * @method static \\Illuminate\\Hashing\\HashManager setContainer(\\Illuminate\\Contracts\\Container\\Co", "middle": ", array $options = [])\n * @method static bool isHashed(string $value)\n * @method static string getDefaultDriver()\n * @method static mixed driver(\\UnitEnum|string|null $driver = null)\n * @method static \\Illuminate\\Hashing\\HashMana", "meta": {"filepath": "src/Illuminate/Support/Facades/Hash.php", "language": "php", "file_size": 1394, "cut_index": 524, "middle_length": 229}} {"prefix": "static \\Illuminate\\Mail\\Mailer driver(\\UnitEnum|string|null $driver = null)\n * @method static \\Illuminate\\Mail\\Mailer build(array $config)\n * @method static \\Symfony\\Component\\Mailer\\Transport\\TransportInterface createSymfonyTransport(array $config)\n * @method static string getDefaultDriver()\n * @method static void setDefaultDriver(\\UnitEnum|string $name)\n * @method static void purge(\\UnitEnum|string|null $name = null)\n * @method static \\Illuminate\\Mail\\MailManager extend(string $driver, \\Closure $callback)", "suffix": "MailManager forgetMailers()\n * @method static void alwaysFrom(string $address, string|null $name = null)\n * @method static void alwaysReplyTo(string $address, string|null $name = null)\n * @method static void alwaysReturnPath(string $address)\n * @method sta", "middle": "\n * @method static \\Illuminate\\Contracts\\Foundation\\Application getApplication()\n * @method static \\Illuminate\\Mail\\MailManager setApplication(\\Illuminate\\Contracts\\Foundation\\Application $app)\n * @method static \\Illuminate\\Mail\\", "meta": {"filepath": "src/Illuminate/Support/Facades/Mail.php", "language": "php", "file_size": 5376, "cut_index": 716, "middle_length": 229}} {"prefix": "s All of the container bindings that should be registered.\n * @property array $singletons All of the singletons that should be registered.\n */\nabstract class ServiceProvider\n{\n /**\n * The application instance.\n *\n * @var \\Illuminate\\Contracts\\Foundation\\Application\n */\n protected $app;\n\n /**\n * All of the registered booting callbacks.\n *\n * @var array\n */\n protected $bootingCallbacks = [];\n\n /**\n * All of the registered booted callbacks.\n", "suffix": "e published by group.\n *\n * @var array\n */\n public static $publishGroups = [];\n\n /**\n * The migration paths available for publishing.\n *\n * @var array\n */\n protected static $publishableMigrationPaths = [];\n\n /**\n ", "middle": " *\n * @var array\n */\n protected $bootedCallbacks = [];\n\n /**\n * The paths that should be published.\n *\n * @var array\n */\n public static $publishes = [];\n\n /**\n * The paths that should b", "meta": {"filepath": "src/Illuminate/Support/ServiceProvider.php", "language": "php", "file_size": 17167, "cut_index": 921, "middle_length": 229}} {"prefix": "lluminate\\Contracts\\Auth\\Access\\Gate as GateContract;\n\n/**\n * @method static bool has(\\UnitEnum|array|string $ability)\n * @method static \\Illuminate\\Auth\\Access\\Response allowIf(\\Illuminate\\Auth\\Access\\Response|\\Closure|bool $condition, string|null $message = null, string|null $code = null)\n * @method static \\Illuminate\\Auth\\Access\\Response denyIf(\\Illuminate\\Auth\\Access\\Response|\\Closure|bool $condition, string|null $message = null, string|null $code = null)\n * @method static \\Illuminate\\Auth\\Access\\Gate d", "suffix": "olicy(string $class, string $policy)\n * @method static \\Illuminate\\Auth\\Access\\Gate before(callable $callback)\n * @method static \\Illuminate\\Auth\\Access\\Gate after(callable $callback)\n * @method static bool allows(iterable|\\UnitEnum|string $ability, mixed ", "middle": "efine(\\UnitEnum|string $ability, callable|array|string $callback)\n * @method static \\Illuminate\\Auth\\Access\\Gate resource(string $name, string $class, array|null $abilities = null)\n * @method static \\Illuminate\\Auth\\Access\\Gate p", "meta": {"filepath": "src/Illuminate/Support/Facades/Gate.php", "language": "php", "file_size": 2841, "cut_index": 563, "middle_length": 229}} {"prefix": "* @method static bool hasForLocale(string $key, string|null $locale = null)\n * @method static bool has(string $key, string|null $locale = null, bool $fallback = true)\n * @method static string|array get(string $key, array $replace = [], string|null $locale = null, bool $fallback = true)\n * @method static string choice(string $key, \\Countable|int|float|array $number, array $replace = [], string|null $locale = null)\n * @method static void addLines(array $lines, string $locale, string $namespace = '*')\n * @meth", "suffix": "ing $hint)\n * @method static void addPath(string $path)\n * @method static void addJsonPath(string $path)\n * @method static array parseKey(string $key)\n * @method static void determineLocalesUsing(callable $callback)\n * @method static \\Illuminate\\Translatio", "middle": "od static void load(string $namespace, string $group, string $locale)\n * @method static \\Illuminate\\Translation\\Translator handleMissingKeysUsing(callable|null $callback)\n * @method static void addNamespace(string $namespace, str", "meta": {"filepath": "src/Illuminate/Support/Facades/Lang.php", "language": "php", "file_size": 2172, "cut_index": 563, "middle_length": 229}} {"prefix": "uminate\\Support\\Arr;\nuse Illuminate\\Support\\Testing\\Fakes\\ExceptionHandlerFake;\n\n/**\n * @method static void register()\n * @method static \\Illuminate\\Foundation\\Exceptions\\ReportableHandler reportable(callable $reportUsing)\n * @method static \\Illuminate\\Foundation\\Exceptions\\Handler renderable(callable $renderUsing)\n * @method static \\Illuminate\\Foundation\\Exceptions\\Handler map(\\Closure|string $from, \\Closure|string|null $to = null)\n * @method static \\Illuminate\\Foundation\\Exceptions\\Handler dontReport(arra", "suffix": "atic \\Illuminate\\Foundation\\Exceptions\\Handler dontFlash(array|string $attributes)\n * @method static \\Illuminate\\Foundation\\Exceptions\\Handler level(string $type, string $level)\n * @method static void report(\\Throwable $e)\n * @method static bool isReportin", "middle": "y|string $exceptions)\n * @method static \\Illuminate\\Foundation\\Exceptions\\Handler dontReportWhen(callable $dontReportWhen)\n * @method static \\Illuminate\\Foundation\\Exceptions\\Handler ignore(array|string $exceptions)\n * @method st", "meta": {"filepath": "src/Illuminate/Support/Facades/Exceptions.php", "language": "php", "file_size": 3654, "cut_index": 614, "middle_length": 229}} {"prefix": "te\\Support\\Facades;\n\n/**\n * @method static \\Illuminate\\Pipeline\\Pipeline send(mixed $passable)\n * @method static \\Illuminate\\Pipeline\\Pipeline through(mixed $pipes)\n * @method static \\Illuminate\\Pipeline\\Pipeline pipe(mixed $pipes)\n * @method static \\Illuminate\\Pipeline\\Pipeline via(string $method)\n * @method static mixed then(\\Closure $destination)\n * @method static mixed thenReturn()\n * @method static \\Illuminate\\Pipeline\\Pipeline finally(\\Closure $callback)\n * @method static \\Illuminate\\Pipeline\\Pipeline", "suffix": "ipeline|mixed when(\\Closure|mixed|null $value = null, callable|null $callback = null, callable|null $default = null)\n * @method static \\Illuminate\\Pipeline\\Pipeline|mixed unless(\\Closure|mixed|null $value = null, callable|null $callback = null, callable|nu", "middle": " withinTransaction(string|null|\\UnitEnum|false $withinTransaction = null)\n * @method static \\Illuminate\\Pipeline\\Pipeline setContainer(\\Illuminate\\Contracts\\Container\\Container $container)\n * @method static \\Illuminate\\Pipeline\\P", "meta": {"filepath": "src/Illuminate/Support/Facades/Pipeline.php", "language": "php", "file_size": 1659, "cut_index": 537, "middle_length": 229}} {"prefix": "e\\Support\\Collection;\n\nclass DeferredCallbackCollection implements ArrayAccess, Countable\n{\n /**\n * All of the deferred callbacks.\n *\n * @var array\n */\n protected array $callbacks = [];\n\n /**\n * Get the first callback in the collection.\n *\n * @return callable\n */\n public function first()\n {\n return array_values($this->callbacks)[0];\n }\n\n /**\n * Invoke the deferred callbacks.\n *\n * @return void\n */\n public function invoke(): void\n", "suffix": "tion invokeWhen(?Closure $when = null): void\n {\n $when ??= fn () => true;\n\n $this->forgetDuplicates();\n\n foreach ($this->callbacks as $index => $callback) {\n if ($when($callback)) {\n rescue($callback);\n ", "middle": " {\n $this->invokeWhen(fn () => true);\n }\n\n /**\n * Invoke the deferred callbacks if the given truth test evaluates to true.\n *\n * @param \\Closure|null $when\n * @return void\n */\n public func", "meta": {"filepath": "src/Illuminate/Support/Defer/DeferredCallbackCollection.php", "language": "php", "file_size": 3335, "cut_index": 614, "middle_length": 229}} {"prefix": "n manager.\n *\n * @var \\Illuminate\\Session\\SessionManager\n */\n protected $manager;\n\n /**\n * The callback that can resolve an instance of the cache factory.\n *\n * @var callable|null\n */\n protected $cacheFactoryResolver;\n\n /**\n * Create a new session middleware.\n *\n * @param \\Illuminate\\Session\\SessionManager $manager\n * @param callable|null $cacheFactoryResolver\n */\n public function __construct(SessionManager $manager, ?callable $cacheFactoryR", "suffix": " * @param \\Closure $next\n * @return mixed\n */\n public function handle($request, Closure $next)\n {\n if (! $this->sessionConfigured()) {\n return $next($request);\n }\n\n $session = $this->getSession($request);\n\n ", "middle": "esolver = null)\n {\n $this->manager = $manager;\n $this->cacheFactoryResolver = $cacheFactoryResolver;\n }\n\n /**\n * Handle an incoming request.\n *\n * @param \\Illuminate\\Http\\Request $request\n ", "meta": {"filepath": "src/Illuminate/Session/Middleware/StartSession.php", "language": "php", "file_size": 9286, "cut_index": 921, "middle_length": 229}} {"prefix": "ack, array $parameters = [])\n * @method static \\Illuminate\\Console\\Scheduling\\Event command(\\Symfony\\Component\\Console\\Command\\Command|string $command, array $parameters = [])\n * @method static \\Illuminate\\Console\\Scheduling\\CallbackEvent job(object|string $job, \\UnitEnum|string|null $queue = null, \\UnitEnum|string|null $connection = null)\n * @method static \\Illuminate\\Console\\Scheduling\\Event exec(string $command, array $parameters = [])\n * @method static void group(\\Closure $events)\n * @method static stri", "suffix": "ate\\Contracts\\Foundation\\Application $app)\n * @method static \\Illuminate\\Console\\Scheduling\\Event[] events()\n * @method static \\Illuminate\\Console\\Scheduling\\Event[] eventsForEnvironments(array $environments)\n * @method static \\Illuminate\\Console\\Schedulin", "middle": "ng compileArrayInput(string|int $key, array $value)\n * @method static bool serverShouldRun(\\Illuminate\\Console\\Scheduling\\Event $event, \\DateTimeInterface $time)\n * @method static \\Illuminate\\Support\\Collection dueEvents(\\Illumin", "meta": {"filepath": "src/Illuminate/Support/Facades/Schedule.php", "language": "php", "file_size": 8334, "cut_index": 716, "middle_length": 229}} {"prefix": "ic string|null blockDriver()\n * @method static int defaultRouteBlockLockSeconds()\n * @method static int defaultRouteBlockWaitSeconds()\n * @method static array getSessionConfig()\n * @method static string|null getDefaultDriver()\n * @method static void setDefaultDriver(\\UnitEnum|string $name)\n * @method static mixed driver(\\UnitEnum|string|null $driver = null)\n * @method static \\Illuminate\\Session\\SessionManager extend(string $driver, \\Closure $callback)\n * @method static array getDrivers()\n * @method static \\", "suffix": "forgetDrivers()\n * @method static bool start()\n * @method static void save()\n * @method static void ageFlashData()\n * @method static array all()\n * @method static array only(array $keys)\n * @method static array except(array $keys)\n * @method static bool ex", "middle": "Illuminate\\Contracts\\Container\\Container getContainer()\n * @method static \\Illuminate\\Session\\SessionManager setContainer(\\Illuminate\\Contracts\\Container\\Container $container)\n * @method static \\Illuminate\\Session\\SessionManager ", "meta": {"filepath": "src/Illuminate/Support/Facades/Session.php", "language": "php", "file_size": 4121, "cut_index": 614, "middle_length": 229}} {"prefix": "ring current()\n * @method static string previous(mixed $fallback = false)\n * @method static string previousPath(mixed $fallback = false)\n * @method static string to(string $path, mixed $extra = [], bool|null $secure = null)\n * @method static string query(string $path, array $query = [], mixed $extra = [], bool|null $secure = null)\n * @method static string secure(string $path, array $parameters = [])\n * @method static string asset(string $path, bool|null $secure = null)\n * @method static string secureAsset(s", "suffix": "mixed $parameters = [], \\DateTimeInterface|\\DateInterval|int|null $expiration = null, bool $absolute = true)\n * @method static string temporarySignedRoute(\\BackedEnum|string $name, \\DateTimeInterface|\\DateInterval|int $expiration, array $parameters = [], b", "middle": "tring $path)\n * @method static string assetFrom(string $root, string $path, bool|null $secure = null)\n * @method static string formatScheme(bool|null $secure = null)\n * @method static string signedRoute(\\BackedEnum|string $name, ", "meta": {"filepath": "src/Illuminate/Support/Facades/URL.php", "language": "php", "file_size": 3980, "cut_index": 614, "middle_length": 229}} {"prefix": "te\\Support\\Facades;\n\n/**\n * @method static \\Illuminate\\Validation\\Validator make(array $data, array $rules, array $messages = [], array $attributes = [])\n * @method static array validate(array $data, array $rules, array $messages = [], array $attributes = [])\n * @method static void extend(string $rule, \\Closure|string $extension, string|null $message = null)\n * @method static void extendImplicit(string $rule, \\Closure|string $extension, string|null $message = null)\n * @method static void extendDependent(str", "suffix": "idatedArrayKeys()\n * @method static void resolver(\\Closure $resolver)\n * @method static \\Illuminate\\Contracts\\Translation\\Translator getTranslator()\n * @method static \\Illuminate\\Validation\\PresenceVerifierInterface getPresenceVerifier()\n * @method static ", "middle": "ing $rule, \\Closure|string $extension, string|null $message = null)\n * @method static void replacer(string $rule, \\Closure|string $replacer)\n * @method static void includeUnvalidatedArrayKeys()\n * @method static void excludeUnval", "meta": {"filepath": "src/Illuminate/Support/Facades/Validator.php", "language": "php", "file_size": 1576, "cut_index": 537, "middle_length": 229}} {"prefix": "* @method static array preloadedAssets()\n * @method static string|null cspNonce()\n * @method static string useCspNonce(string|null $nonce = null)\n * @method static \\Illuminate\\Foundation\\Vite useIntegrityKey(string|false $key)\n * @method static \\Illuminate\\Foundation\\Vite withEntryPoints(array $entryPoints)\n * @method static \\Illuminate\\Foundation\\Vite mergeEntryPoints(array $entryPoints)\n * @method static \\Illuminate\\Foundation\\Vite useManifestFilename(string $filename)\n * @method static \\Illuminate\\Founda", "suffix": "ring $path)\n * @method static \\Illuminate\\Foundation\\Vite useScriptTagAttributes(callable|array $attributes)\n * @method static \\Illuminate\\Foundation\\Vite useStyleTagAttributes(callable|array $attributes)\n * @method static \\Illuminate\\Foundation\\Vite usePr", "middle": "tion\\Vite createAssetPathsUsing(callable|null $resolver)\n * @method static string hotFile()\n * @method static \\Illuminate\\Foundation\\Vite useHotFile(string $path)\n * @method static \\Illuminate\\Foundation\\Vite useBuildDirectory(st", "meta": {"filepath": "src/Illuminate/Support/Facades/Vite.php", "language": "php", "file_size": 2584, "cut_index": 563, "middle_length": 229}} {"prefix": "ob types that should be dispatched instead of faked.\n *\n * @var array\n */\n protected $jobsToDispatch = [];\n\n /**\n * The fake repository to track batched jobs.\n *\n * @var \\Illuminate\\Bus\\BatchRepository\n */\n protected $batchRepository;\n\n /**\n * The commands that have been dispatched.\n *\n * @var array\n */\n protected $commands = [];\n\n /**\n * The commands that have been dispatched synchronously.\n *\n * @var array\n */\n protected $com", "suffix": "tched.\n *\n * @var array\n */\n protected $batches = [];\n\n /**\n * Indicates if commands should be serialized and restored when pushed to the Bus.\n *\n * @var bool\n */\n protected bool $serializeAndRestore = false;\n\n /**\n ", "middle": "mandsSync = [];\n\n /**\n * The commands that have been dispatched after the response has been sent.\n *\n * @var array\n */\n protected $commandsAfterResponse = [];\n\n /**\n * The batches that have been dispa", "meta": {"filepath": "src/Illuminate/Support/Testing/Fakes/BusFake.php", "language": "php", "file_size": 27292, "cut_index": 1331, "middle_length": 229}} {"prefix": "mixed $callback)\n * @method static void exceptionOccurred(mixed $callback)\n * @method static void looping(mixed $callback)\n * @method static void failing(mixed $callback)\n * @method static void starting(mixed $callback)\n * @method static void stopping(mixed $callback)\n * @method static void route(array|string $class, string|null $queue = null, string|null $connection = null)\n * @method static bool connected(\\UnitEnum|string|null $name = null)\n * @method static \\Illuminate\\Contracts\\Queue\\Queue connection(\\U", "suffix": "d resume(string $connection, string $queue)\n * @method static bool isPaused(string $connection, string $queue)\n * @method static array getPausedQueues(string $connection, array $queues)\n * @method static void withoutInterruptionPolling()\n * @method static ", "middle": "nitEnum|string|null $name = null)\n * @method static void pause(string $connection, string $queue)\n * @method static void pauseFor(string $connection, string $queue, \\DateTimeInterface|\\DateInterval|int $ttl)\n * @method static voi", "meta": {"filepath": "src/Illuminate/Support/Facades/Queue.php", "language": "php", "file_size": 8193, "cut_index": 716, "middle_length": 229}} {"prefix": "* @method static \\Illuminate\\Http\\RedirectResponse back(int $status = 302, array $headers = [], mixed $fallback = false)\n * @method static \\Illuminate\\Http\\RedirectResponse refresh(int $status = 302, array $headers = [])\n * @method static \\Illuminate\\Http\\RedirectResponse guest(string $path, int $status = 302, array $headers = [], bool|null $secure = null)\n * @method static \\Illuminate\\Http\\RedirectResponse intended(mixed $default = '/', int $status = 302, array $headers = [], bool|null $secure = null)\n * @", "suffix": "eaders = [])\n * @method static \\Illuminate\\Http\\RedirectResponse secure(string $path, int $status = 302, array $headers = [])\n * @method static \\Illuminate\\Http\\RedirectResponse route(\\BackedEnum|string $route, mixed $parameters = [], int $status = 302, ar", "middle": "method static \\Illuminate\\Http\\RedirectResponse to(string $path, int $status = 302, array $headers = [], bool|null $secure = null)\n * @method static \\Illuminate\\Http\\RedirectResponse away(string $path, int $status = 302, array $h", "meta": {"filepath": "src/Illuminate/Support/Facades/Redirect.php", "language": "php", "file_size": 2390, "cut_index": 563, "middle_length": 229}} {"prefix": "\\Support\\Collection;\nuse Illuminate\\Support\\Traits\\ForwardsCalls;\nuse Illuminate\\Support\\Traits\\ReflectsClosures;\nuse Illuminate\\Testing\\Assert;\nuse PHPUnit\\Framework\\Assert as PHPUnit;\nuse PHPUnit\\Framework\\ExpectationFailedException;\nuse Throwable;\n\n/**\n * @mixin \\Illuminate\\Foundation\\Exceptions\\Handler\n */\nclass ExceptionHandlerFake implements ExceptionHandler, Fake\n{\n use ForwardsCalls, ReflectsClosures;\n\n /**\n * All of the exceptions that have been reported.\n *\n * @var list<\\Throwabl", "suffix": "dler fake.\n *\n * @param \\Illuminate\\Contracts\\Debug\\ExceptionHandler $handler\n * @param list> $exceptions\n */\n public function __construct(\n protected ExceptionHandler $handler,\n protected array", "middle": "e>\n */\n protected $reported = [];\n\n /**\n * If the fake should throw exceptions when they are reported.\n *\n * @var bool\n */\n protected $throwOnReport = false;\n\n /**\n * Create a new exception han", "meta": {"filepath": "src/Illuminate/Support/Testing/Fakes/ExceptionHandlerFake.php", "language": "php", "file_size": 7123, "cut_index": 716, "middle_length": 229}} {"prefix": "tring $uri, array|string|callable|null $action = null)\n * @method static \\Illuminate\\Routing\\Route put(string $uri, array|string|callable|null $action = null)\n * @method static \\Illuminate\\Routing\\Route patch(string $uri, array|string|callable|null $action = null)\n * @method static \\Illuminate\\Routing\\Route delete(string $uri, array|string|callable|null $action = null)\n * @method static \\Illuminate\\Routing\\Route options(string $uri, array|string|callable|null $action = null)\n * @method static \\Illuminate\\Ro", "suffix": "ring $destination, int $status = 302)\n * @method static \\Illuminate\\Routing\\Route permanentRedirect(string $uri, string $destination)\n * @method static \\Illuminate\\Routing\\Route view(string $uri, string $view, array $data = [], int|array $status = 200, arr", "middle": "uting\\Route any(string $uri, array|string|callable|null $action = null)\n * @method static \\Illuminate\\Routing\\Route fallback(array|string|callable|null $action)\n * @method static \\Illuminate\\Routing\\Route redirect(string $uri, st", "meta": {"filepath": "src/Illuminate/Support/Facades/Route.php", "language": "php", "file_size": 8587, "cut_index": 716, "middle_length": 229}} {"prefix": "port\\Traits\\ForwardsCalls;\nuse Illuminate\\Support\\Traits\\ReflectsClosures;\nuse PHPUnit\\Framework\\Assert as PHPUnit;\n\nclass MailFake implements Factory, Fake, Mailer, MailQueue\n{\n use ForwardsCalls, ReflectsClosures;\n\n /**\n * The mailer instance.\n *\n * @var MailManager\n */\n public $manager;\n\n /**\n * The mailer currently being used to send a message.\n *\n * @var string\n */\n protected $currentMailer;\n\n /**\n * All of the mailables that have been sent.\n *\n", "suffix": " *\n * @param MailManager $manager\n */\n public function __construct(MailManager $manager)\n {\n $this->manager = $manager;\n $this->currentMailer = $manager->getDefaultDriver();\n }\n\n /**\n * Assert if a mailable was sen", "middle": " * @var array\n */\n protected $mailables = [];\n\n /**\n * All of the mailables that have been queued.\n *\n * @var array\n */\n protected $queuedMailables = [];\n\n /**\n * Create a new mail fake.\n ", "meta": {"filepath": "src/Illuminate/Support/Testing/Fakes/MailFake.php", "language": "php", "file_size": 16588, "cut_index": 921, "middle_length": 229}} {"prefix": "\nuse Closure;\nuse Illuminate\\Bus\\PendingBatch;\nuse Illuminate\\Support\\Collection;\nuse Illuminate\\Support\\Traits\\ReflectsClosures;\n\nclass PendingBatchFake extends PendingBatch\n{\n use ReflectsClosures;\n\n /**\n * The fake bus instance.\n *\n * @var \\Illuminate\\Support\\Testing\\Fakes\\BusFake\n */\n protected $bus;\n\n /**\n * Create a new pending batch instance.\n *\n * @param \\Illuminate\\Support\\Testing\\Fakes\\BusFake $bus\n * @param \\Illuminate\\Support\\Collection $jobs\n ", "suffix": "Batch\n */\n public function dispatch()\n {\n return $this->bus->recordPendingBatch($this);\n }\n\n /**\n * Dispatch the batch after the response is sent to the browser.\n *\n * @return \\Illuminate\\Bus\\Batch\n */\n public func", "middle": "*/\n public function __construct(BusFake $bus, Collection $jobs)\n {\n $this->bus = $bus;\n $this->jobs = $jobs->filter()->values();\n }\n\n /**\n * Dispatch the batch.\n *\n * @return \\Illuminate\\Bus\\", "meta": {"filepath": "src/Illuminate/Support/Testing/Fakes/PendingBatchFake.php", "language": "php", "file_size": 2202, "cut_index": 563, "middle_length": 229}} {"prefix": "\nnamespace Illuminate\\Support\\Testing\\Fakes;\n\nuse Illuminate\\Contracts\\Mail\\Mailable;\nuse Illuminate\\Mail\\PendingMail;\n\nclass PendingMailFake extends PendingMail\n{\n /**\n * Create a new instance.\n *\n * @param \\Illuminate\\Support\\Testing\\Fakes\\MailFake $mailer\n */\n public function __construct($mailer)\n {\n $this->mailer = $mailer;\n }\n\n /**\n * Send a new mailable message instance.\n *\n * @param \\Illuminate\\Contracts\\Mail\\Mailable $mailable\n * @return void", "suffix": "s\\Mail\\Mailable $mailable\n * @return void\n */\n public function sendNow(Mailable $mailable)\n {\n $this->mailer->sendNow($this->fill($mailable));\n }\n\n /**\n * Push the given mailable onto the queue.\n *\n * @param \\Illumi", "middle": "\n */\n public function send(Mailable $mailable)\n {\n $this->mailer->send($this->fill($mailable));\n }\n\n /**\n * Send a new mailable message instance synchronously.\n *\n * @param \\Illuminate\\Contract", "meta": {"filepath": "src/Illuminate/Support/Testing/Fakes/PendingMailFake.php", "language": "php", "file_size": 1193, "cut_index": 518, "middle_length": 229}} {"prefix": "res;\n\n /**\n * The original queue manager.\n *\n * @var \\Illuminate\\Contracts\\Queue\\Queue\n */\n public $queue;\n\n /**\n * The job types that should be intercepted instead of pushed to the queue.\n *\n * @var \\Illuminate\\Support\\Collection\n */\n protected $jobsToFake;\n\n /**\n * The job types that should be pushed to the queue and not intercepted.\n *\n * @var \\Illuminate\\Support\\Collection\n */\n protected $jobsToBeQueued;\n\n /**\n * All of the jobs th", "suffix": " * All of the unique jobs that were pushed.\n *\n * @var array\n */\n private $uniqueJobs = [];\n\n /**\n * Indicates if items should be serialized and restored when pushed to the queue.\n *\n * @var bool\n */\n protected bool ", "middle": "at have been pushed.\n *\n * @var array\n */\n protected $jobs = [];\n\n /**\n * All of the payloads that have been raw pushed.\n *\n * @var list\n */\n protected $rawPushes = [];\n\n /**\n ", "meta": {"filepath": "src/Illuminate/Support/Testing/Fakes/QueueFake.php", "language": "php", "file_size": 22074, "cut_index": 1331, "middle_length": 229}} {"prefix": "th)\n * @method static void defaultTimePrecision(int|null $precision)\n * @method static void defaultMorphKeyType(string $type)\n * @method static void morphUsingUuids()\n * @method static void morphUsingUlids()\n * @method static bool createDatabase(string $name)\n * @method static bool dropDatabaseIfExists(string $name)\n * @method static array getSchemas()\n * @method static bool hasTable(string $table)\n * @method static bool hasView(string $view)\n * @method static array getTables(string|string[]|null $schema = ", "suffix": "[]|null $schema = null)\n * @method static bool hasColumn(string $table, string $column)\n * @method static bool hasColumns(string $table, array $columns)\n * @method static void whenTableHasColumn(string $table, string $column, \\Closure $callback)\n * @method", "middle": "null)\n * @method static array getTableListing(string|string[]|null $schema = null, bool $schemaQualified = true)\n * @method static array getViews(string|string[]|null $schema = null)\n * @method static array getTypes(string|string", "meta": {"filepath": "src/Illuminate/Support/Facades/Schema.php", "language": "php", "file_size": 4052, "cut_index": 614, "middle_length": 229}} {"prefix": "@method static \\Illuminate\\Contracts\\Filesystem\\Filesystem build(string|array $config)\n * @method static \\Illuminate\\Contracts\\Filesystem\\Filesystem createLocalDriver(array $config, string $name = 'local')\n * @method static \\Illuminate\\Contracts\\Filesystem\\Filesystem createFtpDriver(array $config)\n * @method static \\Illuminate\\Contracts\\Filesystem\\Filesystem createSftpDriver(array $config)\n * @method static \\Illuminate\\Contracts\\Filesystem\\Cloud createS3Driver(array $config)\n * @method static \\Illuminate\\Co", "suffix": "aultCloudDriver()\n * @method static \\Illuminate\\Filesystem\\FilesystemManager forgetDisk(array|string $disk)\n * @method static void purge(string|null $name = null)\n * @method static \\Illuminate\\Filesystem\\FilesystemManager extend(string $driver, \\Closure $c", "middle": "ntracts\\Filesystem\\Filesystem createScopedDriver(array $config)\n * @method static \\Illuminate\\Filesystem\\FilesystemManager set(string $name, mixed $disk)\n * @method static string getDefaultDriver()\n * @method static string getDef", "meta": {"filepath": "src/Illuminate/Support/Facades/Storage.php", "language": "php", "file_size": 9322, "cut_index": 921, "middle_length": 229}} {"prefix": "ch;\nuse Illuminate\\Bus\\UpdatedBatchJobCounts;\nuse Illuminate\\Support\\Carbon;\nuse Illuminate\\Support\\Collection;\nuse Throwable;\n\nclass BatchFake extends Batch\n{\n /**\n * The jobs that have been added to the batch.\n *\n * @var array\n */\n public $added = [];\n\n /**\n * Indicates if the batch has been deleted.\n *\n * @var bool\n */\n public $deleted = false;\n\n /**\n * Create a new batch instance.\n *\n * @param string $id\n * @param string $name\n * @pa", "suffix": "rbonImmutable|null $cancelledAt\n * @param \\Carbon\\CarbonImmutable|null $finishedAt\n */\n public function __construct(\n string $id,\n string $name,\n int $totalJobs,\n int $pendingJobs,\n int $failedJobs,\n ", "middle": "ram int $totalJobs\n * @param int $pendingJobs\n * @param int $failedJobs\n * @param array $failedJobIds\n * @param array $options\n * @param \\Carbon\\CarbonImmutable $createdAt\n * @param \\Carbon\\Ca", "meta": {"filepath": "src/Illuminate/Support/Testing/Fakes/BatchFake.php", "language": "php", "file_size": 3872, "cut_index": 614, "middle_length": 229}} {"prefix": "\\Assert as PHPUnit;\nuse ReflectionFunction;\n\nclass EventFake implements Dispatcher, Fake\n{\n use ForwardsCalls, ReflectsClosures;\n\n /**\n * The original event dispatcher.\n *\n * @var \\Illuminate\\Contracts\\Events\\Dispatcher\n */\n public $dispatcher;\n\n /**\n * The event types that should be intercepted instead of dispatched.\n *\n * @var array\n */\n protected $eventsToFake = [];\n\n /**\n * The event types that should be dispatched instead of intercepted.\n *\n ", "suffix": "nt fake instance.\n *\n * @param \\Illuminate\\Contracts\\Events\\Dispatcher $dispatcher\n * @param array|string $eventsToFake\n */\n public function __construct(Dispatcher $dispatcher, $eventsToFake = [])\n {\n $this->dispatcher = $d", "middle": " * @var array\n */\n protected $eventsToDispatch = [];\n\n /**\n * All of the events that have been intercepted keyed by type.\n *\n * @var array\n */\n protected $events = [];\n\n /**\n * Create a new eve", "meta": {"filepath": "src/Illuminate/Support/Testing/Fakes/EventFake.php", "language": "php", "file_size": 11972, "cut_index": 921, "middle_length": 229}} {"prefix": "ers\\DurationLimiterBuilder throttle(string $name)\n * @method static mixed client()\n * @method static void subscribe(array|string $channels, \\Closure $callback)\n * @method static void psubscribe(array|string $channels, \\Closure $callback)\n * @method static mixed command(string $method, array $parameters = [])\n * @method static void listen(\\Closure $callback)\n * @method static void listenForFailures(\\Closure $callback)\n * @method static bool isCluster()\n * @method static string|null getName()\n * @method stati", "suffix": "r $events)\n * @method static void unsetEventDispatcher()\n * @method static bool hasHashTag(string $key)\n * @method static void macro(string $name, object|callable $macro)\n * @method static void mixin(object $mixin, bool $replace = true)\n * @method static b", "middle": "c \\Illuminate\\Redis\\Connections\\Connection setName(string $name)\n * @method static \\Illuminate\\Contracts\\Events\\Dispatcher|null getEventDispatcher()\n * @method static void setEventDispatcher(\\Illuminate\\Contracts\\Events\\Dispatche", "meta": {"filepath": "src/Illuminate/Support/Facades/Redis.php", "language": "php", "file_size": 24317, "cut_index": 1331, "middle_length": 229}} {"prefix": "lluminate\\Contracts\\Routing\\ResponseFactory as ResponseFactoryContract;\n\n/**\n * @method static \\Illuminate\\Http\\Response make(mixed $content = '', int $status = 200, array $headers = [])\n * @method static \\Illuminate\\Http\\Response noContent(int $status = 204, array $headers = [])\n * @method static \\Illuminate\\Http\\Response view(string|array $view, array $data = [], int $status = 200, array $headers = [])\n * @method static \\Illuminate\\Http\\JsonResponse json(mixed $data = [], int $status = 200, array $headers", "suffix": "amedResponse eventStream(\\Closure $callback, array $headers = [], \\Illuminate\\Http\\StreamedEvent|string|null $endStreamWith = '')\n * @method static \\Symfony\\Component\\HttpFoundation\\StreamedResponse stream(callable|null $callback, int $status = 20", "middle": " = [], int $options = 0)\n * @method static \\Illuminate\\Http\\JsonResponse jsonp(string $callback, mixed $data = [], int $status = 200, array $headers = [], int $options = 0)\n * @method static \\Symfony\\Component\\HttpFoundation\\Stre", "meta": {"filepath": "src/Illuminate/Support/Facades/Response.php", "language": "php", "file_size": 3014, "cut_index": 563, "middle_length": 229}} {"prefix": "pace Illuminate\\Support\\Testing\\Fakes;\n\nuse Closure;\nuse Illuminate\\Foundation\\Bus\\PendingChain;\nuse Illuminate\\Queue\\CallQueuedClosure;\n\nclass PendingChainFake extends PendingChain\n{\n /**\n * The fake bus instance.\n *\n * @var \\Illuminate\\Support\\Testing\\Fakes\\BusFake\n */\n protected $bus;\n\n /**\n * Create a new pending chain instance.\n *\n * @param \\Illuminate\\Support\\Testing\\Fakes\\BusFake $bus\n * @param mixed $job\n * @param array $chain\n */\n public fun", "suffix": "minate\\Foundation\\Bus\\PendingDispatch\n */\n public function dispatch()\n {\n if (is_string($this->job)) {\n $firstJob = new $this->job(...func_get_args());\n } elseif ($this->job instanceof Closure) {\n $firstJob = C", "middle": "ction __construct(BusFake $bus, $job, $chain)\n {\n $this->bus = $bus;\n $this->job = $job;\n $this->chain = $chain;\n }\n\n /**\n * Dispatch the job with the given arguments.\n *\n * @return \\Illu", "meta": {"filepath": "src/Illuminate/Support/Testing/Fakes/PendingChainFake.php", "language": "php", "file_size": 1414, "cut_index": 524, "middle_length": 229}} {"prefix": "hp\n\nnamespace Illuminate\\Support\\Defer;\n\nuse Illuminate\\Support\\Str;\n\nclass DeferredCallback\n{\n /**\n * Create a new deferred callback instance.\n *\n * @param callable $callback\n */\n public function __construct(public $callback, public ?string $name = null, public bool $always = false)\n {\n $this->name = $name ?? (string) Str::uuid();\n }\n\n /**\n * Specify the name of the deferred callback so it can be cancelled later.\n *\n * @param string $name\n * @return", "suffix": " *\n * @param bool $always\n * @return $this\n */\n public function always(bool $always = true): static\n {\n $this->always = $always;\n\n return $this;\n }\n\n /**\n * Invoke the deferred callback.\n *\n * @return", "middle": " $this\n */\n public function name(string $name): static\n {\n $this->name = $name;\n\n return $this;\n }\n\n /**\n * Indicate that the deferred callback should run even on unsuccessful requests and jobs.\n", "meta": {"filepath": "src/Illuminate/Support/Defer/DeferredCallback.php", "language": "php", "file_size": 1106, "cut_index": 515, "middle_length": 229}} {"prefix": "pace Illuminate\\Support\\Facades;\n\n/**\n * @method static \\Illuminate\\Cache\\RateLimiter for(\\UnitEnum|string $name, \\Closure $callback)\n * @method static \\Closure|null limiter(\\UnitEnum|string $name)\n * @method static mixed attempt(string $key, int $maxAttempts, \\Closure $callback, \\DateTimeInterface|\\DateInterval|int $decaySeconds = 60)\n * @method static bool tooManyAttempts(string $key, int $maxAttempts)\n * @method static int hit(string $key, \\DateTimeInterface|\\DateInterval|int $decaySeconds = 60)\n * @meth", "suffix": "\n * @method static mixed attempts(string $key)\n * @method static bool resetAttempts(string $key)\n * @method static int remaining(string $key, int $maxAttempts)\n * @method static int retriesLeft(string $key, int $maxAttempts)\n * @method static void clear(st", "middle": "od static int increment(string $key, \\DateTimeInterface|\\DateInterval|int $decaySeconds = 60, int $amount = 1)\n * @method static int decrement(string $key, \\DateTimeInterface|\\DateInterval|int $decaySeconds = 60, int $amount = 1)", "meta": {"filepath": "src/Illuminate/Support/Facades/RateLimiter.php", "language": "php", "file_size": 1416, "cut_index": 524, "middle_length": 229}} {"prefix": "tion;\nuse Illuminate\\Support\\Str;\nuse Illuminate\\Support\\Traits\\Macroable;\nuse Illuminate\\Support\\Traits\\ReflectsClosures;\nuse PHPUnit\\Framework\\Assert as PHPUnit;\n\nclass NotificationFake implements Fake, NotificationDispatcher, NotificationFactory\n{\n use Macroable, ReflectsClosures;\n\n /**\n * All of the notifications that have been sent.\n *\n * @var array\n */\n protected $notifications = [];\n\n /**\n * Locale used when sending notifications.\n *\n * @var string|null\n */", "suffix": "otification was sent on-demand based on a truth-test callback.\n *\n * @param string|\\Closure $notification\n * @param callable|null $callback\n * @return void\n *\n * @throws \\Exception\n */\n public function assertSentOnDemand(", "middle": "\n public $locale;\n\n /**\n * Indicates if notifications should be serialized and restored when pushed to the queue.\n *\n * @var bool\n */\n protected $serializeAndRestore = false;\n\n /**\n * Assert if a n", "meta": {"filepath": "src/Illuminate/Support/Testing/Fakes/NotificationFake.php", "language": "php", "file_size": 12126, "cut_index": 921, "middle_length": 229}} {"prefix": "hp\n\nnamespace Illuminate\\Support\\Queue\\Concerns;\n\nuse Illuminate\\Container\\Container;\nuse Illuminate\\Queue\\QueueRoutes;\n\ntrait ResolvesQueueRoutes\n{\n /**\n * Resolve the default connection name for a given queueable instance.\n *\n * @param object $queueable\n * @return string|null\n */\n public function resolveConnectionFromQueueRoute($queueable)\n {\n return $this->queueRoutes()->getConnection($queueable);\n }\n\n /**\n * Resolve the default queue name for a given queue", "suffix": "\n * Get the queue routes manager instance.\n *\n * @return \\Illuminate\\Queue\\QueueRoutes\n */\n protected function queueRoutes()\n {\n $container = Container::getInstance();\n\n return $container->bound('queue.routes')\n ", "middle": "able instance.\n *\n * @param object $queueable\n * @return string|null\n */\n public function resolveQueueFromQueueRoute($queueable)\n {\n return $this->queueRoutes()->getQueue($queueable);\n }\n\n /**", "meta": {"filepath": "src/Illuminate/Support/Queue/Concerns/ResolvesQueueRoutes.php", "language": "php", "file_size": 1077, "cut_index": 515, "middle_length": 229}} {"prefix": "ble;\nuse League\\Flysystem\\FilesystemAdapter as FlysystemAdapter;\nuse League\\Flysystem\\FilesystemOperator;\n\nclass AwsS3V3Adapter extends FilesystemAdapter\n{\n use Conditionable;\n\n /**\n * The AWS S3 client.\n *\n * @var \\Aws\\S3\\S3Client\n */\n protected $client;\n\n /**\n * Create a new AwsS3V3FilesystemAdapter instance.\n *\n * @param \\League\\Flysystem\\FilesystemOperator $driver\n * @param \\League\\Flysystem\\FilesystemAdapter $adapter\n * @param array $config\n * @", "suffix": ":__construct($driver, $adapter, $config);\n\n $this->client = $client;\n }\n\n /**\n * Get the URL for the file at the given path.\n *\n * @param string $path\n * @return string\n *\n * @throws \\RuntimeException\n */\n publ", "middle": "param \\Aws\\S3\\S3Client $client\n */\n public function __construct(FilesystemOperator $driver, FlysystemAdapter $adapter, array $config, S3Client $client)\n {\n $config['directory_separator'] = '/';\n\n parent:", "meta": {"filepath": "src/Illuminate/Filesystem/AwsS3V3Adapter.php", "language": "php", "file_size": 4285, "cut_index": 614, "middle_length": 229}} {"prefix": "apter;\nuse League\\Flysystem\\StorageAttributes;\nuse League\\Flysystem\\UnableToCopyFile;\nuse League\\Flysystem\\UnableToCreateDirectory;\nuse League\\Flysystem\\UnableToDeleteDirectory;\nuse League\\Flysystem\\UnableToDeleteFile;\nuse League\\Flysystem\\UnableToMoveFile;\nuse League\\Flysystem\\UnableToProvideChecksum;\nuse League\\Flysystem\\UnableToReadFile;\nuse League\\Flysystem\\UnableToRetrieveMetadata;\nuse League\\Flysystem\\UnableToSetVisibility;\nuse League\\Flysystem\\UnableToWriteFile;\nuse League\\Flysystem\\Visibility;\nuse P", "suffix": "r implements CloudFilesystemContract\n{\n use Conditionable;\n use Macroable {\n __call as macroCall;\n }\n\n /**\n * The Flysystem filesystem implementation.\n *\n * @var \\League\\Flysystem\\FilesystemOperator\n */\n protected $dri", "middle": "HPUnit\\Framework\\Assert as PHPUnit;\nuse Psr\\Http\\Message\\StreamInterface;\nuse RuntimeException;\nuse Symfony\\Component\\HttpFoundation\\StreamedResponse;\n\n/**\n * @mixin \\League\\Flysystem\\FilesystemOperator\n */\nclass FilesystemAdapte", "meta": {"filepath": "src/Illuminate/Filesystem/FilesystemAdapter.php", "language": "php", "file_size": 29604, "cut_index": 1331, "middle_length": 229}} {"prefix": "ysystem\\Filesystem as Flysystem;\nuse League\\Flysystem\\FilesystemAdapter as FlysystemAdapter;\nuse League\\Flysystem\\Ftp\\FtpAdapter;\nuse League\\Flysystem\\Ftp\\FtpConnectionOptions;\nuse League\\Flysystem\\Local\\LocalFilesystemAdapter as LocalAdapter;\nuse League\\Flysystem\\PathPrefixing\\PathPrefixedAdapter;\nuse League\\Flysystem\\PhpseclibV3\\SftpAdapter;\nuse League\\Flysystem\\PhpseclibV3\\SftpConnectionProvider;\nuse League\\Flysystem\\ReadOnly\\ReadOnlyFilesystemAdapter;\nuse League\\Flysystem\\UnixVisibility\\PortableVisibili", "suffix": "\\FilesystemAdapter\n */\nclass FilesystemManager implements FactoryContract\n{\n use RebindsCallbacksToSelf;\n\n /**\n * The application instance.\n *\n * @var \\Illuminate\\Contracts\\Foundation\\Application\n */\n protected $app;\n\n /**\n ", "middle": "tyConverter;\nuse League\\Flysystem\\Visibility;\nuse ReflectionException;\nuse RuntimeException;\n\nuse function Illuminate\\Support\\enum_value;\n\n/**\n * @mixin \\Illuminate\\Contracts\\Filesystem\\Filesystem\n * @mixin \\Illuminate\\Filesystem", "meta": {"filepath": "src/Illuminate/Filesystem/FilesystemManager.php", "language": "php", "file_size": 13198, "cut_index": 921, "middle_length": 229}} {"prefix": "ass LockableFile\n{\n /**\n * The file resource.\n *\n * @var resource\n */\n protected $handle;\n\n /**\n * The file path.\n *\n * @var string\n */\n protected $path;\n\n /**\n * Indicates if the file is locked.\n *\n * @var bool\n */\n protected $isLocked = false;\n\n /**\n * Create a new File instance.\n *\n * @param string $path\n * @param string $mode\n */\n public function __construct($path, $mode)\n {\n $this->path = $path;\n\n ", "suffix": "d function ensureDirectoryExists($path)\n {\n if (! file_exists(dirname($path))) {\n @mkdir(dirname($path), 0777, true);\n }\n }\n\n /**\n * Create the file resource.\n *\n * @param string $path\n * @param string ", "middle": " $this->ensureDirectoryExists($path);\n $this->createResource($path, $mode);\n }\n\n /**\n * Create the file's directory if necessary.\n *\n * @param string $path\n * @return void\n */\n protecte", "meta": {"filepath": "src/Illuminate/Filesystem/LockableFile.php", "language": "php", "file_size": 3582, "cut_index": 614, "middle_length": 229}} {"prefix": "te\\Filesystem;\n\nuse Illuminate\\Http\\Request;\nuse Illuminate\\Support\\Facades\\Storage;\nuse League\\Flysystem\\PathTraversalDetected;\n\nclass ServeFile\n{\n /**\n * Create a new invokable controller to serve files.\n */\n public function __construct(\n protected string $disk,\n protected array $config,\n protected bool $isProduction,\n ) {\n //\n }\n\n /**\n * Handle the incoming request.\n */\n public function __invoke(Request $request, string $path)\n {\n ab", "suffix": " 'Cache-Control' => 'no-store, no-cache, must-revalidate, max-age=0',\n 'Content-Security-Policy' => \"default-src 'none'; style-src 'unsafe-inline'; sandbox\",\n ];\n\n return tap(\n Storage::dis", "middle": "ort_unless(\n $this->hasValidSignature($request),\n $this->isProduction ? 404 : 403\n );\n try {\n abort_unless(Storage::disk($this->disk)->exists($path), 404);\n\n $headers = [\n", "meta": {"filepath": "src/Illuminate/Filesystem/ServeFile.php", "language": "php", "file_size": 1762, "cut_index": 537, "middle_length": 229}} {"prefix": "te\\Session;\n\nuse Illuminate\\Contracts\\Cache\\Repository as CacheContract;\nuse SessionHandlerInterface;\n\nclass CacheBasedSessionHandler implements SessionHandlerInterface\n{\n /**\n * The cache repository instance.\n *\n * @var \\Illuminate\\Contracts\\Cache\\Repository\n */\n protected $cache;\n\n /**\n * The number of minutes to store the data in the cache.\n *\n * @var int\n */\n protected $minutes;\n\n /**\n * Create a new cache driven handler instance.\n *\n * @param ", "suffix": " /**\n * {@inheritdoc}\n *\n * @return bool\n */\n public function open($savePath, $sessionName): bool\n {\n return true;\n }\n\n /**\n * {@inheritdoc}\n *\n * @return bool\n */\n public function close(): bool\n {\n", "middle": "\\Illuminate\\Contracts\\Cache\\Repository $cache\n * @param int $minutes\n */\n public function __construct(CacheContract $cache, $minutes)\n {\n $this->cache = $cache;\n $this->minutes = $minutes;\n }\n\n ", "meta": {"filepath": "src/Illuminate/Session/CacheBasedSessionHandler.php", "language": "php", "file_size": 1926, "cut_index": 537, "middle_length": 229}} {"prefix": ";\nuse Illuminate\\Support\\Arr;\nuse Illuminate\\Support\\Carbon;\nuse Illuminate\\Support\\InteractsWithTime;\nuse SessionHandlerInterface;\n\nclass DatabaseSessionHandler implements ExistenceAwareInterface, SessionHandlerInterface\n{\n use InteractsWithTime;\n\n /**\n * The database connection instance.\n *\n * @var \\Illuminate\\Database\\ConnectionInterface\n */\n protected $connection;\n\n /**\n * The name of the session table.\n *\n * @var string\n */\n protected $table;\n\n /**\n ", "suffix": "otected $container;\n\n /**\n * The existence state of the session.\n *\n * @var bool\n */\n protected $exists;\n\n /**\n * Create a new database session handler instance.\n *\n * @param \\Illuminate\\Database\\ConnectionInterface $", "middle": " * The number of minutes the session should be valid.\n *\n * @var int\n */\n protected $minutes;\n\n /**\n * The container instance.\n *\n * @var \\Illuminate\\Contracts\\Container\\Container|null\n */\n pr", "meta": {"filepath": "src/Illuminate/Session/DatabaseSessionHandler.php", "language": "php", "file_size": 7159, "cut_index": 716, "middle_length": 229}} {"prefix": "e\\Filesystem\\Filesystem;\nuse Illuminate\\Support\\Carbon;\nuse SessionHandlerInterface;\nuse Symfony\\Component\\Finder\\Finder;\n\nclass FileSessionHandler implements SessionHandlerInterface\n{\n /**\n * The filesystem instance.\n *\n * @var \\Illuminate\\Filesystem\\Filesystem\n */\n protected $files;\n\n /**\n * The path where sessions should be stored.\n *\n * @var string\n */\n protected $path;\n\n /**\n * The number of minutes the session should be valid.\n *\n * @var int\n ", "suffix": "c function __construct(Filesystem $files, $path, $minutes)\n {\n $this->path = $path;\n $this->files = $files;\n $this->minutes = $minutes;\n }\n\n /**\n * {@inheritdoc}\n *\n * @return bool\n */\n public function open(", "middle": " */\n protected $minutes;\n\n /**\n * Create a new file driven handler instance.\n *\n * @param \\Illuminate\\Filesystem\\Filesystem $files\n * @param string $path\n * @param int $minutes\n */\n publi", "meta": {"filepath": "src/Illuminate/Session/FileSessionHandler.php", "language": "php", "file_size": 2556, "cut_index": 563, "middle_length": 229}} {"prefix": "ass NullSessionHandler implements SessionHandlerInterface\n{\n /**\n * {@inheritdoc}\n *\n * @return bool\n */\n public function open($savePath, $sessionName): bool\n {\n return true;\n }\n\n /**\n * {@inheritdoc}\n *\n * @return bool\n */\n public function close(): bool\n {\n return true;\n }\n\n /**\n * {@inheritdoc}\n *\n * @return string\n */\n public function read($sessionId): string\n {\n return '';\n }\n\n /**\n * {@inheri", "suffix": "function write($sessionId, $data): bool\n {\n return true;\n }\n\n /**\n * {@inheritdoc}\n *\n * @return bool\n */\n public function destroy($sessionId): bool\n {\n return true;\n }\n\n /**\n * {@inheritdoc}\n *\n ", "middle": "tdoc}\n *\n * @return bool\n */\n public ", "meta": {"filepath": "src/Illuminate/Session/NullSessionHandler.php", "language": "php", "file_size": 986, "cut_index": 582, "middle_length": 52}} {"prefix": "The session name.\n *\n * @var string\n */\n protected $name;\n\n /**\n * The session attributes.\n *\n * @var array\n */\n protected $attributes = [];\n\n /**\n * The session handler implementation.\n *\n * @var \\SessionHandlerInterface\n */\n protected $handler;\n\n /**\n * The session store's serialization strategy.\n *\n * @var string\n */\n protected $serialization = 'php';\n\n /**\n * Session store started status.\n *\n * @var bool\n ", "suffix": "alization\n */\n public function __construct($name, SessionHandlerInterface $handler, $id = null, $serialization = 'php')\n {\n $this->setId($id);\n $this->name = $name;\n $this->handler = $handler;\n $this->serialization = $", "middle": " */\n protected $started = false;\n\n /**\n * Create a new session instance.\n *\n * @param string $name\n * @param \\SessionHandlerInterface $handler\n * @param string|null $id\n * @param string $seri", "meta": {"filepath": "src/Illuminate/Session/Store.php", "language": "php", "file_size": 19258, "cut_index": 1331, "middle_length": 229}} {"prefix": "te\\Session\\Console;\n\nuse Illuminate\\Console\\MigrationGeneratorCommand;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\n\nuse function Illuminate\\Filesystem\\join_paths;\n\n#[AsCommand(name: 'make:session-table', aliases: ['session:table'])]\nclass SessionTableCommand extends MigrationGeneratorCommand\n{\n /**\n * The console command name.\n *\n * @var string\n */\n protected $name = 'make:session-table';\n\n /**\n * The console command name aliases.\n *\n * @var array\n */\n prot", "suffix": "ation table name.\n *\n * @return string\n */\n protected function migrationTableName()\n {\n return 'sessions';\n }\n\n /**\n * Get the path to the migration stub file.\n *\n * @return string\n */\n protected function m", "middle": "ected $aliases = ['session:table'];\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected $description = 'Create a migration for the session database table';\n\n /**\n * Get the migr", "meta": {"filepath": "src/Illuminate/Session/Console/SessionTableCommand.php", "language": "php", "file_size": 1696, "cut_index": 537, "middle_length": 229}} {"prefix": " Closure;\nuse Illuminate\\Bus\\BatchRepository;\nuse Illuminate\\Bus\\PendingBatch;\nuse Illuminate\\Bus\\UpdatedBatchJobCounts;\nuse Illuminate\\Support\\Str;\n\nclass BatchRepositoryFake implements BatchRepository\n{\n /**\n * The batches stored in the repository.\n *\n * @var \\Illuminate\\Bus\\Batch[]\n */\n protected $batches = [];\n\n /**\n * Retrieve a list of batches.\n *\n * @param int $limit\n * @param mixed $before\n * @return \\Illuminate\\Bus\\Batch[]\n */\n public function", "suffix": "nction find(string $batchId)\n {\n return $this->batches[$batchId] ?? null;\n }\n\n /**\n * Store a new pending batch.\n *\n * @param \\Illuminate\\Bus\\PendingBatch $batch\n * @return \\Illuminate\\Bus\\Batch\n */\n public function", "middle": " get($limit, $before)\n {\n return $this->batches;\n }\n\n /**\n * Retrieve information about an existing batch.\n *\n * @param string $batchId\n * @return \\Illuminate\\Bus\\Batch|null\n */\n public fu", "meta": {"filepath": "src/Illuminate/Support/Testing/Fakes/BatchRepositoryFake.php", "language": "php", "file_size": 3665, "cut_index": 614, "middle_length": 229}} {"prefix": "Support\\Collection;\nuse Illuminate\\Support\\Str;\nuse Illuminate\\View\\Compilers\\ComponentTagCompiler;\n\nuse function Illuminate\\Support\\enum_value;\n\nclass DynamicComponent extends Component\n{\n /**\n * The name of the component.\n *\n * @var string\n */\n public $component;\n\n /**\n * The component tag compiler instance.\n *\n * @var \\Illuminate\\View\\Compilers\\BladeTagCompiler\n */\n protected static $compiler;\n\n /**\n * The cached component classes.\n *\n * @var arr", "suffix": " {\n $this->component = (string) enum_value($component);\n }\n\n /**\n * Get the view / contents that represent the component.\n *\n * @return \\Illuminate\\Contracts\\View\\View|string\n */\n public function render()\n {\n $te", "middle": "ay\n */\n protected static $componentClasses = [];\n\n /**\n * Create a new component instance.\n *\n * @param \\BackedEnum|string $component\n */\n public function __construct(BackedEnum|string $component)\n ", "meta": {"filepath": "src/Illuminate/View/DynamicComponent.php", "language": "php", "file_size": 4832, "cut_index": 614, "middle_length": 229}} {"prefix": "method static \\Illuminate\\Contracts\\View\\View make(string $view, \\Illuminate\\Contracts\\Support\\Arrayable|array $data = [], array $mergeData = [])\n * @method static \\Illuminate\\Contracts\\View\\View first(array $views, \\Illuminate\\Contracts\\Support\\Arrayable|array $data = [], array $mergeData = [])\n * @method static string renderWhen(bool $condition, string $view, \\Illuminate\\Contracts\\Support\\Arrayable|array $data = [], array $mergeData = [])\n * @method static string renderUnless(bool $condition, string $view", "suffix": "w)\n * @method static \\Illuminate\\Contracts\\View\\Engine getEngineFromPath(string $path)\n * @method static mixed share(array|string $key, mixed $value = null)\n * @method static void incrementRender()\n * @method static void decrementRender()\n * @method static", "middle": ", \\Illuminate\\Contracts\\Support\\Arrayable|array $data = [], array $mergeData = [])\n * @method static string renderEach(string $view, array $data, string $iterator, string $empty = 'raw|')\n * @method static bool exists(string $vie", "meta": {"filepath": "src/Illuminate/Support/Facades/View.php", "language": "php", "file_size": 5631, "cut_index": 716, "middle_length": 229}} {"prefix": "\nnamespace Illuminate\\Filesystem;\n\nuse Illuminate\\Http\\Request;\nuse Illuminate\\Http\\Response;\nuse Illuminate\\Support\\Facades\\Storage;\nuse League\\Flysystem\\PathTraversalDetected;\n\nclass ReceiveFile\n{\n /**\n * Create a new invokable controller to receive files.\n */\n public function __construct(\n protected string $disk,\n protected array $config,\n protected bool $isProduction,\n ) {\n //\n }\n\n /**\n * Handle the incoming request.\n */\n public function __in", "suffix": "k)->put($path, $request->getContent());\n\n return response()->noContent();\n } catch (PathTraversalDetected) {\n abort(404);\n }\n }\n\n /**\n * Determine if the request has a valid signature if applicable.\n */\n ", "middle": "voke(Request $request, string $path): Response\n {\n abort_unless(\n $this->hasValidSignature($request),\n $this->isProduction ? 404 : 403\n );\n\n try {\n Storage::disk($this->dis", "meta": {"filepath": "src/Illuminate/Filesystem/ReceiveFile.php", "language": "php", "file_size": 1164, "cut_index": 518, "middle_length": 229}} {"prefix": "e\\Contracts\\Cookie\\QueueingFactory as CookieJar;\nuse Illuminate\\Support\\InteractsWithTime;\nuse SessionHandlerInterface;\nuse Symfony\\Component\\HttpFoundation\\Request;\n\nclass CookieSessionHandler implements SessionHandlerInterface\n{\n use InteractsWithTime;\n\n /**\n * The cookie jar instance.\n *\n * @var \\Illuminate\\Contracts\\Cookie\\Factory\n */\n protected $cookie;\n\n /**\n * The request instance.\n *\n * @var \\Symfony\\Component\\HttpFoundation\\Request\n */\n protected $requ", "suffix": " @var bool\n */\n protected $expireOnClose;\n\n /**\n * Create a new cookie driven handler instance.\n *\n * @param \\Illuminate\\Contracts\\Cookie\\QueueingFactory $cookie\n * @param int $minutes\n * @param bool $expireOnClose\n ", "middle": "est;\n\n /**\n * The number of minutes the session should be valid.\n *\n * @var int\n */\n protected $minutes;\n\n /**\n * Indicates whether the session should be expired when the browser closes.\n *\n *", "meta": {"filepath": "src/Illuminate/Session/CookieSessionHandler.php", "language": "php", "file_size": 2933, "cut_index": 563, "middle_length": 229}} {"prefix": "te\\Session;\n\nuse Illuminate\\Contracts\\Encryption\\DecryptException;\nuse Illuminate\\Contracts\\Encryption\\Encrypter as EncrypterContract;\nuse SessionHandlerInterface;\n\nclass EncryptedStore extends Store\n{\n /**\n * The encrypter instance.\n *\n * @var \\Illuminate\\Contracts\\Encryption\\Encrypter\n */\n protected $encrypter;\n\n /**\n * Create a new session instance.\n *\n * @param string $name\n * @param \\SessionHandlerInterface $handler\n * @param \\Illuminate\\Contracts\\Encry", "suffix": "zation = 'php')\n {\n $this->encrypter = $encrypter;\n\n parent::__construct($name, $handler, $id, $serialization);\n }\n\n /**\n * Prepare the raw string data from the session for unserialization.\n *\n * @param string $data\n ", "middle": "ption\\Encrypter $encrypter\n * @param string|null $id\n * @param string $serialization\n */\n public function __construct($name, SessionHandlerInterface $handler, EncrypterContract $encrypter, $id = null, $seriali", "meta": {"filepath": "src/Illuminate/Session/EncryptedStore.php", "language": "php", "file_size": 1752, "cut_index": 537, "middle_length": 229}} {"prefix": "sion;\nuse Symfony\\Component\\HttpFoundation\\Session\\SessionBagInterface;\nuse Symfony\\Component\\HttpFoundation\\Session\\SessionInterface;\nuse Symfony\\Component\\HttpFoundation\\Session\\Storage\\MetadataBag;\n\nclass SymfonySessionDecorator implements SessionInterface\n{\n /**\n * The underlying Laravel session store.\n *\n * @var \\Illuminate\\Contracts\\Session\\Session\n */\n public readonly Session $store;\n\n /**\n * Create a new session decorator.\n *\n * @param \\Illuminate\\Contracts\\Sess", "suffix": "rt();\n }\n\n /**\n * {@inheritdoc}\n */\n public function getId(): string\n {\n return $this->store->getId();\n }\n\n /**\n * {@inheritdoc}\n */\n public function setId(string $id): void\n {\n $this->store->setId($id)", "middle": "ion\\Session $store\n */\n public function __construct(Session $store)\n {\n $this->store = $store;\n }\n\n /**\n * {@inheritdoc}\n */\n public function start(): bool\n {\n return $this->store->sta", "meta": {"filepath": "src/Illuminate/Session/SymfonySessionDecorator.php", "language": "php", "file_size": 3658, "cut_index": 614, "middle_length": 229}} {"prefix": "c string fullUrlWithoutQuery(array|string $keys)\n * @method static string path()\n * @method static string decodedPath()\n * @method static string|null segment(int $index, string|null $default = null)\n * @method static array segments()\n * @method static bool is(mixed ...$patterns)\n * @method static bool routeIs(mixed ...$patterns)\n * @method static bool fullUrlIs(mixed ...$patterns)\n * @method static string host()\n * @method static string httpHost()\n * @method static string schemeAndHttpHost()\n * @method stat", "suffix": "static array getAcceptableContentTypes()\n * @method static \\Illuminate\\Http\\Request merge(array $input)\n * @method static \\Illuminate\\Http\\Request mergeIfMissing(array $input)\n * @method static \\Illuminate\\Http\\Request replace(array $input)\n * @method stat", "middle": "ic bool ajax()\n * @method static bool pjax()\n * @method static bool prefetch()\n * @method static bool secure()\n * @method static string|null ip()\n * @method static array ips()\n * @method static string|null userAgent()\n * @method ", "meta": {"filepath": "src/Illuminate/Support/Facades/Request.php", "language": "php", "file_size": 12101, "cut_index": 921, "middle_length": 229}} {"prefix": "original encoded json.\n *\n * @var \\Illuminate\\Contracts\\Support\\Jsonable|\\JsonSerializable|array|string\n */\n public $json;\n\n /**\n * The decoded json contents.\n *\n * @var array|null\n */\n protected $decoded;\n\n /**\n * Create a new assertable JSON string instance.\n *\n * @param \\Illuminate\\Contracts\\Support\\Jsonable|\\JsonSerializable|array|string $jsonable\n */\n public function __construct($jsonable)\n {\n $this->json = $jsonable;\n\n if ($", "suffix": "seif (is_array($jsonable)) {\n $this->decoded = $jsonable;\n } else {\n $this->decoded = json_decode($jsonable, true);\n }\n }\n\n /**\n * Validate and return the decoded response JSON.\n *\n * @param string|nul", "middle": "jsonable instanceof JsonSerializable) {\n $this->decoded = $jsonable->jsonSerialize();\n } elseif ($jsonable instanceof Jsonable) {\n $this->decoded = json_decode($jsonable->toJson(), true);\n } el", "meta": {"filepath": "src/Illuminate/Testing/AssertableJsonString.php", "language": "php", "file_size": 11612, "cut_index": 921, "middle_length": 229}} {"prefix": "te\\Contracts\\Container\\Container\n */\n protected $container;\n\n /**\n * The options resolver callback.\n *\n * @var \\Closure|null\n */\n protected $optionsResolver;\n\n /**\n * The token resolver callback.\n *\n * @var \\Closure|null\n */\n protected $tokenResolver;\n\n /**\n * All of the registered \"setUp\" process callbacks.\n *\n * @var array\n */\n protected $setUpProcessCallbacks = [];\n\n /**\n * All of the registered \"setUp\" test case callbacks.\n ", "suffix": "atabaseBeforeMigratingCallbacks = [];\n\n /**\n * All of the registered \"setUp\" test database callbacks.\n *\n * @var array\n */\n protected $setUpTestDatabaseCallbacks = [];\n\n /**\n * All of the registered \"tearDown\" process callbacks", "middle": " *\n * @var array\n */\n protected $setUpTestCaseCallbacks = [];\n\n /**\n * All of the registered \"setUp\" test database callbacks prior to the migrations.\n *\n * @var array\n */\n protected $setUpTestD", "meta": {"filepath": "src/Illuminate/Testing/ParallelTesting.php", "language": "php", "file_size": 7988, "cut_index": 716, "middle_length": 229}} {"prefix": "yInput;\nuse Symfony\\Component\\Console\\Output\\BufferedOutput;\nuse Symfony\\Component\\Console\\Output\\ConsoleOutput;\nuse Symfony\\Component\\Console\\Question\\ChoiceQuestion;\n\nclass PendingCommand\n{\n use Conditionable, Macroable, Tappable;\n\n /**\n * The test being run.\n *\n * @var \\Illuminate\\Foundation\\Testing\\TestCase\n */\n public $test;\n\n /**\n * The application instance.\n *\n * @var \\Illuminate\\Contracts\\Container\\Container\n */\n protected $app;\n\n /**\n * The comm", "suffix": " *\n * @var int\n */\n protected $expectedExitCode;\n\n /**\n * The unexpected exit code.\n *\n * @var int\n */\n protected $unexpectedExitCode;\n\n /**\n * Determine if the command has executed.\n *\n * @var bool\n */\n ", "middle": "and to run.\n *\n * @var string\n */\n protected $command;\n\n /**\n * The parameters to pass to the command.\n *\n * @var array\n */\n protected $parameters;\n\n /**\n * The expected exit code.\n ", "meta": {"filepath": "src/Illuminate/Testing/PendingCommand.php", "language": "php", "file_size": 18820, "cut_index": 1331, "middle_length": 229}} {"prefix": " for the request.\n *\n * @var \\Illuminate\\Support\\Collection\n */\n public $exceptions;\n\n /**\n * The streamed content of the response.\n *\n * @var string\n */\n protected $streamedContent;\n\n /**\n * Create a new test response instance.\n *\n * @param TResponse $response\n * @param \\Illuminate\\Http\\Request|null $request\n */\n public function __construct($response, $request = null)\n {\n $this->baseResponse = $response;\n $this->baseRequest", "suffix": "Http\\Request|null $request\n * @return static\n */\n public static function fromBaseResponse($response, $request = null)\n {\n return new static($response, $request);\n }\n\n /**\n * Assert that the response has a successful statu", "middle": " = $request;\n $this->exceptions = new Collection;\n }\n\n /**\n * Create a new TestResponse from another response.\n *\n * @template R of TResponse\n *\n * @param R $response\n * @param \\Illuminate\\", "meta": {"filepath": "src/Illuminate/Testing/TestResponse.php", "language": "php", "file_size": 58361, "cut_index": 2151, "middle_length": 229}} {"prefix": "port\\Traits\\Macroable;\nuse Illuminate\\Testing\\Assert as PHPUnit;\nuse Illuminate\\Testing\\Constraints\\SeeInHtml;\nuse Illuminate\\Testing\\Constraints\\SeeInOrder;\nuse Illuminate\\View\\View;\nuse Stringable;\n\nclass TestView implements Stringable\n{\n use Macroable;\n\n /**\n * The original view.\n *\n * @var \\Illuminate\\View\\View\n */\n protected $view;\n\n /**\n * The rendered view contents.\n *\n * @var string\n */\n protected $rendered;\n\n /**\n * Create a new test view instan", "suffix": "se view has a given piece of bound data.\n *\n * @param string|array $key\n * @param mixed $value\n * @return $this\n */\n public function assertViewHas($key, $value = null)\n {\n if (is_array($key)) {\n return $this-", "middle": "ce.\n *\n * @param \\Illuminate\\View\\View $view\n */\n public function __construct(View $view)\n {\n $this->view = $view;\n $this->rendered = $view->render();\n }\n\n /**\n * Assert that the respon", "meta": {"filepath": "src/Illuminate/Testing/TestView.php", "language": "php", "file_size": 7039, "cut_index": 716, "middle_length": 229}} {"prefix": "te\\Testing\\Constraints;\n\nuse Illuminate\\Database\\Connection;\nuse PHPUnit\\Framework\\Constraint\\Constraint;\nuse ReflectionClass;\n\nclass CountInDatabase extends Constraint\n{\n /**\n * The database connection.\n *\n * @var \\Illuminate\\Database\\Connection\n */\n protected $database;\n\n /**\n * The expected table entries count that will be checked against the actual count.\n *\n * @var int\n */\n protected $expectedCount;\n\n /**\n * The actual table entries count that will be ", "suffix": " $expectedCount\n */\n public function __construct(Connection $database, int $expectedCount)\n {\n $this->expectedCount = $expectedCount;\n\n $this->database = $database;\n }\n\n /**\n * Check if the expected and actual count are eq", "middle": "checked against the expected count.\n *\n * @var int\n */\n protected $actualCount;\n\n /**\n * Create a new constraint instance.\n *\n * @param \\Illuminate\\Database\\Connection $database\n * @param int ", "meta": {"filepath": "src/Illuminate/Testing/Constraints/CountInDatabase.php", "language": "php", "file_size": 1885, "cut_index": 537, "middle_length": 229}} {"prefix": "use Illuminate\\Database\\Connection;\nuse PHPUnit\\Framework\\Constraint\\Constraint;\n\nclass HasInDatabase extends Constraint\n{\n /**\n * Number of records that will be shown in the console in case of failure.\n *\n * @var int\n */\n protected $show = 3;\n\n /**\n * The database connection.\n *\n * @var \\Illuminate\\Database\\Connection\n */\n protected $database;\n\n /**\n * The data that will be used to narrow the search in the database table.\n *\n * @var arraydata = $data;\n\n $this->database = $database;\n }\n\n /**\n * Check if the data is found in the given table.\n *\n * @param string $table\n * @return bool\n */\n public", "middle": "ixed>\n */\n protected $data;\n\n /**\n * Create a new constraint instance.\n *\n * @param \\Illuminate\\Database\\Connection $database\n * @param array $data\n */\n public function __constr", "meta": {"filepath": "src/Illuminate/Testing/Constraints/HasInDatabase.php", "language": "php", "file_size": 3249, "cut_index": 614, "middle_length": 229}} {"prefix": "bool\n */\n public function missing($path)\n {\n return ! $this->exists($path);\n }\n\n /**\n * Get the contents of a file.\n *\n * @param string $path\n * @param bool $lock\n * @return string\n *\n * @throws \\Illuminate\\Contracts\\Filesystem\\FileNotFoundException\n */\n public function get($path, $lock = false)\n {\n if ($this->isFile($path)) {\n return $lock ? $this->sharedGet($path) : file_get_contents($path);\n }\n\n throw new Fil", "suffix": "n array\n *\n * @throws \\Illuminate\\Contracts\\Filesystem\\FileNotFoundException\n */\n public function json($path, $flags = 0, $lock = false)\n {\n return json_decode($this->get($path, $lock), true, 512, $flags);\n }\n\n /**\n * Get", "middle": "eNotFoundException(\"File does not exist at path {$path}.\");\n }\n\n /**\n * Get the contents of a file as decoded JSON.\n *\n * @param string $path\n * @param int $flags\n * @param bool $lock\n * @retur", "meta": {"filepath": "src/Illuminate/Filesystem/Filesystem.php", "language": "php", "file_size": 20343, "cut_index": 1331, "middle_length": 229}} {"prefix": " RuntimeException;\n\nclass LocalFilesystemAdapter extends FilesystemAdapter\n{\n use Conditionable;\n\n /**\n * The name of the filesystem disk.\n *\n * @var string\n */\n protected $disk;\n\n /**\n * Indicates if signed URLs should serve corresponding files.\n *\n * @var bool\n */\n protected $shouldServeSignedUrls = false;\n\n /**\n * The Closure that should be used to resolve the URL generator.\n *\n * @var \\Closure\n */\n protected $urlGeneratorResolver;\n\n ", "suffix": "ls && $this->urlGeneratorResolver instanceof Closure\n );\n }\n\n /**\n * Determine if temporary upload URLs can be generated.\n *\n * @return bool\n */\n public function providesTemporaryUploadUrls()\n {\n return $this->temp", "middle": " /**\n * Determine if temporary URLs can be generated.\n *\n * @return bool\n */\n public function providesTemporaryUrls()\n {\n return $this->temporaryUrlCallback || (\n $this->shouldServeSignedUr", "meta": {"filepath": "src/Illuminate/Filesystem/LocalFilesystemAdapter.php", "language": "php", "file_size": 4003, "cut_index": 614, "middle_length": 229}} {"prefix": "ate\\Http\\Request;\nuse Illuminate\\Support\\Facades\\Route;\nuse Illuminate\\Support\\ServiceProvider;\nuse InvalidArgumentException;\n\nclass FilesystemServiceProvider extends ServiceProvider\n{\n /**\n * Bootstrap the filesystem.\n *\n * @return void\n */\n public function boot()\n {\n $this->serveFiles();\n }\n\n /**\n * Register the service provider.\n *\n * @return void\n */\n public function register()\n {\n $this->registerNativeFilesystem();\n $this->regist", "suffix": " return new Filesystem;\n });\n }\n\n /**\n * Register the driver based filesystem.\n *\n * @return void\n */\n protected function registerFlysystem()\n {\n $this->registerManager();\n\n $this->app->singleton('", "middle": "erFlysystem();\n }\n\n /**\n * Register the native filesystem implementation.\n *\n * @return void\n */\n protected function registerNativeFilesystem()\n {\n $this->app->singleton('files', function () {\n ", "meta": {"filepath": "src/Illuminate/Filesystem/FilesystemServiceProvider.php", "language": "php", "file_size": 4191, "cut_index": 614, "middle_length": 229}} {"prefix": "e\\Support\\InteractsWithTime;\nuse SessionHandlerInterface;\n\nclass ArraySessionHandler implements SessionHandlerInterface\n{\n use InteractsWithTime;\n\n /**\n * The array of stored values.\n *\n * @var array\n */\n protected $storage = [];\n\n /**\n * The number of minutes the session should be valid.\n *\n * @var int\n */\n protected $minutes;\n\n /**\n * Create a new array driven handler instance.\n *\n * @param int $minutes\n */\n public function __construct", "suffix": "@inheritdoc}\n *\n * @return bool\n */\n public function close(): bool\n {\n return true;\n }\n\n /**\n * {@inheritdoc}\n *\n * @return string|false\n */\n public function read($sessionId): string|false\n {\n if ", "middle": "($minutes)\n {\n $this->minutes = $minutes;\n }\n\n /**\n * {@inheritdoc}\n *\n * @return bool\n */\n public function open($savePath, $sessionName): bool\n {\n return true;\n }\n\n /**\n * {", "meta": {"filepath": "src/Illuminate/Session/ArraySessionHandler.php", "language": "php", "file_size": 2611, "cut_index": 563, "middle_length": 229}} {"prefix": "pace Illuminate\\Session;\n\nuse Illuminate\\Contracts\\Cache\\Factory as CacheFactory;\nuse Illuminate\\Session\\Middleware\\StartSession;\nuse Illuminate\\Support\\ServiceProvider;\n\nclass SessionServiceProvider extends ServiceProvider\n{\n /**\n * Register the service provider.\n *\n * @return void\n */\n public function register()\n {\n $this->registerSessionManager();\n\n $this->registerSessionDriver();\n\n $this->app->singleton(StartSession::class, function ($app) {\n retu", "suffix": " *\n * @return void\n */\n protected function registerSessionManager()\n {\n $this->app->singleton('session', function ($app) {\n return new SessionManager($app);\n });\n }\n\n /**\n * Register the session driver insta", "middle": "rn new StartSession($app->make(SessionManager::class), function () use ($app) {\n return $app->make(CacheFactory::class);\n });\n });\n }\n\n /**\n * Register the session manager instance.\n ", "meta": {"filepath": "src/Illuminate/Session/SessionServiceProvider.php", "language": "php", "file_size": 1489, "cut_index": 524, "middle_length": 229}} {"prefix": "te\\Auth\\AuthenticationException;\nuse Illuminate\\Contracts\\Auth\\Factory as AuthFactory;\nuse Illuminate\\Contracts\\Session\\Middleware\\AuthenticatesSessions;\nuse Illuminate\\Http\\Request;\n\nclass AuthenticateSession implements AuthenticatesSessions\n{\n /**\n * The authentication factory implementation.\n *\n * @var \\Illuminate\\Contracts\\Auth\\Factory\n */\n protected $auth;\n\n /**\n * The callback that should be used to generate the authentication redirect path.\n *\n * @var callable\n ", "suffix": " $this->auth = $auth;\n }\n\n /**\n * Handle an incoming request.\n *\n * @param \\Illuminate\\Http\\Request $request\n * @param \\Closure $next\n * @return mixed\n */\n public function handle($request, Closure $next)\n {\n ", "middle": " */\n protected static $redirectToCallback;\n\n /**\n * Create a new middleware instance.\n *\n * @param \\Illuminate\\Contracts\\Auth\\Factory $auth\n */\n public function __construct(AuthFactory $auth)\n {\n ", "meta": {"filepath": "src/Illuminate/Session/Middleware/AuthenticateSession.php", "language": "php", "file_size": 4992, "cut_index": 614, "middle_length": 229}} {"prefix": "?php\n\nnamespace Illuminate\\Testing;\n\nuse Illuminate\\Contracts\\Support\\DeferrableProvider;\nuse Illuminate\\Support\\ServiceProvider;\nuse Illuminate\\Testing\\Concerns\\TestCaches;\nuse Illuminate\\Testing\\Concerns\\TestDatabases;\nuse Illuminate\\Testing\\Concerns\\TestViews;\n\nclass ParallelTestingServiceProvider extends ServiceProvider implements DeferrableProvider\n{\n use TestCaches, TestDatabases, TestViews;\n\n /**\n * Boot the application's service providers.\n *\n * @return void\n */\n public func", "suffix": "rovider.\n *\n * @return void\n */\n public function register()\n {\n if ($this->app->runningInConsole()) {\n $this->app->singleton(ParallelTesting::class, function () {\n return new ParallelTesting($this->app);\n ", "middle": "tion boot()\n {\n if ($this->app->runningInConsole()) {\n $this->bootTestCache();\n $this->bootTestDatabase();\n $this->bootTestViews();\n }\n }\n\n /**\n * Register the service p", "meta": {"filepath": "src/Illuminate/Testing/ParallelTestingServiceProvider.php", "language": "php", "file_size": 1031, "cut_index": 513, "middle_length": 229}} {"prefix": ";\nuse PHPUnit\\Framework\\ExpectationFailedException;\nuse ReflectionProperty;\n\n/**\n * @internal\n *\n * @mixin Assert\n */\nclass TestResponseAssert\n{\n /**\n * Create a new TestResponse assertion helper.\n */\n private function __construct(protected TestResponse $response)\n {\n //\n }\n\n /**\n * Create a new TestResponse assertion helper.\n */\n public static function withResponse(TestResponse $response): static\n {\n return new static($response);\n }\n\n /**\n * Pass", "suffix": " */\n public function __call($name, $arguments)\n {\n try {\n Assert::$name(...$arguments);\n } catch (ExpectationFailedException $e) {\n throw $this->injectResponseContext($e);\n }\n }\n\n /**\n * Pass sta", "middle": " method calls to the Assert class and decorate the exception message.\n *\n * @param string $name\n * @param array $arguments\n * @return void\n *\n * @throws \\PHPUnit\\Framework\\ExpectationFailedException\n ", "meta": {"filepath": "src/Illuminate/Testing/TestResponseAssert.php", "language": "php", "file_size": 4953, "cut_index": 614, "middle_length": 229}} {"prefix": "nstraint;\nuse SebastianBergmann\\Comparator\\ComparisonFailure;\nuse SebastianBergmann\\Exporter\\Exporter;\nuse Traversable;\n\nclass ArraySubset extends Constraint\n{\n /**\n * @var iterable\n */\n protected $subset;\n\n /**\n * @var bool\n */\n protected $strict;\n\n /**\n * Create a new array subset constraint instance.\n *\n * @param iterable $subset\n * @param bool $strict\n */\n public function __construct(iterable $subset, bool $strict = false)\n {\n $this->st", "suffix": "e. null is returned otherwise.\n *\n * If $returnResult is true, the result of the evaluation is returned as\n * a boolean value instead: true in case of success, false in case of a\n * failure.\n *\n * @param mixed $other\n * @param", "middle": "rict = $strict;\n $this->subset = $subset;\n }\n\n /**\n * Evaluates the constraint for parameter $other.\n *\n * If $returnResult is set to false (the default), an exception is thrown\n * in case of a failur", "meta": {"filepath": "src/Illuminate/Testing/Constraints/ArraySubset.php", "language": "php", "file_size": 3671, "cut_index": 614, "middle_length": 229}} {"prefix": "se PHPUnit\\Framework\\Constraint\\Constraint;\nuse ReflectionClass;\n\nclass SeeInHtml extends Constraint\n{\n /**\n * The string under validation.\n *\n * @var string\n */\n protected $content;\n\n /**\n * Indicates the values must appear in order.\n *\n * @var bool\n */\n protected $ordered;\n\n /**\n * Indicates whether to negate the assertion.\n *\n * @var bool\n */\n protected $negate;\n\n /**\n * The last value that failed to pass validation.\n *\n * @", "suffix": " $this->content = $content;\n $this->ordered = $ordered;\n $this->negate = $negate;\n }\n\n /**\n * Determine if the rule passes validation.\n *\n * @param array $values\n */\n public function matches($values): bool\n ", "middle": "var string\n */\n protected $failedValue;\n\n /**\n * Create a new constraint instance.\n *\n * @param string $content\n */\n public function __construct($content, $ordered = false, $negate = false)\n {\n ", "meta": {"filepath": "src/Illuminate/Testing/Constraints/SeeInHtml.php", "language": "php", "file_size": 3006, "cut_index": 563, "middle_length": 229}} {"prefix": "te\\Testing\\Constraints;\n\nuse PHPUnit\\Framework\\Constraint\\Constraint;\nuse ReflectionClass;\n\nclass SeeInOrder extends Constraint\n{\n /**\n * The string under validation.\n *\n * @var string\n */\n protected $content;\n\n /**\n * The last value that failed to pass validation.\n *\n * @var string\n */\n protected $failedValue;\n\n /**\n * Create a new constraint instance.\n *\n * @param string $content\n */\n public function __construct($content)\n {\n $t", "suffix": "tml_entity_decode($this->content, ENT_QUOTES, 'UTF-8');\n\n $position = 0;\n\n foreach ($values as $value) {\n if (empty($value)) {\n continue;\n }\n\n $decodedValue = html_entity_decode($value, ENT_QUOT", "middle": "his->content = $content;\n }\n\n /**\n * Determine if the rule passes validation.\n *\n * @param array $values\n * @return bool\n */\n public function matches($values): bool\n {\n $decodedContent = h", "meta": {"filepath": "src/Illuminate/Testing/Constraints/SeeInOrder.php", "language": "php", "file_size": 1928, "cut_index": 537, "middle_length": 229}} {"prefix": "ting;\nuse Illuminate\\Testing\\ParallelConsoleOutput;\nuse PHPUnit\\TextUI\\Configuration\\PhpHandler;\nuse RuntimeException;\nuse Symfony\\Component\\Console\\Output\\ConsoleOutput;\nuse Symfony\\Component\\Console\\Output\\OutputInterface;\n\ntrait RunsInParallel\n{\n /**\n * The application resolver callback.\n *\n * @var \\Closure|null\n */\n protected static $applicationResolver;\n\n /**\n * The runner resolver callback.\n *\n * @var \\Closure|null\n */\n protected static $runnerResolver;\n\n ", "suffix": "le\\Output\\OutputInterface\n */\n protected $output;\n\n /**\n * The original test runner.\n *\n * @var \\ParaTest\\Runners\\PHPUnit\\RunnerInterface|\\ParaTest\\RunnerInterface\n */\n protected $runner;\n\n /**\n * Creates a new test runn", "middle": " /**\n * The original test runner options.\n *\n * @var \\ParaTest\\Runners\\PHPUnit\\Options|\\ParaTest\\Options\n */\n protected $options;\n\n /**\n * The output instance.\n *\n * @var \\Symfony\\Component\\Conso", "meta": {"filepath": "src/Illuminate/Testing/Concerns/RunsInParallel.php", "language": "php", "file_size": 5119, "cut_index": 716, "middle_length": 229}} {"prefix": "\nnamespace Illuminate\\Testing\\Concerns;\n\nuse Illuminate\\Support\\Facades\\ParallelTesting;\n\ntrait TestCaches\n{\n /**\n * The original cache prefix prior to appending the token.\n *\n * @var string|null\n */\n protected static $originalCachePrefix = null;\n\n /**\n * Boot test cache for parallel testing.\n *\n * @return void\n */\n protected function bootTestCache()\n {\n ParallelTesting::setUpTestCase(function () {\n if (ParallelTesting::option('without_cache')", "suffix": "function parallelSafeCachePrefix()\n {\n self::$originalCachePrefix ??= $this->app['config']->get('cache.prefix', '');\n\n return self::$originalCachePrefix.'test_'.ParallelTesting::token().'_';\n }\n\n /**\n * Switch to the given cache ", "middle": ") {\n return;\n }\n\n $this->switchToCachePrefix($this->parallelSafeCachePrefix());\n });\n }\n\n /**\n * Get the test cache prefix.\n *\n * @return string\n */\n protected ", "meta": {"filepath": "src/Illuminate/Testing/Concerns/TestCaches.php", "language": "php", "file_size": 1203, "cut_index": 518, "middle_length": 229}} {"prefix": "\\Exceptions;\n\nuse PHPUnit\\Framework\\Exception;\n\nclass InvalidArgumentException extends Exception\n{\n /**\n * Creates a new exception for an invalid argument.\n *\n * @param int $argument\n * @param string $type\n * @return static\n */\n public static function create(int $argument, string $type): static\n {\n $stack = debug_backtrace();\n\n $function = $stack[1]['function'];\n\n if (isset($stack[1]['class'])) {\n $function = sprintf('%s::%s', $stack[1]['c", "suffix": "eturn new static(\n sprintf(\n 'Argument #%d of %s() must be %s %s',\n $argument,\n $function,\n in_array(lcfirst($type)[0], ['a', 'e', 'i', 'o', 'u'], true) ? 'an' : 'a',\n $t", "middle": "lass'], $stack[1]['function']);\n }\n\n r", "meta": {"filepath": "src/Illuminate/Testing/Exceptions/InvalidArgumentException.php", "language": "php", "file_size": 892, "cut_index": 547, "middle_length": 52}} {"prefix": "use Illuminate\\Support\\Arr;\nuse Illuminate\\Support\\Traits\\Conditionable;\nuse Illuminate\\Support\\Traits\\Macroable;\nuse Illuminate\\Support\\Traits\\Tappable;\nuse Illuminate\\Testing\\AssertableJsonString;\nuse PHPUnit\\Framework\\Assert as PHPUnit;\n\nclass AssertableJson implements Arrayable\n{\n use Concerns\\Has,\n Concerns\\Matching,\n Concerns\\Debugging,\n Concerns\\Interaction,\n Conditionable,\n Macroable,\n Tappable;\n\n /**\n * The properties in the current scope.\n *\n", "suffix": " *\n * @param array $props\n * @param string|null $path\n */\n protected function __construct(array $props, ?string $path = null)\n {\n $this->path = $path;\n $this->props = $props;\n }\n\n /**\n * Compose the absolute \"d", "middle": " * @var array\n */\n private $props;\n\n /**\n * The \"dot\" path to the current scope.\n *\n * @var string|null\n */\n private $path;\n\n /**\n * Create a new fluent, assertable JSON data instance.\n ", "meta": {"filepath": "src/Illuminate/Testing/Fluent/AssertableJson.php", "language": "php", "file_size": 4263, "cut_index": 614, "middle_length": 229}} {"prefix": "\\Support\\Facades\\DB;\nuse Illuminate\\Support\\Facades\\ParallelTesting;\nuse Illuminate\\Support\\Facades\\Schema;\n\ntrait TestDatabases\n{\n /**\n * Indicates if the test database schema is up to date.\n *\n * @var bool\n */\n protected static $schemaIsUpToDate = false;\n\n /**\n * The root database name prior to concatenating the token.\n *\n * @var null|string\n */\n protected static $originalDatabaseName = null;\n\n /**\n * Boot a test database.\n *\n * @return void\n ", "suffix": "atabases')) {\n Schema::dropDatabaseIfExists(\n $this->testDatabase($database)\n );\n }\n });\n });\n\n ParallelTesting::setUpTestCase(function ($testCase) {\n ", "middle": "*/\n protected function bootTestDatabase()\n {\n ParallelTesting::setUpProcess(function () {\n $this->whenNotUsingInMemoryDatabase(function ($database) {\n if (ParallelTesting::option('recreate_d", "meta": {"filepath": "src/Illuminate/Testing/Concerns/TestDatabases.php", "language": "php", "file_size": 5778, "cut_index": 716, "middle_length": 229}} {"prefix": "uminate\\Support\\enum_value;\n\ntrait Matching\n{\n /**\n * Asserts that the property matches the expected value.\n *\n * @param string $key\n * @param mixed|\\Closure $expected\n * @return $this\n */\n public function where(string $key, $expected): static\n {\n $this->has($key);\n\n $actual = $this->prop($key);\n\n if ($expected instanceof Closure) {\n PHPUnit::assertTrue(\n $expected(is_array($actual) ? new Collection($actual) : $actual),\n ", "suffix": "Array()\n : enum_value($expected);\n\n $this->ensureSorted($expected);\n $this->ensureSorted($actual);\n\n PHPUnit::assertSame(\n $expected,\n $actual,\n sprintf('Property [%s] does not match the expe", "middle": " sprintf('Property [%s] was marked as invalid using a closure.', $this->dotPath($key))\n );\n\n return $this;\n }\n\n $expected = $expected instanceof Arrayable\n ? $expected->to", "meta": {"filepath": "src/Illuminate/Testing/Fluent/Concerns/Matching.php", "language": "php", "file_size": 7066, "cut_index": 716, "middle_length": 229}} {"prefix": "osed to the component.\n *\n * @var array\n */\n protected $except = [];\n\n /**\n * The component alias name.\n *\n * @var string\n */\n public $componentName;\n\n /**\n * The component attributes.\n *\n * @var \\Illuminate\\View\\ComponentAttributeBag\n */\n public $attributes;\n\n /**\n * The view factory instance, if any.\n *\n * @var \\Illuminate\\Contracts\\View\\Factory|null\n */\n protected static $factory;\n\n /**\n * The component resolver callb", "suffix": "/\n protected static $bladeViewCache = [];\n\n /**\n * The cache of public property names, keyed by class.\n *\n * @var array\n */\n protected static $propertyCache = [];\n\n /**\n * The cache of public method names, keyed by class.\n ", "middle": "ack.\n *\n * @var (\\Closure(string, array): Component)|null\n */\n protected static $componentsResolver;\n\n /**\n * The cache of blade view names, keyed by contents.\n *\n * @var array\n *", "meta": {"filepath": "src/Illuminate/View/Component.php", "language": "php", "file_size": 12937, "cut_index": 921, "middle_length": 229}} {"prefix": "ontracts\\Support\\Htmlable;\nuse InvalidArgumentException;\nuse Stringable;\n\nclass ComponentSlot implements Htmlable, Stringable\n{\n /**\n * The slot attribute bag.\n *\n * @var \\Illuminate\\View\\ComponentAttributeBag\n */\n public $attributes;\n\n /**\n * The slot contents.\n *\n * @var string\n */\n protected $contents;\n\n /**\n * Create a new slot instance.\n *\n * @param string $contents\n * @param array $attributes\n */\n public function __construct($co", "suffix": "y $attributes\n * @return $this\n */\n public function withAttributes(array $attributes)\n {\n $this->attributes = new ComponentAttributeBag($attributes);\n\n return $this;\n }\n\n /**\n * Get the slot's HTML string.\n *\n ", "middle": "ntents = '', $attributes = [])\n {\n $this->contents = $contents;\n\n $this->withAttributes($attributes);\n }\n\n /**\n * Set the extra attributes that the slot should make available.\n *\n * @param arra", "meta": {"filepath": "src/Illuminate/View/ComponentSlot.php", "language": "php", "file_size": 2286, "cut_index": 563, "middle_length": 229}} {"prefix": "**\n * Call a custom driver creator.\n *\n * @param string $driver\n * @return \\Illuminate\\Session\\Store\n */\n protected function callCustomCreator($driver)\n {\n return $this->buildSession(parent::callCustomCreator($driver));\n }\n\n /**\n * Create an instance of the \"null\" session driver.\n *\n * @return \\Illuminate\\Session\\Store\n */\n protected function createNullDriver()\n {\n return $this->buildSession(new NullSessionHandler);\n }\n\n /**\n * ", "suffix": "his->config->get('session.lifetime')\n ));\n }\n\n /**\n * Create an instance of the \"cookie\" session driver.\n *\n * @return \\Illuminate\\Session\\Store\n */\n protected function createCookieDriver()\n {\n return $this->buildS", "middle": "Create an instance of the \"array\" session driver.\n *\n * @return \\Illuminate\\Session\\Store\n */\n protected function createArrayDriver()\n {\n return $this->buildSession(new ArraySessionHandler(\n $t", "meta": {"filepath": "src/Illuminate/Session/SessionManager.php", "language": "php", "file_size": 7314, "cut_index": 716, "middle_length": 229}} {"prefix": "pace Illuminate\\Testing;\n\nuse Illuminate\\Support\\Collection;\nuse Illuminate\\Support\\Str;\nuse Symfony\\Component\\Console\\Output\\ConsoleOutput;\n\nclass ParallelConsoleOutput extends ConsoleOutput\n{\n /**\n * The original output instance.\n *\n * @var \\Symfony\\Component\\Console\\Output\\OutputInterface\n */\n protected $output;\n\n /**\n * The output that should be ignored.\n *\n * @var array\n */\n protected $ignore = [\n 'Running phpunit in',\n 'Configuration read from'", "suffix": "truct(\n $output->getVerbosity(),\n $output->isDecorated(),\n $output->getFormatter(),\n );\n\n $this->output = $output;\n }\n\n /**\n * Writes a message to the output.\n *\n * @param string|iterable $", "middle": ",\n ];\n\n /**\n * Create a new Parallel ConsoleOutput instance.\n *\n * @param \\Symfony\\Component\\Console\\Output\\OutputInterface $output\n */\n public function __construct($output)\n {\n parent::__cons", "meta": {"filepath": "src/Illuminate/Testing/ParallelConsoleOutput.php", "language": "php", "file_size": 1405, "cut_index": 524, "middle_length": 229}} {"prefix": "se Illuminate\\Database\\Connection;\nuse PHPUnit\\Framework\\Constraint\\Constraint;\n\nclass NotSoftDeletedInDatabase extends Constraint\n{\n /**\n * Number of records that will be shown in the console in case of failure.\n *\n * @var int\n */\n protected $show = 3;\n\n /**\n * The database connection.\n *\n * @var \\Illuminate\\Database\\Connection\n */\n protected $database;\n\n /**\n * The data that will be used to narrow the search in the database table.\n *\n * @var array", "suffix": " *\n * @param \\Illuminate\\Database\\Connection $database\n * @param array $data\n * @param string $deletedAtColumn\n */\n public function __construct(Connection $database, array $data, string $deletedAtColumn)\n {\n $this->dat", "middle": "\n */\n protected $data;\n\n /**\n * The name of the column that indicates soft deletion has occurred.\n *\n * @var string\n */\n protected $deletedAtColumn;\n\n /**\n * Create a new constraint instance.\n ", "meta": {"filepath": "src/Illuminate/Testing/Constraints/NotSoftDeletedInDatabase.php", "language": "php", "file_size": 2702, "cut_index": 563, "middle_length": 229}} {"prefix": "rn $this\n */\n public function assertOk()\n {\n return $this->assertStatus(200);\n }\n\n /**\n * Assert that the response has a 201 \"Created\" status code.\n *\n * @return $this\n */\n public function assertCreated()\n {\n return $this->assertStatus(201);\n }\n\n /**\n * Assert that the response has a 202 \"Accepted\" status code.\n *\n * @return $this\n */\n public function assertAccepted()\n {\n return $this->assertStatus(202);\n }\n\n /**\n ", "suffix": ";\n\n PHPUnit::assertEmpty($this->getContent(), 'Response content is not empty.');\n\n return $this;\n }\n\n /**\n * Assert that the response has a 301 \"Moved Permanently\" status code.\n *\n * @return $this\n */\n public function", "middle": " * Assert that the response has the given status code and no content.\n *\n * @param int $status\n * @return $this\n */\n public function assertNoContent($status = 204)\n {\n $this->assertStatus($status)", "meta": {"filepath": "src/Illuminate/Testing/Concerns/AssertsStatusCodes.php", "language": "php", "file_size": 5528, "cut_index": 716, "middle_length": 229}} {"prefix": "size.\n *\n * @param string|int $key\n * @param int|null $length\n * @return $this\n */\n public function count($key, ?int $length = null): static\n {\n if (is_null($length)) {\n $path = $this->dotPath();\n\n PHPUnit::assertCount(\n $key,\n $this->prop(),\n $path\n ? sprintf('Property [%s] does not have the expected size.', $path)\n : sprintf('Root level does not have the expected si", "suffix": "y))\n );\n\n return $this;\n }\n\n /**\n * Assert that the prop size is between a given minimum and maximum.\n *\n * @param int|string $min\n * @param int|string $max\n * @return $this\n */\n public function countBetwe", "middle": "ze.')\n );\n\n return $this;\n }\n\n PHPUnit::assertCount(\n $length,\n $this->prop($key),\n sprintf('Property [%s] does not have the expected size.', $this->dotPath($ke", "meta": {"filepath": "src/Illuminate/Testing/Fluent/Concerns/Has.php", "language": "php", "file_size": 6101, "cut_index": 716, "middle_length": 229}} {"prefix": "pace Illuminate\\Testing\\Fluent\\Concerns;\n\nuse Illuminate\\Support\\Str;\nuse PHPUnit\\Framework\\Assert as PHPUnit;\n\ntrait Interaction\n{\n /**\n * The list of interacted properties.\n *\n * @var array\n */\n protected $interacted = [];\n\n /**\n * Marks the property as interacted.\n *\n * @param string $key\n * @return void\n */\n protected function interactsWith(string $key): void\n {\n $prop = Str::before($key, '.');\n\n if (! in_array($prop, $this->interacted, ", "suffix": "nit::assertSame(\n [],\n array_diff(array_keys($this->prop()), $this->interacted),\n $this->path\n ? sprintf('Unexpected properties were found in scope [%s].', $this->path)\n : 'Unexpected propertie", "middle": "true)) {\n $this->interacted[] = $prop;\n }\n }\n\n /**\n * Asserts that all properties have been interacted with.\n *\n * @return void\n */\n public function interacted(): void\n {\n PHPU", "meta": {"filepath": "src/Illuminate/Testing/Fluent/Concerns/Interaction.php", "language": "php", "file_size": 1476, "cut_index": 524, "middle_length": 229}} {"prefix": "acroable;\nuse IteratorAggregate;\nuse JsonSerializable;\nuse Stringable;\nuse Traversable;\n\nclass ComponentAttributeBag implements Arrayable, ArrayAccess, IteratorAggregate, JsonSerializable, Htmlable, Stringable\n{\n use Conditionable, InteractsWithData, Macroable;\n\n /**\n * The raw array of attributes.\n *\n * @var array\n */\n protected $attributes = [];\n\n /**\n * Create a new component attribute bag instance.\n *\n * @param array $attributes\n */\n public function __con", "suffix": "ull)\n {\n if (is_null($keys)) {\n return $this->attributes;\n }\n\n return $this->only($keys)->toArray();\n }\n\n /**\n * Get the first attribute's value.\n *\n * @param mixed $default\n * @return mixed\n *", "middle": "struct(array $attributes = [])\n {\n $this->setAttributes($attributes);\n }\n\n /**\n * Get all the attribute values.\n *\n * @param mixed $keys\n * @return array\n */\n public function all($keys = n", "meta": {"filepath": "src/Illuminate/View/ComponentAttributeBag.php", "language": "php", "file_size": 12201, "cut_index": 921, "middle_length": 229}} {"prefix": "\nnamespace Illuminate\\Testing;\n\nuse ArrayAccess;\nuse Illuminate\\Testing\\Constraints\\ArraySubset;\nuse Illuminate\\Testing\\Exceptions\\InvalidArgumentException;\nuse PHPUnit\\Framework\\Assert as PHPUnit;\n\n/**\n * @internal This class is not meant to be used or overwritten outside the framework itself.\n */\nabstract class Assert extends PHPUnit\n{\n /**\n * Asserts that an array has a specified subset.\n *\n * @param \\ArrayAccess|array $subset\n * @param \\ArrayAccess|array $array\n * @param bool", "suffix": "et) || $subset instanceof ArrayAccess)) {\n throw InvalidArgumentException::create(1, 'array or ArrayAccess');\n }\n\n if (! (is_array($array) || $array instanceof ArrayAccess)) {\n throw InvalidArgumentException::create(2, '", "middle": " $checkForIdentity\n * @param string $msg\n * @return void\n */\n public static function assertArraySubset($subset, $array, bool $checkForIdentity = false, string $msg = ''): void\n {\n if (! (is_array($subs", "meta": {"filepath": "src/Illuminate/Testing/Assert.php", "language": "php", "file_size": 1170, "cut_index": 518, "middle_length": 229}} {"prefix": "se Illuminate\\Database\\Connection;\nuse PHPUnit\\Framework\\Constraint\\Constraint;\n\nclass SoftDeletedInDatabase extends Constraint\n{\n /**\n * Number of records that will be shown in the console in case of failure.\n *\n * @var int\n */\n protected $show = 3;\n\n /**\n * The database connection.\n *\n * @var \\Illuminate\\Database\\Connection\n */\n protected $database;\n\n /**\n * The data that will be used to narrow the search in the database table.\n *\n * @var array\n ", "suffix": " *\n * @param \\Illuminate\\Database\\Connection $database\n * @param array $data\n * @param string $deletedAtColumn\n */\n public function __construct(Connection $database, array $data, string $deletedAtColumn)\n {\n $this->data =", "middle": " */\n protected $data;\n\n /**\n * The name of the column that indicates soft deletion has occurred.\n *\n * @var string\n */\n protected $deletedAtColumn;\n\n /**\n * Create a new constraint instance.\n ", "meta": {"filepath": "src/Illuminate/Testing/Constraints/SoftDeletedInDatabase.php", "language": "php", "file_size": 2708, "cut_index": 563, "middle_length": 229}} {"prefix": "\nnamespace Illuminate\\View;\n\nclass AnonymousComponent extends Component\n{\n /**\n * The component view.\n *\n * @var string\n */\n protected $view;\n\n /**\n * The component data.\n *\n * @var array\n */\n protected $data = [];\n\n /**\n * Create a new anonymous component instance.\n *\n * @param string $view\n * @param array $data\n */\n public function __construct($view, $data)\n {\n $this->view = $view;\n $this->data = $data;\n }\n\n /", "suffix": "o the view.\n *\n * @return array\n */\n public function data()\n {\n $this->attributes = $this->attributes ?: $this->newAttributeBag();\n\n return array_merge(\n ($this->data['attributes'] ?? null)?->getAttributes() ?: []", "middle": "**\n * Get the view / view contents that represent the component.\n *\n * @return string\n */\n public function render()\n {\n return $this->view;\n }\n\n /**\n * Get the data that should be supplied t", "meta": {"filepath": "src/Illuminate/View/AnonymousComponent.php", "language": "php", "file_size": 1145, "cut_index": 518, "middle_length": 229}} {"prefix": "inate\\Testing\\Constraints\\SeeInOrder;\nuse Stringable;\n\nclass TestComponent implements Stringable\n{\n use Macroable {\n __call as macroCall;\n }\n\n /**\n * The original component.\n *\n * @var \\Illuminate\\View\\Component\n */\n public $component;\n\n /**\n * The rendered component contents.\n *\n * @var string\n */\n protected $rendered;\n\n /**\n * Create a new test component instance.\n *\n * @param \\Illuminate\\View\\Component $component\n * @param \\Il", "suffix": "rray of strings are contained within the rendered component.\n *\n * @param string|list $value\n * @param bool $escape\n * @return $this\n */\n public function assertSee($value, $escape = true)\n {\n $value = Arr::wrap(", "middle": "luminate\\View\\View $view\n */\n public function __construct($component, $view)\n {\n $this->component = $component;\n\n $this->rendered = $view->render();\n }\n\n /**\n * Assert that the given string or a", "meta": {"filepath": "src/Illuminate/Testing/TestComponent.php", "language": "php", "file_size": 5716, "cut_index": 716, "middle_length": 229}} {"prefix": "te\\Testing\\Concerns;\n\nuse Illuminate\\Support\\Facades\\File;\nuse Illuminate\\Support\\Facades\\ParallelTesting;\n\ntrait TestViews\n{\n /**\n * The original compiled view path prior to appending the token.\n *\n * @var string|null\n */\n protected static $originalCompiledViewPath = null;\n\n /**\n * Boot test views for parallel testing.\n *\n * @return void\n */\n protected function bootTestViews()\n {\n ParallelTesting::setUpProcess(function () {\n if ($path = $this", "suffix": ") {\n $this->switchToCompiledViewPath($path);\n }\n });\n\n ParallelTesting::tearDownProcess(function () {\n if ($path = $this->parallelSafeCompiledViewPath()) {\n File::deleteDirectory($path);\n ", "middle": "->parallelSafeCompiledViewPath()) {\n File::ensureDirectoryExists($path);\n }\n });\n\n ParallelTesting::setUpTestCase(function () {\n if ($path = $this->parallelSafeCompiledViewPath()", "meta": {"filepath": "src/Illuminate/Testing/Concerns/TestViews.php", "language": "php", "file_size": 2004, "cut_index": 537, "middle_length": 229}} {"prefix": "\n * @var \\Illuminate\\Filesystem\\Filesystem\n */\n protected $files;\n\n /**\n * The array of active view paths.\n *\n * @var string[]\n */\n protected $paths;\n\n /**\n * The array of views that have been located.\n *\n * @var array\n */\n protected $views = [];\n\n /**\n * The namespace to file path hints.\n *\n * @var array\n */\n protected $hints = [];\n\n /**\n * Register a view extension with the finder.\n *\n ", "suffix": "ing[] $paths\n * @param string[]|null $extensions\n */\n public function __construct(Filesystem $files, array $paths, ?array $extensions = null)\n {\n $this->files = $files;\n $this->paths = array_map($this->resolvePath(...), $path", "middle": " * @var string[]\n */\n protected $extensions = ['blade.php', 'php', 'css', 'html'];\n\n /**\n * Create a new file view loader instance.\n *\n * @param \\Illuminate\\Filesystem\\Filesystem $files\n * @param str", "meta": {"filepath": "src/Illuminate/View/FileViewFinder.php", "language": "php", "file_size": 7420, "cut_index": 716, "middle_length": 229}} {"prefix": "r;\nuse Closure;\nuse Illuminate\\Contracts\\Support\\DeferringDisplayableValue;\nuse Illuminate\\Support\\Enumerable;\nuse IteratorAggregate;\nuse Stringable;\nuse Traversable;\n\nclass InvokableComponentVariable implements DeferringDisplayableValue, IteratorAggregate, Stringable\n{\n /**\n * The callable instance to resolve the variable value.\n *\n * @var \\Closure\n */\n protected $callable;\n\n /**\n * Create a new variable instance.\n *\n * @param \\Closure $callable\n */\n public fun", "suffix": " */\n public function resolveDisplayableValue()\n {\n return $this->__invoke();\n }\n\n /**\n * Get an iterator instance for the variable.\n *\n * @return \\ArrayIterator\n */\n public function getIterator(): Traversable\n {", "middle": "ction __construct(Closure $callable)\n {\n $this->callable = $callable;\n }\n\n /**\n * Resolve the displayable value that the class is deferring.\n *\n * @return \\Illuminate\\Contracts\\Support\\Htmlable|string\n", "meta": {"filepath": "src/Illuminate/View/InvokableComponentVariable.php", "language": "php", "file_size": 2033, "cut_index": 563, "middle_length": 229}} {"prefix": "\\MessageBag;\nuse Illuminate\\Support\\Str;\nuse Illuminate\\Support\\Traits\\Macroable;\nuse Illuminate\\Support\\ViewErrorBag;\nuse Stringable;\nuse Throwable;\n\nclass View implements ArrayAccess, Htmlable, Stringable, ViewContract\n{\n use Macroable {\n __call as macroCall;\n }\n\n /**\n * The view factory instance.\n *\n * @var \\Illuminate\\View\\Factory\n */\n protected $factory;\n\n /**\n * The engine implementation.\n *\n * @var \\Illuminate\\Contracts\\View\\Engine\n */\n protect", "suffix": "e view file.\n *\n * @var string\n */\n protected $path;\n\n /**\n * Create a new view instance.\n *\n * @param \\Illuminate\\View\\Factory $factory\n * @param \\Illuminate\\Contracts\\View\\Engine $engine\n * @param string $view\n", "middle": "ed $engine;\n\n /**\n * The name of the view.\n *\n * @var string\n */\n protected $view;\n\n /**\n * The array of view data.\n *\n * @var array\n */\n protected $data;\n\n /**\n * The path to th", "meta": {"filepath": "src/Illuminate/View/View.php", "language": "php", "file_size": 11579, "cut_index": 921, "middle_length": 229}} {"prefix": "pace Illuminate\\View;\n\ninterface ViewFinderInterface\n{\n /**\n * Hint path delimiter value.\n *\n * @var string\n */\n const HINT_PATH_DELIMITER = '::';\n\n /**\n * Get the fully-qualified location of the view.\n *\n * @param string $view\n * @return string\n */\n public function find($view);\n\n /**\n * Add a location to the finder.\n *\n * @param string $location\n * @return void\n */\n public function addLocation($location);\n\n /**\n * Add a na", "suffix": "o the finder.\n *\n * @param string $namespace\n * @param string|array $hints\n * @return void\n */\n public function prependNamespace($namespace, $hints);\n\n /**\n * Replace the namespace hints for the given namespace.\n *\n ", "middle": "mespace hint to the finder.\n *\n * @param string $namespace\n * @param string|array $hints\n * @return void\n */\n public function addNamespace($namespace, $hints);\n\n /**\n * Prepend a namespace hint t", "meta": {"filepath": "src/Illuminate/View/ViewFinderInterface.php", "language": "php", "file_size": 1451, "cut_index": 524, "middle_length": 229}} {"prefix": "nate\\Database\\RecordsNotFoundException;\nuse Illuminate\\Filesystem\\Filesystem;\nuse Illuminate\\Http\\Exceptions\\HttpResponseException;\nuse Illuminate\\Support\\Str;\nuse Illuminate\\View\\Compilers\\CompilerInterface;\nuse Illuminate\\View\\ViewException;\nuse Symfony\\Component\\HttpKernel\\Exception\\HttpException;\nuse Throwable;\n\nclass CompilerEngine extends PhpEngine\n{\n /**\n * The Blade compiler instance.\n *\n * @var \\Illuminate\\View\\Compilers\\CompilerInterface\n */\n protected $compiler;\n\n /**\n ", "suffix": "ng, true>\n */\n protected $compiledOrNotExpired = [];\n\n /**\n * Create a new compiler engine instance.\n *\n * @param \\Illuminate\\View\\Compilers\\CompilerInterface $compiler\n * @param \\Illuminate\\Filesystem\\Filesystem|null $files\n ", "middle": " * A stack of the last compiled templates.\n *\n * @var array\n */\n protected $lastCompiled = [];\n\n /**\n * The view paths that were compiled or are not expired, keyed by the path.\n *\n * @var arrayfiles = $files;\n }\n\n /**\n * Get the ev", "suffix": " }\n\n /**\n * Get the evaluated contents of the view at the given path.\n *\n * @param string $path\n * @param array $data\n * @return string\n */\n protected function evaluatePath($path, $data)\n {\n $obLevel = ob_get_", "middle": "aluated contents of the view.\n *\n * @param string $path\n * @param array $data\n * @return string\n */\n public function get($path, array $data = [])\n {\n return $this->evaluatePath($path, $data);\n", "meta": {"filepath": "src/Illuminate/View/Engines/PhpEngine.php", "language": "php", "file_size": 1861, "cut_index": 537, "middle_length": 229}} {"prefix": "* The component class namespaces.\n *\n * @var array\n */\n protected $namespaces = [];\n\n /**\n * The \"bind:\" attributes that have been compiled for the current component.\n *\n * @var array\n */\n protected $boundAttributes = [];\n\n /**\n * Create a new component tag compiler.\n *\n * @param array $aliases\n * @param array $namespaces\n * @param \\Illuminate\\View\\Compilers\\BladeCompiler|null $blade\n */\n public function __construct(array $aliases = []", "suffix": " }\n\n /**\n * Compile the component and slot tags within the given string.\n *\n * @param string $value\n * @return string\n */\n public function compile(string $value)\n {\n $value = $this->compileSlots($value);\n\n retu", "middle": ", array $namespaces = [], ?BladeCompiler $blade = null)\n {\n $this->aliases = $aliases;\n $this->namespaces = $namespaces;\n\n $this->blade = $blade ?: new BladeCompiler(new Filesystem, sys_get_temp_dir());\n ", "meta": {"filepath": "src/Illuminate/View/Compilers/ComponentTagCompiler.php", "language": "php", "file_size": 26804, "cut_index": 1331, "middle_length": 229}} {"prefix": ";\n\ntrait CompilesAuthorizations\n{\n /**\n * Compile the can statements into valid PHP.\n *\n * @param string $expression\n * @return string\n */\n protected function compileCan($expression)\n {\n return \"check{$expression}): ?>\";\n }\n\n /**\n * Compile the cannot statements into valid PHP.\n *\n * @param string $expression\n * @return string\n */\n protected function compileCannot($expressio", "suffix": " * @return string\n */\n protected function compileCanany($expression)\n {\n return \"any{$expression}): ?>\";\n }\n\n /**\n * Compile the else-can statements into valid ", "middle": "n)\n {\n return \"denies{$expression}): ?>\";\n }\n\n /**\n * Compile the canany statements into valid PHP.\n *\n * @param string $expression\n ", "meta": {"filepath": "src/Illuminate/View/Compilers/Concerns/CompilesAuthorizations.php", "language": "php", "file_size": 2502, "cut_index": 563, "middle_length": 229}} {"prefix": "ion compileAuth($guard = null)\n {\n $guard = is_null($guard) ? '()' : $guard;\n\n return \"guard{$guard}->check()): ?>\";\n }\n\n /**\n * Compile the else-auth statements into valid PHP.\n *\n * @param string|null $guard\n * @return string\n */\n protected function compileElseAuth($guard = null)\n {\n $guard = is_null($guard) ? '()' : $guard;\n\n return \"guard{$guard}->check()): ?>\";\n }\n\n /**\n * Compile the end-au", "suffix": "ram string $environments\n * @return string\n */\n protected function compileEnv($environments)\n {\n return \"environment{$environments}): ?>\";\n }\n\n /**\n * Compile the end-env statements into valid PHP.\n *\n ", "middle": "th statements into valid PHP.\n *\n * @return string\n */\n protected function compileEndAuth()\n {\n return '';\n }\n\n /**\n * Compile the env statements into valid PHP.\n *\n * @pa", "meta": {"filepath": "src/Illuminate/View/Compilers/Concerns/CompilesConditionals.php", "language": "php", "file_size": 9950, "cut_index": 921, "middle_length": 229}} {"prefix": "\ntrait CompilesEchos\n{\n /**\n * Custom rendering callbacks for stringable objects.\n *\n * @var array\n */\n protected $echoHandlers = [];\n\n /**\n * Add a handler to be executed before echoing a given class.\n *\n * @param string|callable $class\n * @param callable|null $handler\n * @return void\n */\n public function stringable($class, $handler = null)\n {\n if ($class instanceof Closure) {\n [$class, $handler] = [$this->firstClosureParameterTyp", "suffix": "leEchos($value)\n {\n foreach ($this->getEchoMethods() as $method) {\n $value = $this->$method($value);\n }\n\n return $value;\n }\n\n /**\n * Get the echo methods in the proper order for compilation.\n *\n * @retur", "middle": "e($class), $class];\n }\n\n $this->echoHandlers[$class] = $handler;\n }\n\n /**\n * Compile Blade echos into valid PHP.\n *\n * @param string $value\n * @return string\n */\n public function compi", "meta": {"filepath": "src/Illuminate/View/Compilers/Concerns/CompilesEchos.php", "language": "php", "file_size": 4624, "cut_index": 614, "middle_length": 229}} {"prefix": "ct\n{\n use Macroable,\n Concerns\\ManagesComponents,\n Concerns\\ManagesEvents,\n Concerns\\ManagesFragments,\n Concerns\\ManagesLayouts,\n Concerns\\ManagesLoops,\n Concerns\\ManagesStacks,\n Concerns\\ManagesTranslations;\n\n /**\n * The engine implementation.\n *\n * @var \\Illuminate\\View\\Engines\\EngineResolver\n */\n protected $engines;\n\n /**\n * The view finder implementation.\n *\n * @var \\Illuminate\\View\\ViewFinderInterface\n */\n p", "suffix": "\\Contracts\\Container\\Container\n */\n protected $container;\n\n /**\n * Data that should be available to all templates.\n *\n * @var array\n */\n protected $shared = [];\n\n /**\n * The extension to engine bindings.\n *\n * @v", "middle": "rotected $finder;\n\n /**\n * The event dispatcher instance.\n *\n * @var \\Illuminate\\Contracts\\Events\\Dispatcher\n */\n protected $events;\n\n /**\n * The IoC container instance.\n *\n * @var \\Illuminate", "meta": {"filepath": "src/Illuminate/View/Factory.php", "language": "php", "file_size": 15666, "cut_index": 921, "middle_length": 229}} {"prefix": "use Illuminate\\Database\\Eloquent\\Attributes\\UseResourceCollection;\nuse Illuminate\\Database\\Eloquent\\Model;\nuse Illuminate\\Http\\Resources\\Json\\ResourceCollection;\nuse LogicException;\nuse ReflectionClass;\n\ntrait TransformsToResourceCollection\n{\n /**\n * Create a new resource collection instance for the given resource.\n *\n * @param class-string<\\Illuminate\\Http\\Resources\\Json\\JsonResource>|null $resourceClass\n * @return \\Illuminate\\Http\\Resources\\Json\\ResourceCollection\n *\n * @throw", "suffix": " return $resourceClass::collection($this);\n }\n\n /**\n * Guess the resource collection for the items.\n *\n * @return \\Illuminate\\Http\\Resources\\Json\\ResourceCollection\n *\n * @throws \\Throwable\n */\n protected function guessReso", "middle": "s \\Throwable\n */\n public function toResourceCollection(?string $resourceClass = null): ResourceCollection\n {\n if ($resourceClass === null) {\n return $this->guessResourceCollection();\n }\n\n ", "meta": {"filepath": "src/Illuminate/Collections/Traits/TransformsToResourceCollection.php", "language": "php", "file_size": 4008, "cut_index": 614, "middle_length": 229}} {"prefix": "eption;\n\ntrait CompilesLoops\n{\n /**\n * Counter to keep track of nested forelse statements.\n *\n * @var int\n */\n protected $forElseCounter = 0;\n\n /**\n * Compile the for-else statements into valid PHP.\n *\n * @param string|null $expression\n * @return string\n *\n * @throws \\Illuminate\\Contracts\\View\\ViewCompilationException\n */\n protected function compileForelse($expression)\n {\n $empty = '$__empty_'.++$this->forElseCounter;\n\n preg_match('/", "suffix": "$iteration = trim($matches[2]);\n\n $initLoop = \"\\$__currentLoopData = {$iteratee}; \\$__env->addLoop(\\$__currentLoopData);\";\n\n $iterateLoop = '$__env->incrementLoopIndices(); $loop = $__env->getLastLoop();';\n\n return \"yieldPushContent{$expression}; ?>\";\n }\n\n /**\n * Compile the push statements into valid PHP.\n *\n * @param string $expression\n * @return string\n */\n protected function compilePush($expression)\n {\n ", "suffix": "PushOnce($expression)\n {\n $parts = explode(',', $this->stripParentheses($expression), 2);\n\n [$stack, $id] = [$parts[0], $parts[1] ?? ''];\n\n $id = trim($id) ?: \"'\".(string) Str::uuid().\"'\";\n\n return 'hasRen", "middle": " return \"startPush{$expression}; ?>\";\n }\n\n /**\n * Compile the push-once statements into valid PHP.\n *\n * @param string $expression\n * @return string\n */\n protected function compile", "meta": {"filepath": "src/Illuminate/View/Compilers/Concerns/CompilesStacks.php", "language": "php", "file_size": 2793, "cut_index": 563, "middle_length": 229}} {"prefix": "?php\n\nnamespace Illuminate\\View\\Compilers\\Concerns;\n\ntrait CompilesTranslations\n{\n /**\n * Compile the lang statements into valid PHP.\n *\n * @param string|null $expression\n * @return string\n */\n protected function compileLang($expression)\n {\n if (is_null($expression)) {\n return 'startTranslation(); ?>';\n } elseif ($expression[1] === '[') {\n return \"startTranslation{$expression}; ?>\";\n }\n\n return \"renderTranslation(); ?>';\n }\n\n /**\n * Compile the choice statements into valid PHP.\n *\n * @param string $expression\n * @return string\n */\n protected function compileChoice($expression)\n {\n return \"get{$expression}; ?>\";\n }\n\n /**\n * Compile the end-lang statements into valid PHP.\n *\n * @return string\n */\n protected function compileEndlang()\n {\n return 'componentStack[]", "middle": " $slots = [];\n\n /**\n * The names of the slots being rendered.\n *\n * @var array\n */\n protected $slotStack = [];\n\n /**\n * Start a component rendering process.\n *\n * @param \\Illuminate\\Contracts", "meta": {"filepath": "src/Illuminate/View/Concerns/ManagesComponents.php", "language": "php", "file_size": 5512, "cut_index": 716, "middle_length": 229}} {"prefix": "te\\View\\Concerns;\n\nuse InvalidArgumentException;\n\ntrait ManagesFragments\n{\n /**\n * All of the captured, rendered fragments.\n *\n * @var array\n */\n protected $fragments = [];\n\n /**\n * The stack of in-progress fragment renders.\n *\n * @var array\n */\n protected $fragmentStack = [];\n\n /**\n * Start injecting content into a fragment.\n *\n * @param string $fragment\n * @return void\n */\n public function startFragment($fragment)\n {\n if (ob", "suffix": "unction stopFragment()\n {\n if (empty($this->fragmentStack)) {\n throw new InvalidArgumentException('Cannot end a fragment without first starting one.');\n }\n\n $last = array_pop($this->fragmentStack);\n\n $this->fragmen", "middle": "_start()) {\n $this->fragmentStack[] = $fragment;\n }\n }\n\n /**\n * Stop injecting content into a fragment.\n *\n * @return string\n *\n * @throws \\InvalidArgumentException\n */\n public f", "meta": {"filepath": "src/Illuminate/View/Concerns/ManagesFragments.php", "language": "php", "file_size": 1744, "cut_index": 537, "middle_length": 229}} {"prefix": "uminate\\Support\\Arr;\nuse Illuminate\\Support\\LazyCollection;\n\ntrait ManagesLoops\n{\n /**\n * The stack of in-progress loops.\n *\n * @var array\n */\n protected $loopsStack = [];\n\n /**\n * Add new loop to the stack.\n *\n * @param \\Countable|array $data\n * @return void\n */\n public function addLoop($data)\n {\n $length = is_countable($data) && ! $data instanceof LazyCollection\n ? count($data)\n : null;\n\n $parent = Arr::last($this->lo", "suffix": "set($length) ? $length == 1 : null,\n 'odd' => false,\n 'even' => true,\n 'depth' => count($this->loopsStack) + 1,\n 'parent' => $parent ? (object) $parent : null,\n ];\n }\n\n /**\n * Increment the top l", "middle": "opsStack);\n\n $this->loopsStack[] = [\n 'iteration' => 0,\n 'index' => 0,\n 'remaining' => $length ?? null,\n 'count' => $length,\n 'first' => true,\n 'last' => is", "meta": {"filepath": "src/Illuminate/View/Concerns/ManagesLoops.php", "language": "php", "file_size": 2299, "cut_index": 563, "middle_length": 229}} {"prefix": "**\n * All of the finished, captured push sections.\n *\n * @var array\n */\n protected $pushes = [];\n\n /**\n * All of the finished, captured prepend sections.\n *\n * @var array\n */\n protected $prepends = [];\n\n /**\n * The stack of in-progress push sections.\n *\n * @var array\n */\n protected $pushStack = [];\n\n /**\n * Start injecting content into a push section.\n *\n * @param string $section\n * @param string $content\n * @return vo", "suffix": ">extendPush($section, $content);\n }\n }\n\n /**\n * Stop injecting content into a push section.\n *\n * @return string\n *\n * @throws \\InvalidArgumentException\n */\n public function stopPush()\n {\n if (empty($this->", "middle": "id\n */\n public function startPush($section, $content = '')\n {\n if ($content === '') {\n if (ob_start()) {\n $this->pushStack[] = $section;\n }\n } else {\n $this-", "meta": {"filepath": "src/Illuminate/View/Concerns/ManagesStacks.php", "language": "php", "file_size": 4507, "cut_index": 614, "middle_length": 229}} {"prefix": "\\ComponentAttributeBag;\n\ntrait CompilesComponents\n{\n /**\n * The component name hash stack.\n *\n * @var array\n */\n protected static $componentHashStack = [];\n\n /**\n * Compile the component statements into valid PHP.\n *\n * @param string $expression\n * @return string\n */\n protected function compileComponent($expression)\n {\n [$component, $alias, $data] = str_contains($expression, ',')\n ? array_map(trim(...), explode(',', trim($expression, '()", "suffix": ":'.trim($alias, '\\'\"') : $component\n );\n\n if (Str::contains($component, ['::class', '\\\\'])) {\n return static::compileClassComponentOpening($component, $alias, $data, $hash);\n }\n\n return \"startComponent{", "middle": "'), 3)) + ['', '', '']\n : [trim($expression, '()'), '', ''];\n\n $component = trim($component, '\\'\"');\n\n $hash = static::newComponentHash(\n $component === AnonymousComponent::class ? $component.'", "meta": {"filepath": "src/Illuminate/View/Compilers/Concerns/CompilesComponents.php", "language": "php", "file_size": 6606, "cut_index": 716, "middle_length": 229}} {"prefix": ";\n\ntrait CompilesIncludes\n{\n /**\n * Compile the each statements into valid PHP.\n *\n * @param string $expression\n * @return string\n */\n protected function compileEach($expression)\n {\n return \"renderEach{$expression}; ?>\";\n }\n\n /**\n * Compile the include statements into valid PHP.\n *\n * @param string $expression\n * @return string\n */\n protected function compileInclude($expression)\n {\n $expression = $this->stripP", "suffix": "lid PHP.\n *\n * @param string $expression\n * @return string\n */\n protected function compileIncludeIf($expression)\n {\n $expression = $this->stripParentheses($expression);\n\n return \"exists({$expression}", "middle": "arentheses($expression);\n\n return \"make({$expression}, array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>\";\n }\n\n /**\n * Compile the include-if statements into va", "meta": {"filepath": "src/Illuminate/View/Compilers/Concerns/CompilesIncludes.php", "language": "php", "file_size": 2746, "cut_index": 563, "middle_length": 229}} {"prefix": "use ErrorException;\nuse Illuminate\\Container\\Container;\nuse Illuminate\\Support\\Reflector;\n\nclass ViewException extends ErrorException\n{\n /**\n * Report the exception.\n *\n * @return bool|null\n */\n public function report()\n {\n $exception = $this->getPrevious();\n\n if (Reflector::isCallable($reportCallable = [$exception, 'report'])) {\n return Container::getInstance()->call($reportCallable);\n }\n\n return false;\n }\n\n /**\n * Render the excepti", "suffix": "uminate\\Http\\Request $request\n * @return \\Illuminate\\Http\\Response|null\n */\n public function render($request)\n {\n $exception = $this->getPrevious();\n\n if ($exception && method_exists($exception, 'render')) {\n return ", "middle": "on into an HTTP response.\n *\n * @param \\Ill", "meta": {"filepath": "src/Illuminate/View/ViewException.php", "language": "php", "file_size": 903, "cut_index": 547, "middle_length": 52}} {"prefix": "pace Illuminate\\View\\Engines;\n\nuse Closure;\nuse InvalidArgumentException;\n\nclass EngineResolver\n{\n /**\n * The array of engine resolvers.\n *\n * @var array\n */\n protected $resolvers = [];\n\n /**\n * The resolved engine instances.\n *\n * @var array\n */\n protected $resolved = [];\n\n /**\n * Register a new engine resolver.\n *\n * The engine string typically corresponds to a file extension.\n *\n * @param string $engine\n * @param \\Closure $resolve", "suffix": ".\n *\n * @param string $engine\n * @return \\Illuminate\\Contracts\\View\\Engine\n *\n * @throws \\InvalidArgumentException\n */\n public function resolve($engine)\n {\n if (isset($this->resolved[$engine])) {\n return $t", "middle": "r\n * @return void\n */\n public function register($engine, Closure $resolver)\n {\n $this->forget($engine);\n\n $this->resolvers[$engine] = $resolver;\n }\n\n /**\n * Resolve an engine instance by name", "meta": {"filepath": "src/Illuminate/View/Engines/EngineResolver.php", "language": "php", "file_size": 1474, "cut_index": 524, "middle_length": 229}} {"prefix": "te\\View\\Compilers\\Concerns;\n\nuse Illuminate\\Foundation\\Vite;\n\ntrait CompilesHelpers\n{\n /**\n * Compile the CSRF statements into valid PHP.\n *\n * @return string\n */\n protected function compileCsrf()\n {\n return '';\n }\n\n /**\n * Compile the \"dd\" statements into valid PHP.\n *\n * @param string $arguments\n * @return string\n */\n protected function compileDd($arguments)\n {\n return \"\";\n }\n\n ", "suffix": " }\n\n /**\n * Compile the method statements into valid PHP.\n *\n * @param string $method\n * @return string\n */\n protected function compileMethod($method)\n {\n return \"\";\n }\n\n /**\n", "middle": " /**\n * Compile the \"dump\" statements into valid PHP.\n *\n * @param string $arguments\n * @return string\n */\n protected function compileDump($arguments)\n {\n return \"\";\n ", "meta": {"filepath": "src/Illuminate/View/Compilers/Concerns/CompilesHelpers.php", "language": "php", "file_size": 1924, "cut_index": 537, "middle_length": 229}} {"prefix": "\nuse Illuminate\\Support\\Str;\nuse InvalidArgumentException;\n\nabstract class Compiler\n{\n /**\n * The filesystem instance.\n *\n * @var \\Illuminate\\Filesystem\\Filesystem\n */\n protected $files;\n\n /**\n * The cache path for the compiled views.\n *\n * @var string\n */\n protected $cachePath;\n\n /**\n * The base path that should be removed from paths before hashing.\n *\n * @var string\n */\n protected $basePath;\n\n /**\n * Determines if compiled views shou", "suffix": "view cache timestamps should be checked.\n *\n * @var bool\n */\n protected $shouldCheckTimestamps;\n\n /**\n * Create a new compiler instance.\n *\n * @param \\Illuminate\\Filesystem\\Filesystem $files\n * @param string $cachePath", "middle": "ld be cached.\n *\n * @var bool\n */\n protected $shouldCache;\n\n /**\n * The compiled view file extension.\n *\n * @var string\n */\n protected $compiledExtension = 'php';\n\n /**\n * Indicates if ", "meta": {"filepath": "src/Illuminate/View/Compilers/Compiler.php", "language": "php", "file_size": 3648, "cut_index": 614, "middle_length": 229}} {"prefix": "static\n */\n public static function range($from, $to, $step = 1, ...$args)\n {\n return new static(range($from, $to, $step), ...$args);\n }\n\n /**\n * Get all of the items in the collection.\n *\n * @return array\n */\n public function all()\n {\n return $this->items;\n }\n\n /**\n * Get a lazy collection for the items in this collection.\n *\n * @return \\Illuminate\\Support\\LazyCollection\n */\n public function la", "suffix": "nction median($key = null)\n {\n $values = (isset($key) ? $this->pluck($key) : $this)\n ->reject(fn ($item) => is_null($item))\n ->sort()->values();\n\n $count = $values->count();\n\n if ($count === 0) {\n re", "middle": "zy()\n {\n return new LazyCollection($this->items);\n }\n\n /**\n * Get the median of a given key.\n *\n * @param string|array|null $key\n * @return float|int|null\n */\n public fu", "meta": {"filepath": "src/Illuminate/Collections/Collection.php", "language": "php", "file_size": 55672, "cut_index": 2151, "middle_length": 229}} {"prefix": "te\\Support;\n\n/**\n * @template TKey of array-key\n *\n * @template-covariant TValue\n *\n * @mixin \\Illuminate\\Support\\Enumerable\n * @mixin TValue\n */\nclass HigherOrderCollectionProxy\n{\n /**\n * The collection being operated on.\n *\n * @var \\Illuminate\\Support\\Enumerable\n */\n protected $collection;\n\n /**\n * The method being proxied.\n *\n * @var string\n */\n protected $method;\n\n /**\n * Create a new proxy instance.\n *\n * @param \\Il", "suffix": "llection;\n }\n\n /**\n * Proxy accessing an attribute onto the collection items.\n *\n * @param string $key\n * @return mixed\n */\n public function __get($key)\n {\n return $this->collection->{$this->method}(function ($value", "middle": "luminate\\Support\\Enumerable $collection\n * @param string $method\n */\n public function __construct(Enumerable $collection, $method)\n {\n $this->method = $method;\n $this->collection = $co", "meta": {"filepath": "src/Illuminate/Collections/HigherOrderCollectionProxy.php", "language": "php", "file_size": 1602, "cut_index": 537, "middle_length": 229}} {"prefix": "y\n * @template TValue\n *\n * @param \\Illuminate\\Contracts\\Support\\Arrayable|iterable|null $value\n * @return \\Illuminate\\Support\\Collection\n */\n function collect($value = []): Collection\n {\n return new Collection($value);\n }\n}\n\nif (! function_exists('data_fill')) {\n /**\n * Fill in data where it's missing.\n *\n * @param mixed $target\n * @param string|array $key\n * @param mixed $value\n * @return mixed", "suffix": " object using \"dot\" notation.\n *\n * @param mixed $target\n * @param string|array|int|null $key\n * @return bool\n */\n function data_has($target, $key): bool\n {\n if (is_null($key) || $key === []) {\n return false;", "middle": "\n */\n function data_fill(&$target, $key, $value)\n {\n return data_set($target, $key, $value, false);\n }\n}\n\nif (! function_exists('data_has')) {\n /**\n * Determine if a key / property exists on an array or", "meta": {"filepath": "src/Illuminate/Collections/helpers.php", "language": "php", "file_size": 8232, "cut_index": 716, "middle_length": 229}} {"prefix": "stripParentheses($expression);\n\n return 'has($__sessionArgs[0])) :\nif (isset($value)) { $__sessionPrevious[] = $value; }\n$value = session()->get($__s", "suffix": " return '';\n }\n\n /**\n * Compile the endsession statements into valid PHP.\n *\n * @param string $expression\n * @return string\n */\n protected function compileEndsession($expression)\n {\n ", "meta": {"filepath": "src/Illuminate/View/Compilers/Concerns/CompilesSessions.php", "language": "php", "file_size": 1013, "cut_index": 512, "middle_length": 229}} {"prefix": "te\\View\\Compilers\\Concerns;\n\ntrait CompilesUseStatements\n{\n /**\n * Compile the use statements into valid PHP.\n *\n * @param string $expression\n * @return string\n */\n protected function compileUse($expression)\n {\n $expression = trim(preg_replace('/[()]/', '', $expression), \" '\\\"\");\n\n // Isolate alias...\n if (str_contains($expression, '{')) {\n $pathWithOptionalModifier = $expression;\n $aliasWithLeadingSpace = '';\n } else {\n ", "suffix": " : '';\n }\n\n // Split modifier and path...\n if (str_starts_with($pathWithOptionalModifier, 'function ')) {\n $modifierWithTrailingSpace = 'function ';\n $path = explode(' ', $pathWithOptionalModifier, 2)[1] ?", "middle": " $segments = explode(',', $expression);\n $pathWithOptionalModifier = trim($segments[0], \" '\\\"\");\n\n $aliasWithLeadingSpace = isset($segments[1])\n ? ' as '.trim($segments[1], \" '\\\"\")\n ", "meta": {"filepath": "src/Illuminate/View/Compilers/Concerns/CompilesUseStatements.php", "language": "php", "file_size": 1531, "cut_index": 537, "middle_length": 229}} {"prefix": "ed sections.\n *\n * @var array\n */\n protected $sections = [];\n\n /**\n * The stack of in-progress sections.\n *\n * @var array\n */\n protected $sectionStack = [];\n\n /**\n * The parent placeholder for the request.\n *\n * @var mixed\n */\n protected static $parentPlaceholder = [];\n\n /**\n * The parent placeholder salt for the request.\n *\n * @var string\n */\n protected static $parentPlaceholderSalt;\n\n /**\n * Start injecting content int", "suffix": "f (ob_start()) {\n $this->sectionStack[] = $section;\n }\n } else {\n $this->extendSection($section, $content instanceof View ? $content : e($content));\n }\n }\n\n /**\n * Inject inline content into a se", "middle": "o a section.\n *\n * @param string $section\n * @param string|null $content\n * @return void\n */\n public function startSection($section, $content = null)\n {\n if ($content === null) {\n i", "meta": {"filepath": "src/Illuminate/View/Concerns/ManagesLayouts.php", "language": "php", "file_size": 5917, "cut_index": 716, "middle_length": 229}} {"prefix": "pace Illuminate\\View\\Middleware;\n\nuse Closure;\nuse Illuminate\\Contracts\\View\\Factory as ViewFactory;\nuse Illuminate\\Support\\ViewErrorBag;\n\nclass ShareErrorsFromSession\n{\n /**\n * The view factory implementation.\n *\n * @var \\Illuminate\\Contracts\\View\\Factory\n */\n protected $view;\n\n /**\n * Create a new error binder instance.\n *\n * @param \\Illuminate\\Contracts\\View\\Factory $view\n */\n public function __construct(ViewFactory $view)\n {\n $this->view = $view;\n ", "suffix": " // If the current session has an \"errors\" variable bound to it, we will share\n // its value with all view instances so the views can easily access errors\n // without having to bind. An empty bag is set when there aren't errors.\n $th", "middle": " }\n\n /**\n * Handle an incoming request.\n *\n * @param \\Illuminate\\Http\\Request $request\n * @param \\Closure $next\n * @return mixed\n */\n public function handle($request, Closure $next)\n {\n ", "meta": {"filepath": "src/Illuminate/View/Middleware/ShareErrorsFromSession.php", "language": "php", "file_size": 1406, "cut_index": 524, "middle_length": 229}} {"prefix": "mpile the error statements into valid PHP.\n *\n * @param string $expression\n * @return string\n */\n protected function compileError($expression)\n {\n $expression = $this->stripParentheses($expression);\n\n return 'getBag($__errorArgs[1] ?? \\'default\\');\nif ($__bag->has($__errorArgs[0])) :\nif (isset($message)) { $__messageOriginal = $message; }\n$message = $__bag->first($__errorArgs[0]); ?>';\n }\n\n /**\n * Compi", "suffix": " * @param string $expression\n * @return string\n */\n protected function compileEnderror($expression)\n {\n return 'registerFactory();\n $this->registerViewFinder();\n $this->registerBladeCompiler();\n $this->registerEngineResolver();\n\n $this->app->terminating(static function () {\n Comp", "suffix": " // Next we need to grab the engine resolver instance that will be used by the\n // environment. The resolver will be used by an environment to get each of\n // the various engine implementations such as plain PHP or Blade engine.\n ", "middle": "onent::flushCache();\n });\n }\n\n /**\n * Register the view environment.\n *\n * @return void\n */\n public function registerFactory()\n {\n $this->app->singleton('view', function ($app) {\n ", "meta": {"filepath": "src/Illuminate/View/ViewServiceProvider.php", "language": "php", "file_size": 5470, "cut_index": 716, "middle_length": 229}} {"prefix": "\n Concerns\\CompilesFragments,\n Concerns\\CompilesHelpers,\n Concerns\\CompilesIncludes,\n Concerns\\CompilesInjections,\n Concerns\\CompilesJson,\n Concerns\\CompilesJs,\n Concerns\\CompilesLayouts,\n Concerns\\CompilesLoops,\n Concerns\\CompilesRawPhp,\n Concerns\\CompilesSessions,\n Concerns\\CompilesStacks,\n Concerns\\CompilesStyles,\n Concerns\\CompilesTranslations,\n Concerns\\CompilesUseStatements,\n ReflectsClosures;\n\n ", "suffix": ";\n\n /**\n * All custom \"condition\" handlers.\n *\n * @var array\n */\n protected $conditions = [];\n\n /**\n * The registered string preparation callbacks.\n *\n * @var array\n */\n protected $prepareStringsForCompilationUsi", "middle": " /**\n * All of the registered extensions.\n *\n * @var array\n */\n protected $extensions = [];\n\n /**\n * All custom \"directive\" handlers.\n *\n * @var array\n */\n protected $customDirectives = []", "meta": {"filepath": "src/Illuminate/View/Compilers/BladeCompiler.php", "language": "php", "file_size": 28570, "cut_index": 1331, "middle_length": 229}} {"prefix": "e\n * @return static\n */\n public static function wrap($value);\n\n /**\n * Get the underlying items from the given collection if applicable.\n *\n * @template TUnwrapKey of array-key\n * @template TUnwrapValue\n *\n * @param array|static $value\n * @return array\n */\n public static function unwrap($value);\n\n /**\n * Create a new instance with no items.\n *\n ", "suffix": "od.\n *\n * @param (callable(TValue): float|int)|string|null $callback\n * @return float|int|null\n */\n public function average($callback = null);\n\n /**\n * Get the median of a given key.\n *\n * @param string|array\n */\n public function all();\n\n /**\n * Alias for the \"avg\" meth", "meta": {"filepath": "src/Illuminate/Collections/Enumerable.php", "language": "php", "file_size": 39264, "cut_index": 2151, "middle_length": 229}} {"prefix": "d, pass a generator function.'\n );\n } else {\n $this->source = $this->getArrayableItems($source);\n }\n }\n\n /**\n * Create a new instance of the collection.\n *\n * @param \\Illuminate\\Contracts\\Support\\Arrayable|iterable|(Closure(): \\Generator)|self|array|null $items\n * @return static\n */\n protected function newInstance($items = [])\n {\n return new static($", "suffix": "e|iterable|(Closure(): \\Generator)|self|array|null $items\n * @return static\n */\n public static func", "middle": "items);\n }\n\n /**\n * Create a new collection instance if the value isn't one already.\n *\n * @template TMakeKey of array-key\n * @template TMakeValue\n *\n * @param \\Illuminate\\Contracts\\Support\\Arrayabl", "meta": {"filepath": "src/Illuminate/Collections/LazyCollection.php", "language": "php", "file_size": 51731, "cut_index": 2151, "middle_length": 229}} {"prefix": " * @return array\n */\n public static function add($array, $key, $value)\n {\n if (is_null(static::get($array, $key))) {\n static::set($array, $key, $value);\n }\n\n return $array;\n }\n\n /**\n * Get an array item from an array using \"dot\" notation.\n *\n * @throws \\InvalidArgumentException\n */\n public static function array(ArrayAccess|array $array, string|int|null $key, ?array $default = null): array\n {\n $value = Arr::get($array, $key, $defaul", "suffix": "n $value;\n }\n\n /**\n * Get a boolean item from an array using \"dot\" notation.\n *\n * @throws \\InvalidArgumentException\n */\n public static function boolean(ArrayAccess|array $array, string|int|null $key, ?bool $default = null): bool\n ", "middle": "t);\n\n if (! is_array($value)) {\n throw new InvalidArgumentException(\n sprintf('Array value for key [%s] must be an array, %s found.', $key, gettype($value))\n );\n }\n\n retur", "meta": {"filepath": "src/Illuminate/Collections/Arr.php", "language": "php", "file_size": 35814, "cut_index": 2151, "middle_length": 229}} {"prefix": "Contracts\\Queue\\QueueableCollection;\nuse Illuminate\\Contracts\\Queue\\QueueableEntity;\nuse Illuminate\\Database\\Eloquent\\Collection as EloquentCollection;\nuse Illuminate\\Database\\Eloquent\\Relations\\Concerns\\AsPivot;\nuse Illuminate\\Database\\Eloquent\\Relations\\Pivot;\nuse Illuminate\\Support\\Collection;\n\ntrait SerializesAndRestoresModelIdentifiers\n{\n /**\n * Get the property value prepared for serialization.\n *\n * @param mixed $value\n * @param bool $withRelations\n * @return mixed\n */\n", "suffix": " $value->getQueueableIds(),\n $withRelations ? $value->getQueueableRelations() : [],\n $value->getQueueableConnection()\n ))->useCollectionClass(\n ($collectionClass = get_class($value)) !== E", "middle": " protected function getSerializedPropertyValue($value, $withRelations = true)\n {\n if ($value instanceof QueueableCollection) {\n return (new ModelIdentifier(\n $value->getQueueableClass(),\n ", "meta": {"filepath": "src/Illuminate/Queue/SerializesAndRestoresModelIdentifiers.php", "language": "php", "file_size": 3988, "cut_index": 614, "middle_length": 229}} {"prefix": "Queue\\Attributes\\WithoutRelations;\nuse Illuminate\\Support\\Reflector;\nuse ReflectionClass;\nuse ReflectionProperty;\n\ntrait SerializesModels\n{\n use SerializesAndRestoresModelIdentifiers;\n\n /**\n * Prepare the instance values for serialization.\n *\n * @return array\n */\n public function __serialize()\n {\n $values = [];\n\n $reflectionClass = new ReflectionClass($this);\n\n [$class, $properties, $classLevelWithoutRelations] = [\n get_class($this),\n $r", "suffix": "\n continue;\n }\n\n if (! $property->isInitialized($this)) {\n continue;\n }\n\n if (method_exists($property, 'isVirtual') && $property->isVirtual()) {\n continue;\n ", "middle": "eflectionClass->getProperties(),\n ! is_null(Reflector::getClassAttribute($this, WithoutRelations::class, ascend: true)),\n ];\n\n foreach ($properties as $property) {\n if ($property->isStatic()) {", "meta": {"filepath": "src/Illuminate/Queue/SerializesModels.php", "language": "php", "file_size": 2896, "cut_index": 563, "middle_length": 229}} {"prefix": "es (1 MB).\n *\n * @var int\n */\n const MAX_SQS_PAYLOAD_SIZE = 1048576;\n\n /**\n * The cache key prefix for extended SQS payloads.\n *\n * @var string\n */\n const EXTENDED_PAYLOAD_CACHE_PREFIX = 'laravel:sqs-payloads:';\n\n /**\n * The Amazon SQS instance.\n *\n * @var \\Aws\\Sqs\\SqsClient\n */\n protected $sqs;\n\n /**\n * The name of the default queue.\n *\n * @var string\n */\n protected $default;\n\n /**\n * The queue URL prefix.\n *\n *", "suffix": "@var array\n */\n protected $overflowStorage = [];\n\n /**\n * Create a new Amazon SQS queue instance.\n *\n * @param \\Aws\\Sqs\\SqsClient $sqs\n * @param string $default\n * @param string $prefix\n * @param string $suffix\n ", "middle": " @var string\n */\n protected $prefix;\n\n /**\n * The queue name suffix.\n *\n * @var string\n */\n protected $suffix;\n\n /**\n * The overflow storage options for large payload offloading.\n *\n * ", "meta": {"filepath": "src/Illuminate/Queue/SqsQueue.php", "language": "php", "file_size": 14086, "cut_index": 921, "middle_length": 229}} {"prefix": "ontracts\\Queue\\Queue as QueueContract;\nuse Illuminate\\Contracts\\Queue\\ShouldBeUnique;\nuse Illuminate\\Queue\\Events\\JobAttempted;\nuse Illuminate\\Queue\\Events\\JobExceptionOccurred;\nuse Illuminate\\Queue\\Events\\JobProcessed;\nuse Illuminate\\Queue\\Events\\JobProcessing;\nuse Illuminate\\Queue\\Jobs\\SyncJob;\nuse Illuminate\\Support\\Collection;\nuse Throwable;\n\nclass SyncQueue extends Queue implements QueueContract\n{\n /**\n * Create a new sync queue instance.\n *\n * @param bool $dispatchAfterCommit\n */\n", "suffix": "urn int\n */\n public function size($queue = null)\n {\n return 0;\n }\n\n /**\n * Get the number of pending jobs.\n *\n * @param string|null $queue\n * @return int\n */\n public function pendingSize($queue = null)\n {\n", "middle": " public function __construct($dispatchAfterCommit = false)\n {\n $this->dispatchAfterCommit = $dispatchAfterCommit;\n }\n\n /**\n * Get the size of the queue.\n *\n * @param string|null $queue\n * @ret", "meta": {"filepath": "src/Illuminate/Queue/SyncQueue.php", "language": "php", "file_size": 8598, "cut_index": 716, "middle_length": 229}} {"prefix": "Illuminate\\Queue\\Events\\WorkerPausing;\nuse Illuminate\\Queue\\Events\\WorkerResuming;\nuse Illuminate\\Queue\\Events\\WorkerStarting;\nuse Illuminate\\Queue\\Events\\WorkerStopping;\nuse Illuminate\\Support\\Carbon;\nuse Throwable;\n\nclass Worker\n{\n use DetectsLostConnections;\n\n const EXIT_SUCCESS = 0;\n const EXIT_ERROR = 1;\n const EXIT_MEMORY_LIMIT = 12;\n\n /**\n * The name of the worker.\n *\n * @var string|null\n */\n protected $name;\n\n /**\n * The queue manager instance.\n *\n * ", "suffix": " cache repository implementation.\n *\n * @var \\Illuminate\\Contracts\\Cache\\Repository\n */\n protected $cache;\n\n /**\n * The exception handler instance.\n *\n * @var \\Illuminate\\Contracts\\Debug\\ExceptionHandler\n */\n protected ", "middle": "@var \\Illuminate\\Contracts\\Queue\\Factory\n */\n protected $manager;\n\n /**\n * The event dispatcher instance.\n *\n * @var \\Illuminate\\Contracts\\Events\\Dispatcher\n */\n protected $events;\n\n /**\n * The", "meta": {"filepath": "src/Illuminate/Queue/Worker.php", "language": "php", "file_size": 32546, "cut_index": 1331, "middle_length": 229}} {"prefix": "ions\n{\n /**\n * The name of the worker.\n *\n * @var string\n */\n public $name;\n\n /**\n * The number of seconds to wait before retrying a job that encountered an uncaught exception.\n *\n * @var int|int[]\n */\n public $backoff;\n\n /**\n * The maximum amount of RAM the worker may consume.\n *\n * @var int\n */\n public $memory;\n\n /**\n * The maximum number of seconds a child worker may run.\n *\n * @var int\n */\n public $timeout;\n\n /**\n", "suffix": " /**\n * The maximum number of times a job may be attempted.\n *\n * @var int\n */\n public $maxTries;\n\n /**\n * Indicates if the worker should run in maintenance mode.\n *\n * @var bool\n */\n public $force;\n\n /**\n *", "middle": " * The number of seconds to wait in between polling the queue.\n *\n * @var int\n */\n public $sleep;\n\n /**\n * The number of seconds to rest between jobs.\n *\n * @var int\n */\n public $rest;\n\n ", "meta": {"filepath": "src/Illuminate/Queue/WorkerOptions.php", "language": "php", "file_size": 2723, "cut_index": 563, "middle_length": 229}} {"prefix": "te\\Queue\\Console;\n\nuse Illuminate\\Console\\MigrationGeneratorCommand;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\n\nuse function Illuminate\\Filesystem\\join_paths;\n\n#[AsCommand(name: 'make:queue-batches-table', aliases: ['queue:batches-table'])]\nclass BatchesTableCommand extends MigrationGeneratorCommand\n{\n /**\n * The console command name.\n *\n * @var string\n */\n protected $name = 'make:queue-batches-table';\n\n /**\n * The console command name aliases.\n *\n * @var array\n", "suffix": "**\n * Get the migration table name.\n *\n * @return string\n */\n protected function migrationTableName()\n {\n return $this->laravel['config']['queue.batching.table'] ?? 'job_batches';\n }\n\n /**\n * Get the path to the migra", "middle": " */\n protected $aliases = ['queue:batches-table'];\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected $description = 'Create a migration for the batches database table';\n\n /", "meta": {"filepath": "src/Illuminate/Queue/Console/BatchesTableCommand.php", "language": "php", "file_size": 1874, "cut_index": 537, "middle_length": 229}} {"prefix": "uminate\\Console\\Command;\nuse Illuminate\\Console\\ConfirmableTrait;\nuse Illuminate\\Console\\Prohibitable;\nuse Illuminate\\Contracts\\Queue\\ClearableQueue;\nuse Illuminate\\Support\\Str;\nuse ReflectionClass;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\nuse Symfony\\Component\\Console\\Input\\InputArgument;\nuse Symfony\\Component\\Console\\Input\\InputOption;\n\n#[AsCommand(name: 'queue:clear')]\nclass ClearCommand extends Command\n{\n use ConfirmableTrait, Prohibitable;\n\n /**\n * The console command name.\n *\n ", "suffix": " /**\n * Execute the console command.\n *\n * @return int|null\n */\n public function handle()\n {\n if ($this->isProhibited() ||\n ! $this->confirmToProceed()) {\n return 1;\n }\n\n $connection = $this", "middle": " * @var string\n */\n protected $name = 'queue:clear';\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected $description = 'Delete all of the jobs from the specified queue';\n\n ", "meta": {"filepath": "src/Illuminate/Queue/Console/ClearCommand.php", "language": "php", "file_size": 2871, "cut_index": 563, "middle_length": 229}} {"prefix": "te\\Queue\\Console;\n\nuse Illuminate\\Console\\MigrationGeneratorCommand;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\n\nuse function Illuminate\\Filesystem\\join_paths;\n\n#[AsCommand(name: 'make:queue-failed-table', aliases: ['queue:failed-table'])]\nclass FailedTableCommand extends MigrationGeneratorCommand\n{\n /**\n * The console command name.\n *\n * @var string\n */\n protected $name = 'make:queue-failed-table';\n\n /**\n * The console command name aliases.\n *\n * @var array\n ", "suffix": " /**\n * Get the migration table name.\n *\n * @return string\n */\n protected function migrationTableName()\n {\n return $this->laravel['config']['queue.failed.table'];\n }\n\n /**\n * Get the path to the migration stub file", "middle": " */\n protected $aliases = ['queue:failed-table'];\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected $description = 'Create a migration for the failed queue jobs database table';\n\n", "meta": {"filepath": "src/Illuminate/Queue/Console/FailedTableCommand.php", "language": "php", "file_size": 1864, "cut_index": 537, "middle_length": 229}} {"prefix": "components->info(\"All jobs that failed more than {$this->option('hours')} hours ago have been deleted successfully.\");\n\n return;\n }\n\n $this->components->info('All failed jobs deleted successfully.'", "middle": "ailed queue jobs';\n\n /**\n * Execute the console command.\n *\n * @return void\n */\n public function handle()\n {\n $this->laravel['queue.failer']->flush($this->option('hours'));\n\n if ($this->opti", "meta": {"filepath": "src/Illuminate/Queue/Console/FlushFailedCommand.php", "language": "php", "file_size": 1008, "cut_index": 512, "middle_length": 229}} {"prefix": "onsole;\n\nuse Illuminate\\Console\\Command;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\n\n#[AsCommand(name: 'queue:forget')]\nclass ForgetFailedCommand extends Command\n{\n /**\n * The console command signature.\n *\n * @var string\n */\n protected $signature = 'queue:forget {id : The ID of the failed job}';\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected $description = 'Delete a failed queue job';\n\n /**\n * Execute the console command.", "suffix": "unction handle()\n {\n if ($this->laravel['queue.failer']->forget($this->argument('id'))) {\n $this->components->info('Failed job deleted successfully.');\n } else {\n $this->components->error('No failed job matches the gi", "middle": "\n *\n * @return int|null\n */\n public f", "meta": {"filepath": "src/Illuminate/Queue/Console/ForgetFailedCommand.php", "language": "php", "file_size": 907, "cut_index": 547, "middle_length": 52}} {"prefix": "pace Illuminate\\Translation;\n\nuse Illuminate\\Contracts\\Support\\DeferrableProvider;\nuse Illuminate\\Support\\ServiceProvider;\n\nclass TranslationServiceProvider extends ServiceProvider implements DeferrableProvider\n{\n /**\n * Register the service provider.\n *\n * @return void\n */\n public function register()\n {\n $this->registerLoader();\n\n $this->app->singleton('translator', function ($app) {\n $loader = $app['translation.loader'];\n\n // When registering th", "suffix": " $locale = $app->getLocale();\n\n $trans = new Translator($loader, $locale);\n\n $trans->setFallback($app->getFallbackLocale());\n\n return $trans;\n });\n }\n\n /**\n * Register the translation line loader.\n ", "middle": "e translator component, we'll need to set the default\n // locale as well as the fallback locale. So, we'll grab the application\n // configuration so we can easily get both of these values from there.\n ", "meta": {"filepath": "src/Illuminate/Translation/TranslationServiceProvider.php", "language": "php", "file_size": 1454, "cut_index": 524, "middle_length": 229}} {"prefix": " to tweak each of these messages here.\n |\n */\n\n 'accepted' => 'The :attribute field must be accepted.',\n 'accepted_if' => 'The :attribute field must be accepted when :other is :value.',\n 'active_url' => 'The :attribute field must be a valid URL.',\n 'after' => 'The :attribute field must be a date after :date.',\n 'after_or_equal' => 'The :attribute field must be a date after or equal to :date.',\n 'alpha' => 'The :attribute field must only contain letters.',\n 'alpha_dash' => 'The :at", "suffix": "e :attribute field must be an array.',\n 'ascii' => 'The :attribute field must only contain single-byte alphanumeric characters and symbols.',\n 'before' => 'The :attribute field must be a date before :date.',\n 'before_or_equal' => 'The :attribute f", "middle": "tribute field must only contain letters, numbers, dashes, and underscores.',\n 'alpha_num' => 'The :attribute field must only contain letters and numbers.',\n 'any_of' => 'The :attribute field is invalid.',\n 'array' => 'Th", "meta": {"filepath": "src/Illuminate/Translation/lang/en/validation.php", "language": "php", "file_size": 11964, "cut_index": 921, "middle_length": 229}} {"prefix": "e Illuminate\\Bus\\Batchable;\nuse Illuminate\\Bus\\Queueable;\nuse Illuminate\\Contracts\\Container\\Container;\nuse Illuminate\\Contracts\\Queue\\ShouldQueue;\nuse Illuminate\\Foundation\\Bus\\Dispatchable;\nuse Laravel\\SerializableClosure\\SerializableClosure;\nuse ReflectionFunction;\n\nclass CallQueuedClosure implements ShouldQueue\n{\n use Batchable, Dispatchable, InteractsWithQueue, Queueable, SerializesModels;\n\n /**\n * The serializable Closure instance.\n *\n * @var \\Laravel\\SerializableClosure\\Serializable", "suffix": "ar array\n */\n public $failureCallbacks = [];\n\n /**\n * Indicate if the job should be deleted when models are missing.\n *\n * @var bool\n */\n public $deleteWhenMissingModels = true;\n\n /**\n * Create a new job instance.\n *", "middle": "Closure\n */\n public $closure;\n\n /**\n * The name assigned to the job.\n *\n * @var string|null\n */\n public $name = null;\n\n /**\n * The callbacks that should be executed on failure.\n *\n * @v", "meta": {"filepath": "src/Illuminate/Queue/CallQueuedClosure.php", "language": "php", "file_size": 3039, "cut_index": 563, "middle_length": 229}} {"prefix": "on\\Encrypter;\nuse Illuminate\\Contracts\\Queue\\Job;\nuse Illuminate\\Contracts\\Queue\\ShouldBeUnique;\nuse Illuminate\\Contracts\\Queue\\ShouldBeUniqueUntilProcessing;\nuse Illuminate\\Database\\Eloquent\\ModelNotFoundException;\nuse Illuminate\\Events\\CallQueuedListener;\nuse Illuminate\\Log\\Context\\Repository as ContextRepository;\nuse Illuminate\\Pipeline\\Pipeline;\nuse Illuminate\\Queue\\Events\\JobDebounced;\nuse RuntimeException;\n\nclass CallQueuedHandler\n{\n /**\n * The bus dispatcher implementation.\n *\n * @var ", "suffix": "mmand currently being processed.\n *\n * @var mixed\n */\n protected $runningCommand;\n\n /**\n * Create a new handler instance.\n *\n * @param \\Illuminate\\Contracts\\Bus\\Dispatcher $dispatcher\n * @param \\Illuminate\\Contracts\\Con", "middle": "\\Illuminate\\Contracts\\Bus\\Dispatcher\n */\n protected $dispatcher;\n\n /**\n * The container instance.\n *\n * @var \\Illuminate\\Contracts\\Container\\Container\n */\n protected $container;\n\n /**\n * The co", "meta": {"filepath": "src/Illuminate/Queue/CallQueuedHandler.php", "language": "php", "file_size": 13185, "cut_index": 921, "middle_length": 229}} {"prefix": "ntException;\nuse PHPUnit\\Framework\\Assert as PHPUnit;\nuse RuntimeException;\nuse Throwable;\n\ntrait InteractsWithQueue\n{\n use InteractsWithTime;\n\n /**\n * The underlying queue job instance.\n *\n * @var \\Illuminate\\Contracts\\Queue\\Job|null\n */\n public $job;\n\n /**\n * Get the number of times the job has been attempted.\n *\n * @return int\n */\n public function attempts()\n {\n return $this->job ? $this->job->attempts() : 1;\n }\n\n /**\n * Delete the job fr", "suffix": "ram \\Throwable|string|null $exception\n * @return void\n *\n * @throws \\InvalidArgumentException\n */\n public function fail($exception = null)\n {\n if (is_string($exception)) {\n $exception = new ManuallyFailedException(", "middle": "om the queue.\n *\n * @return void\n */\n public function delete()\n {\n if ($this->job) {\n return $this->job->delete();\n }\n }\n\n /**\n * Fail the job from the queue.\n *\n * @pa", "meta": {"filepath": "src/Illuminate/Queue/InteractsWithQueue.php", "language": "php", "file_size": 7159, "cut_index": 716, "middle_length": 229}} {"prefix": "nerOptions extends WorkerOptions\n{\n /**\n * The environment the worker should run in.\n *\n * @var string\n */\n public $environment;\n\n /**\n * Create a new listener options instance.\n *\n * @param string $name\n * @param string|null $environment\n * @param int|int[] $backoff\n * @param int $memory\n * @param int $timeout\n * @param int $sleep\n * @param int $maxTries\n * @param bool $force\n * @param int $rest\n */\n public functi", "suffix": "l, $backoff = 0, $memory = 128, $timeout = 60, $sleep = 3, $maxTries = 1, $force = false, $rest = 0)\n {\n $this->environment = $environment;\n\n parent::__construct($name, $backoff, $memory, $timeout, $sleep, $maxTries, $force, false, 0, 0, $", "middle": "on __construct($name = 'default', $environment = nul", "meta": {"filepath": "src/Illuminate/Queue/ListenerOptions.php", "language": "php", "file_size": 882, "cut_index": 559, "middle_length": 52}} {"prefix": "ate\\Support\\Collection;\n\nclass NullQueue extends Queue implements QueueContract\n{\n /**\n * Get the size of the queue.\n *\n * @param string|null $queue\n * @return int\n */\n public function size($queue = null)\n {\n return 0;\n }\n\n /**\n * Get the number of pending jobs.\n *\n * @param string|null $queue\n * @return int\n */\n public function pendingSize($queue = null)\n {\n return 0;\n }\n\n /**\n * Get the number of delayed jobs.\n *\n", "suffix": "\n * @return int\n */\n public function reservedSize($queue = null)\n {\n return 0;\n }\n\n /**\n * Get the pending jobs for the given queue.\n *\n * @param string|null $queue\n * @return \\Illuminate\\Support\\Collection\n ", "middle": " * @param string|null $queue\n * @return int\n */\n public function delayedSize($queue = null)\n {\n return 0;\n }\n\n /**\n * Get the number of reserved jobs.\n *\n * @param string|null $queue", "meta": {"filepath": "src/Illuminate/Queue/NullQueue.php", "language": "php", "file_size": 3714, "cut_index": 614, "middle_length": 229}} {"prefix": "ontract\n{\n use ResolvesQueueRoutes;\n\n /**\n * The application instance.\n *\n * @var \\Illuminate\\Contracts\\Foundation\\Application\n */\n protected $app;\n\n /**\n * The array of resolved queue connections.\n *\n * @var array\n */\n protected $connections = [];\n\n /**\n * The array of resolved queue connectors.\n *\n * @var array\n */\n protected $connectors = [];\n\n /**\n * Create a new queue manager instance.\n *\n * @param \\Illuminate\\Contract", "suffix": "* @return void\n */\n public function before($callback)\n {\n $this->app['events']->listen(Events\\JobProcessing::class, $callback);\n }\n\n /**\n * Register an event listener for the after job event.\n *\n * @param mixed $callbac", "middle": "s\\Foundation\\Application $app\n */\n public function __construct($app)\n {\n $this->app = $app;\n }\n\n /**\n * Register an event listener for the before job event.\n *\n * @param mixed $callback\n ", "meta": {"filepath": "src/Illuminate/Queue/QueueManager.php", "language": "php", "file_size": 10733, "cut_index": 921, "middle_length": 229}} {"prefix": "ue\\Connectors\\DeferredConnector;\nuse Illuminate\\Queue\\Connectors\\FailoverConnector;\nuse Illuminate\\Queue\\Connectors\\NullConnector;\nuse Illuminate\\Queue\\Connectors\\RedisConnector;\nuse Illuminate\\Queue\\Connectors\\SqsConnector;\nuse Illuminate\\Queue\\Connectors\\SyncConnector;\nuse Illuminate\\Queue\\Failed\\DatabaseFailedJobProvider;\nuse Illuminate\\Queue\\Failed\\DatabaseUuidFailedJobProvider;\nuse Illuminate\\Queue\\Failed\\DynamoDbFailedJobProvider;\nuse Illuminate\\Queue\\Failed\\FileFailedJobProvider;\nuse Illuminate\\Queue", "suffix": "rviceProvider implements DeferrableProvider\n{\n use SerializesAndRestoresModelIdentifiers;\n\n /**\n * Register the service provider.\n *\n * @return void\n */\n public function register()\n {\n $this->configureSerializableClosureU", "middle": "\\Failed\\NullFailedJobProvider;\nuse Illuminate\\Support\\Arr;\nuse Illuminate\\Support\\Facades\\Facade;\nuse Illuminate\\Support\\ServiceProvider;\nuse Laravel\\SerializableClosure\\SerializableClosure;\n\nclass QueueServiceProvider extends Se", "meta": {"filepath": "src/Illuminate/Queue/QueueServiceProvider.php", "language": "php", "file_size": 11871, "cut_index": 921, "middle_length": 229}} {"prefix": ".\n *\n * @param array|string $views\n * @param \\Closure|string $callback\n * @return array\n */\n public function creator($views, $callback)\n {\n $creators = [];\n\n foreach ((array) $views as $view) {\n $creators[] = $this->addViewEvent($view, $callback, 'creating: ');\n }\n\n return $creators;\n }\n\n /**\n * Register multiple view composers via an array.\n *\n * @param array $composers\n * @return array\n */\n public function ", "suffix": "$registered;\n }\n\n /**\n * Register a view composer event.\n *\n * @param array|string $views\n * @param \\Closure|string $callback\n * @return array\n */\n public function composer($views, $callback)\n {\n $composers = ", "middle": "composers(array $composers)\n {\n $registered = [];\n\n foreach ($composers as $callback => $views) {\n $registered = array_merge($registered, $this->composer($views, $callback));\n }\n\n return ", "meta": {"filepath": "src/Illuminate/View/Concerns/ManagesEvents.php", "language": "php", "file_size": 5110, "cut_index": 716, "middle_length": 229}} {"prefix": "stripParentheses($expression);\n\n return 'has($__contextArgs[0])) :\nif (isset($value)) { $__contextPrevious[] = $value; }\n$value = context()->get($__c", "suffix": " return '';\n }\n\n /**\n * Compile the endcontext statements into valid PHP.\n *\n * @param string $expression\n * @return string\n */\n protected function compileEndcontext($expression)\n {\n ", "meta": {"filepath": "src/Illuminate/View/Compilers/Concerns/CompilesContexts.php", "language": "php", "file_size": 1013, "cut_index": 512, "middle_length": 229}} {"prefix": "of the last section that was started.\n *\n * @var string\n */\n protected $lastSection;\n\n /**\n * Compile the extends statements into valid PHP.\n *\n * @param string $expression\n * @return string\n */\n protected function compileExtends($expression)\n {\n $expression = $this->stripParentheses($expression);\n\n $echo = \"make({$expression}, array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>\";\n\n $this->fo", "suffix": "pression)\n {\n $expression = $this->stripParentheses($expression);\n\n $echo = \"first({$expression}, array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>\";\n\n $this->footer[] = $echo;\n\n ", "middle": "oter[] = $echo;\n\n return '';\n }\n\n /**\n * Compile the extends-first statements into valid PHP.\n *\n * @param string $expression\n * @return string\n */\n protected function compileExtendsFirst($ex", "meta": {"filepath": "src/Illuminate/View/Compilers/Concerns/CompilesLayouts.php", "language": "php", "file_size": 3069, "cut_index": 614, "middle_length": 229}} {"prefix": "roxy $min\n * @property-read HigherOrderCollectionProxy $partition\n * @property-read HigherOrderCollectionProxy $percentage\n * @property-read HigherOrderCollectionProxy $reject\n * @property-read HigherOrderCollectionProxy $skipUntil\n * @property-read HigherOrderCollectionProxy $skipWhile\n * @property-read HigherOrderCollectionProxy $some\n * @property-read HigherOrderCollectionProxy $sortBy\n * @prop", "suffix": "lectionProxy $takeWhile\n * @property-read HigherOrderCollectionProxy $unique\n * @property-read HigherOrderCollectionProxy $unless\n * @property-read HigherOrderCollectionProxy $until\n * @property-read ", "middle": "erty-read HigherOrderCollectionProxy $sortByDesc\n * @property-read HigherOrderCollectionProxy $sum\n * @property-read HigherOrderCollectionProxy $takeUntil\n * @property-read HigherOrderCol", "meta": {"filepath": "src/Illuminate/Collections/Traits/EnumeratesValues.php", "language": "php", "file_size": 34425, "cut_index": 2151, "middle_length": 229}} {"prefix": "te\\Translation;\n\nuse Illuminate\\Contracts\\Translation\\Loader;\n\nclass ArrayLoader implements Loader\n{\n /**\n * All of the translation messages.\n *\n * @var array\n */\n protected $messages = [];\n\n /**\n * Load the messages for the given locale.\n *\n * @param string $locale\n * @param string $group\n * @param string|null $namespace\n * @return array\n */\n public function load($locale, $group, $namespace = null)\n {\n $namespace = $namespace ?: '*';\n\n", "suffix": "lic function addNamespace($namespace, $hint)\n {\n //\n }\n\n /**\n * Add a new JSON path to the loader.\n *\n * @param string $path\n * @return void\n */\n public function addJsonPath($path)\n {\n //\n }\n\n /**\n ", "middle": " return $this->messages[$namespace][$locale][$group] ?? [];\n }\n\n /**\n * Add a new namespace to the loader.\n *\n * @param string $namespace\n * @param string $hint\n * @return void\n */\n pub", "meta": {"filepath": "src/Illuminate/Translation/ArrayLoader.php", "language": "php", "file_size": 1631, "cut_index": 537, "middle_length": 229}} {"prefix": "ements Loader\n{\n /**\n * The filesystem instance.\n *\n * @var \\Illuminate\\Filesystem\\Filesystem\n */\n protected $files;\n\n /**\n * The default paths for the loader.\n *\n * @var array\n */\n protected $paths;\n\n /**\n * All of the registered paths to JSON translation files.\n *\n * @var array\n */\n protected $jsonPaths = [];\n\n /**\n * All of the namespace hints.\n *\n * @var array\n */\n protected $hints = [];\n\n /**\n ", "suffix": " $this->files = $files;\n\n $this->paths = is_string($path) ? [$path] : $path;\n }\n\n /**\n * Load the messages for the given locale.\n *\n * @param string $locale\n * @param string $group\n * @param string|null $namespace\n ", "middle": " * Create a new file loader instance.\n *\n * @param \\Illuminate\\Filesystem\\Filesystem $files\n * @param array|string $path\n */\n public function __construct(Filesystem $files, array|string $path)\n {\n ", "meta": {"filepath": "src/Illuminate/Translation/FileLoader.php", "language": "php", "file_size": 5608, "cut_index": 716, "middle_length": 229}} {"prefix": " if (($value = $this->extract($segments, $number)) !== null) {\n return trim($value);\n }\n\n $segments = $this->stripConditions($segments);\n\n $pluralIndex = $this->getPluralIndex($locale, $number);\n\n if (count($segments) === 1 || ! isset($segments[$pluralIndex])) {\n return $segments[0];\n }\n\n return $segments[$pluralIndex];\n }\n\n /**\n * Extract a translation string using inline conditions.\n *\n * @param array $segments\n ", "suffix": " {\n return $line;\n }\n }\n }\n\n /**\n * Get the translation string if the condition matches.\n *\n * @param string $part\n * @param int $number\n * @return mixed\n */\n private function extractFro", "middle": " * @param int|float $number\n * @return mixed\n */\n private function extract($segments, $number)\n {\n foreach ($segments as $part) {\n if (! is_null($line = $this->extractFromString($part, $number)))", "meta": {"filepath": "src/Illuminate/Translation/MessageSelector.php", "language": "php", "file_size": 11926, "cut_index": 921, "middle_length": 229}} {"prefix": "e;\nuse Pheanstalk\\Pheanstalk;\nuse Pheanstalk\\Values\\Job;\nuse Pheanstalk\\Values\\JobId;\nuse Pheanstalk\\Values\\TubeName;\n\nclass BeanstalkdQueue extends Queue implements QueueContract\n{\n /**\n * The Pheanstalk instance.\n *\n * @var \\Pheanstalk\\Contract\\PheanstalkManagerInterface&\\Pheanstalk\\Contract\\PheanstalkPublisherInterface&\\Pheanstalk\\Contract\\PheanstalkSubscriberInterface\n */\n protected $pheanstalk;\n\n /**\n * The name of the default tube.\n *\n * @var string\n */\n pro", "suffix": " protected $blockFor;\n\n /**\n * Create a new Beanstalkd queue instance.\n *\n * @param \\Pheanstalk\\Contract\\PheanstalkManagerInterface&\\Pheanstalk\\Contract\\PheanstalkPublisherInterface&\\Pheanstalk\\Contract\\PheanstalkSubscriberInterface $phean", "middle": "tected $default;\n\n /**\n * The \"time to run\" for all pushed jobs.\n *\n * @var int\n */\n protected $timeToRun;\n\n /**\n * The maximum number of seconds to block for a job.\n *\n * @var int\n */\n ", "meta": {"filepath": "src/Illuminate/Queue/BeanstalkdQueue.php", "language": "php", "file_size": 8741, "cut_index": 716, "middle_length": 229}} {"prefix": ".\n *\n * @var string\n */\n protected $default;\n\n /**\n * The expiration time of a job.\n *\n * @var int|null\n */\n protected $retryAfter = 60;\n\n /**\n * The cached lock type for popping jobs.\n *\n * @var string|bool|null\n */\n protected $lockForPopping = null;\n\n /**\n * Create a new database queue instance.\n *\n * @param \\Illuminate\\Database\\Connection $database\n * @param string $table\n * @param string $default\n * @param int ", "suffix": "alse,\n ) {\n $this->table = $table;\n $this->default = $default;\n $this->database = $database;\n $this->retryAfter = $retryAfter;\n $this->dispatchAfterCommit = $dispatchAfterCommit;\n }\n\n /**\n * Get the size of t", "middle": "$retryAfter\n * @param bool $dispatchAfterCommit\n */\n public function __construct(\n Connection $database,\n $table,\n $default = 'default',\n $retryAfter = 60,\n $dispatchAfterCommit = f", "meta": {"filepath": "src/Illuminate/Queue/DatabaseQueue.php", "language": "php", "file_size": 17705, "cut_index": 1331, "middle_length": 229}} {"prefix": " the size of queue.\n *\n * KEYS[1] - The name of the primary queue\n * KEYS[2] - The name of the \"delayed\" queue\n * KEYS[3] - The name of the \"reserved\" queue\n *\n * @return string\n */\n public static function size()\n {\n return <<<'LUA'\nreturn redis.call('llen', KEYS[1]) + redis.call('zcard', KEYS[2]) + redis.call('zcard', KEYS[3])\nLUA;\n }\n\n /**\n * Get the Lua script for pushing jobs onto the queue.\n *\n * KEYS[1] - The queue to push the job onto, for ex", "suffix": "()\n {\n return <<<'LUA'\n-- Push the job onto the queue...\nredis.call('rpush', KEYS[1], ARGV[1])\n-- Push a notification onto the \"notify\" queue...\nredis.call('rpush', KEYS[2], 1)\nLUA;\n }\n\n /**\n * Get the Lua script for pushing delayed job", "middle": "ample: queues:foo\n * KEYS[2] - The notification list for the queue we are pushing jobs onto, for example: queues:foo:notify\n * ARGV[1] - The job payload\n *\n * @return string\n */\n public static function push", "meta": {"filepath": "src/Illuminate/Queue/LuaScripts.php", "language": "php", "file_size": 4923, "cut_index": 614, "middle_length": 229}} {"prefix": "es\n{\n /**\n * The mapping of class names to their default routes.\n *\n * @var array\n */\n protected $routes = [];\n\n /**\n * Get the queue connection that a given queueable instance should be routed to.\n *\n * @param object $queueable\n * @return string|null\n */\n public function getConnection($queueable)\n {\n $route = $this->getRoute($queueable);\n\n if (is_null($route)) {\n return;\n }\n\n return is_st", "suffix": "lic function getQueue($queueable)\n {\n $route = $this->getRoute($queueable);\n\n if (is_null($route)) {\n return;\n }\n\n return is_string($route)\n ? $route\n : $route[1];\n }\n\n /**\n * Get th", "middle": "ring($route)\n ? null\n : $route[0];\n }\n\n /**\n * Get the queue that a given queueable instance should be routed to.\n *\n * @param object $queueable\n * @return string|null\n */\n pub", "meta": {"filepath": "src/Illuminate/Queue/QueueRoutes.php", "language": "php", "file_size": 2330, "cut_index": 563, "middle_length": 229}} {"prefix": "usterConnection;\nuse Illuminate\\Support\\Collection;\nuse Illuminate\\Support\\Str;\n\nclass RedisQueue extends Queue implements QueueContract, ClearableQueue\n{\n /**\n * The Redis factory implementation.\n *\n * @var \\Illuminate\\Contracts\\Redis\\Factory\n */\n protected $redis;\n\n /**\n * The connection name.\n *\n * @var string\n */\n protected $connection;\n\n /**\n * The name of the default queue.\n *\n * @var string\n */\n protected $default;\n\n /**\n * The ", "suffix": " /**\n * The batch size to use when migrating delayed / expired jobs onto the primary queue.\n *\n * Negative values are infinite.\n *\n * @var int\n */\n protected $migrationBatchSize = -1;\n\n /**\n * Indicates if a secondary q", "middle": "expiration time of a job.\n *\n * @var int|null\n */\n protected $retryAfter = 60;\n\n /**\n * The maximum number of seconds to block for a job.\n *\n * @var int|null\n */\n protected $blockFor = null;\n\n", "meta": {"filepath": "src/Illuminate/Queue/RedisQueue.php", "language": "php", "file_size": 16215, "cut_index": 921, "middle_length": 229}} {"prefix": "te\\Translation;\n\ntrait CreatesPotentiallyTranslatedStrings\n{\n /**\n * Create a pending potentially translated string.\n *\n * @param string $attribute\n * @param string|null $message\n * @return \\Illuminate\\Translation\\PotentiallyTranslatedString\n */\n protected function pendingPotentiallyTranslatedString($attribute, $message)\n {\n $destructor = $message === null\n ? fn ($message) => $this->messages[] = $message\n : fn ($message) => $this->messages[$a", "suffix": "ject destructs.\n *\n * @var \\Closure\n */\n protected $destructor;\n\n /**\n * Create a new pending potentially translated string.\n *\n * @param string $message\n ", "middle": "ttribute] = $message;\n\n return new class($message ?? $attribute, $this->validator->getTranslator(), $destructor) extends PotentiallyTranslatedString\n {\n /**\n * The callback to call when the ob", "meta": {"filepath": "src/Illuminate/Translation/CreatesPotentiallyTranslatedStrings.php", "language": "php", "file_size": 1640, "cut_index": 537, "middle_length": 229}} {"prefix": "luminate\\Support\\enum_value;\n\nclass Translator extends NamespacedItemResolver implements TranslatorContract\n{\n use Macroable, ReflectsClosures;\n\n /**\n * The loader implementation.\n *\n * @var \\Illuminate\\Contracts\\Translation\\Loader\n */\n protected $loader;\n\n /**\n * The default locale being used by the translator.\n *\n * @var string\n */\n protected $locale;\n\n /**\n * The fallback locale used by the translator.\n *\n * @var string\n */\n protected $", "suffix": "*/\n protected $selector;\n\n /**\n * The callable that should be invoked to determine applicable locales.\n *\n * @var callable\n */\n protected $determineLocalesUsing;\n\n /**\n * The custom rendering callbacks for stringable objects", "middle": "fallback;\n\n /**\n * The array of loaded translation groups.\n *\n * @var array\n */\n protected $loaded = [];\n\n /**\n * The message selector.\n *\n * @var \\Illuminate\\Translation\\MessageSelector\n ", "meta": {"filepath": "src/Illuminate/Translation/Translator.php", "language": "php", "file_size": 16099, "cut_index": 921, "middle_length": 229}} {"prefix": "lluminate\\Support\\Collection;\nuse RuntimeException;\nuse Throwable;\n\nclass FailoverQueue extends Queue implements QueueContract\n{\n /**\n * The queues which failed on the last action.\n *\n * @var list\n */\n protected array $failingQueues = [];\n\n /**\n * Create a new failover queue instance.\n */\n public function __construct(\n public QueueManager $manager,\n public EventDispatcher $events,\n public array $connections\n ) {\n }\n\n /**\n * Get th", "suffix": "*\n * Get the number of pending jobs.\n *\n * @param string|null $queue\n * @return int\n */\n public function pendingSize($queue = null)\n {\n return $this->manager->connection($this->connections[0])->pendingSize($queue);\n }\n", "middle": "e size of the queue.\n *\n * @param string|null $queue\n * @return int\n */\n public function size($queue = null)\n {\n return $this->manager->connection($this->connections[0])->size($queue);\n }\n\n /*", "meta": {"filepath": "src/Illuminate/Queue/FailoverQueue.php", "language": "php", "file_size": 6247, "cut_index": 716, "middle_length": 229}} {"prefix": "gable;\n\nclass PotentiallyTranslatedString implements Stringable\n{\n /**\n * The string that may be translated.\n *\n * @var string\n */\n protected $string;\n\n /**\n * The translated string.\n *\n * @var string|null\n */\n protected $translation;\n\n /**\n * The validator that may perform the translation.\n *\n * @var \\Illuminate\\Contracts\\Translation\\Translator\n */\n protected $translator;\n\n /**\n * Create a new potentially translated string.\n *\n ", "suffix": "= $translator;\n }\n\n /**\n * Translate the string.\n *\n * @param array $replace\n * @param string|null $locale\n * @return $this\n */\n public function translate($replace = [], $locale = null)\n {\n $this->translation ", "middle": " * @param string $string\n * @param \\Illuminate\\Contracts\\Translation\\Translator $translator\n */\n public function __construct($string, $translator)\n {\n $this->string = $string;\n\n $this->translator ", "meta": {"filepath": "src/Illuminate/Translation/PotentiallyTranslatedString.php", "language": "php", "file_size": 2071, "cut_index": 563, "middle_length": 229}} {"prefix": "eAfterCommit;\nuse Illuminate\\Queue\\Attributes\\Backoff;\nuse Illuminate\\Queue\\Attributes\\DeleteWhenMissingModels;\nuse Illuminate\\Queue\\Attributes\\FailOnTimeout;\nuse Illuminate\\Queue\\Attributes\\MaxExceptions;\nuse Illuminate\\Queue\\Attributes\\ReadsQueueAttributes;\nuse Illuminate\\Queue\\Attributes\\Timeout;\nuse Illuminate\\Queue\\Attributes\\Tries;\nuse Illuminate\\Queue\\Events\\JobQueued;\nuse Illuminate\\Queue\\Events\\JobQueueing;\nuse Illuminate\\Support\\Carbon;\nuse Illuminate\\Support\\Collection;\nuse Illuminate\\Support\\Int", "suffix": "Container\\Container\n */\n protected $container;\n\n /**\n * The connection name for the queue.\n *\n * @var string\n */\n protected $connectionName;\n\n /**\n * The original configuration for the queue.\n *\n * @var array\n ", "middle": "eractsWithTime;\nuse Illuminate\\Support\\Str;\nuse RuntimeException;\nuse Throwable;\n\nabstract class Queue\n{\n use InteractsWithTime, ReadsQueueAttributes;\n\n /**\n * The IoC container instance.\n *\n * @var \\Illuminate\\", "meta": {"filepath": "src/Illuminate/Queue/Queue.php", "language": "php", "file_size": 15028, "cut_index": 921, "middle_length": 229}} {"prefix": "**\n * The command working path.\n *\n * @var string\n */\n protected $commandPath;\n\n /**\n * The environment the workers should run under.\n *\n * @var string\n */\n protected $environment;\n\n /**\n * The amount of seconds to wait before polling the queue.\n *\n * @var int\n */\n protected $sleep = 3;\n\n /**\n * The number of times to try a job before logging it failed.\n *\n * @var int\n */\n protected $maxTries = 0;\n\n /**\n * The output", "suffix": "h)\n {\n $this->commandPath = $commandPath;\n }\n\n /**\n * Get the PHP binary.\n *\n * @return string\n */\n protected function phpBinary()\n {\n return php_binary();\n }\n\n /**\n * Get the Artisan binary.\n *\n ", "middle": " handler callback.\n *\n * @var \\Closure|null\n */\n protected $outputHandler;\n\n /**\n * Create a new queue listener.\n *\n * @param string $commandPath\n */\n public function __construct($commandPat", "meta": {"filepath": "src/Illuminate/Queue/Listener.php", "language": "php", "file_size": 5738, "cut_index": 716, "middle_length": 229}} {"prefix": "uminate\\Bus\\BatchRepository;\nuse Illuminate\\Console\\Command;\nuse Illuminate\\Contracts\\Console\\Isolatable;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\n\n#[AsCommand(name: 'queue:retry-batch')]\nclass RetryBatchCommand extends Command implements Isolatable\n{\n /**\n * The console command signature.\n *\n * @var string\n */\n protected $signature = 'queue:retry-batch\n {id?* : The ID of the batch whose failed jobs should be retried}';\n\n /**\n * The console c", "suffix": " {\n $batchesFound = count($ids = $this->getBatchJobIds()) > 0;\n\n if ($batchesFound) {\n $this->components->info('Pushing failed batch jobs back onto the queue.');\n }\n\n foreach ($ids as $batchId) {\n $batch", "middle": "ommand description.\n *\n * @var string\n */\n protected $description = 'Retry the failed jobs for a batch';\n\n /**\n * Execute the console command.\n *\n * @return void\n */\n public function handle()\n", "meta": {"filepath": "src/Illuminate/Queue/Console/RetryBatchCommand.php", "language": "php", "file_size": 2246, "cut_index": 563, "middle_length": 229}} {"prefix": "te\\Queue\\Console;\n\nuse Illuminate\\Console\\MigrationGeneratorCommand;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\n\nuse function Illuminate\\Filesystem\\join_paths;\n\n#[AsCommand(name: 'make:queue-table', aliases: ['queue:table'])]\nclass TableCommand extends MigrationGeneratorCommand\n{\n /**\n * The console command name.\n *\n * @var string\n */\n protected $name = 'make:queue-table';\n\n /**\n * The console command name aliases.\n *\n * @var array\n */\n protected $aliases ", "suffix": "me.\n *\n * @return string\n */\n protected function migrationTableName()\n {\n return $this->laravel['config']['queue.connections.database.table'];\n }\n\n /**\n * Get the path to the migration stub file.\n *\n * @return str", "middle": "= ['queue:table'];\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected $description = 'Create a migration for the queue jobs database table';\n\n /**\n * Get the migration table na", "meta": {"filepath": "src/Illuminate/Queue/Console/TableCommand.php", "language": "php", "file_size": 1823, "cut_index": 537, "middle_length": 229}} {"prefix": "se Illuminate\\Support\\Carbon;\nuse Illuminate\\Support\\InteractsWithTime;\nuse Illuminate\\Support\\Stringable;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\nuse Symfony\\Component\\Console\\Terminal;\nuse Throwable;\n\nuse function Termwind\\terminal;\n\n#[AsCommand(name: 'queue:work')]\nclass WorkCommand extends Command\n{\n use InteractsWithTime;\n\n /**\n * The console command name.\n *\n * @var string\n */\n protected $signature = 'queue:work\n {connection? : The name of", "suffix": "in daemon mode (Deprecated)}\n {--once : Only process the next job on the queue}\n {--stop-when-empty : Stop when the queue is empty}\n {--stop-when-empty-for=0 : Stop when no jo", "middle": " the queue connection to work}\n {--name=default : The name of the worker}\n {--queue= : The names of the queues to work}\n {--daemon : Run the worker ", "meta": {"filepath": "src/Illuminate/Queue/Console/WorkCommand.php", "language": "php", "file_size": 12942, "cut_index": 921, "middle_length": 229}} {"prefix": "RateLimiting\\Unlimited;\nuse Illuminate\\Container\\Container;\nuse Illuminate\\Support\\Collection;\n\nuse function Illuminate\\Support\\enum_value;\n\nclass RateLimited\n{\n /**\n * The rate limiter instance.\n *\n * @var \\Illuminate\\Cache\\RateLimiter\n */\n protected $limiter;\n\n /**\n * The name of the rate limiter.\n *\n * @var string\n */\n protected $limiterName;\n\n /**\n * The number of seconds before a job should be available again if the limit is exceeded.\n *\n * @va", "suffix": "reate a new middleware instance.\n *\n * @param \\UnitEnum|string $limiterName\n */\n public function __construct($limiterName)\n {\n $this->limiter = Container::getInstance()->make(RateLimiter::class);\n\n $this->limiterName = (st", "middle": "r \\DateTimeInterface|int|null\n */\n public $releaseAfter;\n\n /**\n * Indicates if the job should be released if the limit is exceeded.\n *\n * @var bool\n */\n public $shouldRelease = true;\n\n /**\n * C", "meta": {"filepath": "src/Illuminate/Queue/Middleware/RateLimited.php", "language": "php", "file_size": 3872, "cut_index": 614, "middle_length": 229}} {"prefix": "p\n{\n /**\n * @param bool $param Whether the job should be skipped.\n */\n public function __construct(protected bool $skip = false)\n {\n }\n\n /**\n * Apply the middleware if the given condition is truthy.\n *\n * @param bool|(\\Closure(): bool) $condition\n */\n public static function when(Closure|bool $condition): static\n {\n return new static(value($condition));\n }\n\n /**\n * Apply the middleware unless the given condition is truthy.\n *\n * @para", "suffix": "ublic static function unless(Closure|bool $condition): static\n {\n return new static(! value($condition));\n }\n\n /**\n * Handle the job.\n */\n public function handle(mixed $job, callable $next): mixed\n {\n if ($this->skip) {", "middle": "m bool|(\\Closure(): bool) $condition\n */\n p", "meta": {"filepath": "src/Illuminate/Queue/Middleware/Skip.php", "language": "php", "file_size": 964, "cut_index": 582, "middle_length": 52}} {"prefix": "Illuminate\\Container\\Container;\nuse Illuminate\\Contracts\\Redis\\Connection;\nuse Illuminate\\Contracts\\Redis\\Factory as Redis;\nuse Illuminate\\Redis\\Limiters\\DurationLimiter;\nuse Illuminate\\Support\\InteractsWithTime;\nuse Throwable;\n\nclass ThrottlesExceptionsWithRedis extends ThrottlesExceptions\n{\n use InteractsWithTime;\n\n /**\n * The Redis connection instance.\n *\n * @var \\Illuminate\\Contracts\\Redis\\Connection\n */\n protected $redis;\n\n /**\n * The Redis connection that should be used", "suffix": " * Process the job.\n *\n * @param mixed $job\n * @param callable $next\n * @return mixed\n *\n * @throws \\Throwable\n */\n public function handle($job, $next)\n {\n $this->redis = Container::getInstance()\n ->m", "middle": ".\n *\n * @var string|null\n */\n protected $connectionName = null;\n\n /**\n * The rate limiter instance.\n *\n * @var \\Illuminate\\Redis\\Limiters\\DurationLimiter\n */\n protected $limiter;\n\n /**\n ", "meta": {"filepath": "src/Illuminate/Queue/Middleware/ThrottlesExceptionsWithRedis.php", "language": "php", "file_size": 2454, "cut_index": 563, "middle_length": 229}} {"prefix": "hp\n\nnamespace Illuminate\\Queue\\Connectors;\n\nuse Illuminate\\Queue\\BeanstalkdQueue;\nuse Pheanstalk\\Contract\\SocketFactoryInterface;\nuse Pheanstalk\\Pheanstalk;\nuse Pheanstalk\\Values\\Timeout;\n\nclass BeanstalkdConnector implements ConnectorInterface\n{\n /**\n * Establish a queue connection.\n *\n * @param array $config\n * @return \\Illuminate\\Contracts\\Queue\\Queue\n */\n public function connect(array $config)\n {\n return new BeanstalkdQueue(\n $this->pheanstalk($config),\n ", "suffix": "nstance.\n *\n * @param array $config\n * @return \\Pheanstalk\\Pheanstalk\n */\n protected function pheanstalk(array $config)\n {\n return Pheanstalk::create(\n $config['host'],\n $config['port'] ?? SocketFactoryI", "middle": " $config['queue'],\n $config['retry_after'] ?? Pheanstalk::DEFAULT_TTR,\n $config['block_for'] ?? 0,\n $config['after_commit'] ?? null\n );\n }\n\n /**\n * Create a Pheanstalk i", "meta": {"filepath": "src/Illuminate/Queue/Connectors/BeanstalkdConnector.php", "language": "php", "file_size": 1123, "cut_index": 515, "middle_length": 229}} {"prefix": "pace Illuminate\\Queue\\Connectors;\n\nuse Illuminate\\Contracts\\Redis\\Factory as Redis;\nuse Illuminate\\Queue\\RedisQueue;\n\nclass RedisConnector implements ConnectorInterface\n{\n /**\n * The Redis database instance.\n *\n * @var \\Illuminate\\Contracts\\Redis\\Factory\n */\n protected $redis;\n\n /**\n * The connection name.\n *\n * @var string\n */\n protected $connection;\n\n /**\n * Create a new Redis queue connector instance.\n *\n * @param \\Illuminate\\Contracts\\Redis\\Fac", "suffix": "tablish a queue connection.\n *\n * @param array $config\n * @return \\Illuminate\\Contracts\\Queue\\Queue\n */\n public function connect(array $config)\n {\n return new RedisQueue(\n $this->redis, $config['queue'],\n ", "middle": "tory $redis\n * @param string|null $connection\n */\n public function __construct(Redis $redis, $connection = null)\n {\n $this->redis = $redis;\n $this->connection = $connection;\n }\n\n /**\n * Es", "meta": {"filepath": "src/Illuminate/Queue/Connectors/RedisConnector.php", "language": "php", "file_size": 1253, "cut_index": 524, "middle_length": 229}} {"prefix": "Queue\\Job as JobContract;\nuse Pheanstalk\\Contract\\JobIdInterface;\nuse Pheanstalk\\Pheanstalk;\n\nclass BeanstalkdJob extends Job implements JobContract\n{\n /**\n * The Pheanstalk instance.\n *\n * @var \\Pheanstalk\\Contract\\PheanstalkManagerInterface&\\Pheanstalk\\Contract\\PheanstalkPublisherInterface&\\Pheanstalk\\Contract\\PheanstalkSubscriberInterface\n */\n protected $pheanstalk;\n\n /**\n * The Pheanstalk job instance.\n *\n * @var \\Pheanstalk\\Job\n */\n protected $job;\n\n /**\n ", "suffix": "act\\PheanstalkSubscriberInterface $pheanstalk\n * @param \\Pheanstalk\\Contract\\JobIdInterface $job\n * @param string $connectionName\n * @param string $queue\n */\n public function __construct(Container $container, $pheanstalk, JobIdInt", "middle": " * Create a new job instance.\n *\n * @param \\Illuminate\\Container\\Container $container\n * @param \\Pheanstalk\\Contract\\PheanstalkManagerInterface&\\Pheanstalk\\Contract\\PheanstalkPublisherInterface&\\Pheanstalk\\Contr", "meta": {"filepath": "src/Illuminate/Queue/Jobs/BeanstalkdJob.php", "language": "php", "file_size": 3143, "cut_index": 614, "middle_length": 229}} {"prefix": ";\nuse Illuminate\\Support\\Collection;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\n\n#[AsCommand(name: 'queue:failed')]\nclass ListFailedCommand extends Command\n{\n /**\n * The console command name.\n *\n * @var string\n */\n protected $signature = 'queue:failed\n {--json : Output the failed jobs as JSON}';\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected $description = 'List all of the failed queue jobs';\n\n /**\n", "suffix": " */\n public function handle()\n {\n $jobs = $this->getFailedJobs();\n\n if ($this->option('json')) {\n return $this->displayFailedJobsAsJson($jobs);\n }\n\n if (count($jobs) === 0) {\n return $this->compone", "middle": " * The table headers for the command.\n *\n * @var string[]\n */\n protected $headers = ['ID', 'Connection', 'Queue', 'Class', 'Failed At'];\n\n /**\n * Execute the console command.\n *\n * @return void\n ", "meta": {"filepath": "src/Illuminate/Queue/Console/ListFailedCommand.php", "language": "php", "file_size": 3794, "cut_index": 614, "middle_length": 229}} {"prefix": "lluminate\\Support\\Carbon;\nuse Illuminate\\Support\\Collection;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\n\n#[AsCommand(name: 'queue:monitor')]\nclass MonitorCommand extends Command\n{\n /**\n * The console command name.\n *\n * @var string\n */\n protected $signature = 'queue:monitor\n {queues : The names of the queues to monitor}\n {--max=1000 : The maximum number of jobs that can be on the queue before an event is dispatched}\n ", "suffix": " manager instance.\n *\n * @var \\Illuminate\\Contracts\\Queue\\Factory\n */\n protected $manager;\n\n /**\n * The events dispatcher instance.\n *\n * @var \\Illuminate\\Contracts\\Events\\Dispatcher\n */\n protected $events;\n\n /**\n ", "middle": " {--json : Output the queue size as JSON}';\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected $description = 'Monitor the size of the specified queues';\n\n /**\n * The queue", "meta": {"filepath": "src/Illuminate/Queue/Console/MonitorCommand.php", "language": "php", "file_size": 5180, "cut_index": 716, "middle_length": 229}} {"prefix": "uminate\\Bus\\BatchRepository;\nuse Illuminate\\Bus\\DatabaseBatchRepository;\nuse Illuminate\\Bus\\PrunableBatchRepository;\nuse Illuminate\\Console\\Command;\nuse Illuminate\\Support\\Carbon;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\n\n#[AsCommand(name: 'queue:prune-batches')]\nclass PruneBatchesCommand extends Command\n{\n /**\n * The console command signature.\n *\n * @var string\n */\n protected $signature = 'queue:prune-batches\n {--hours=24 : The number of hours to retain batch ", "suffix": " *\n * @var string\n */\n protected $description = 'Prune stale entries from the batches database';\n\n /**\n * Execute the console command.\n *\n * @return void\n */\n public function handle()\n {\n $repository = $this->", "middle": "data}\n {--unfinished= : The number of hours to retain unfinished batch data }\n {--cancelled= : The number of hours to retain cancelled batch data }';\n\n /**\n * The console command description.\n", "meta": {"filepath": "src/Illuminate/Queue/Console/PruneBatchesCommand.php", "language": "php", "file_size": 2042, "cut_index": 563, "middle_length": 229}} {"prefix": "\nnamespace Illuminate\\Queue\\Console;\n\nuse Illuminate\\Console\\Command;\nuse Illuminate\\Queue\\Failed\\PrunableFailedJobProvider;\nuse Illuminate\\Support\\Carbon;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\n\n#[AsCommand(name: 'queue:prune-failed')]\nclass PruneFailedJobsCommand extends Command\n{\n /**\n * The console command signature.\n *\n * @var string\n */\n protected $signature = 'queue:prune-failed\n {--hours=24 : The number of hours to retain failed jobs data}';\n\n /**\n", "suffix": " */\n public function handle()\n {\n $failer = $this->laravel['queue.failer'];\n\n if ($failer instanceof PrunableFailedJobProvider) {\n $count = $failer->prune(Carbon::now()->subHours($this->option('hours')));\n } else {", "middle": " * The console command description.\n *\n * @var string\n */\n protected $description = 'Prune stale entries from the failed jobs table';\n\n /**\n * Execute the console command.\n *\n * @return int|null\n", "meta": {"filepath": "src/Illuminate/Queue/Console/PruneFailedJobsCommand.php", "language": "php", "file_size": 1235, "cut_index": 518, "middle_length": 229}} {"prefix": "ate\\Support\\Arr;\nuse Illuminate\\Support\\Collection;\nuse RuntimeException;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\n\n#[AsCommand(name: 'queue:retry')]\nclass RetryCommand extends Command\n{\n /**\n * The console command signature.\n *\n * @var string\n */\n protected $signature = 'queue:retry\n {id?* : The ID of the failed job or \"all\" to retry all jobs}\n {--queue= : Retry all of the failed jobs for the specified queue}\n ", "suffix": "/**\n * Execute the console command.\n *\n * @return void\n */\n public function handle()\n {\n $jobsFound = count($ids = $this->getJobIds()) > 0;\n\n if ($jobsFound) {\n $this->components->info('Pushing failed queue jo", "middle": " {--range=* : Range of job IDs (numeric) to be retried (e.g. 1-5)}';\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected $description = 'Retry a failed queue job';\n\n ", "meta": {"filepath": "src/Illuminate/Queue/Console/RetryCommand.php", "language": "php", "file_size": 6533, "cut_index": 716, "middle_length": 229}} {"prefix": "pecified key that the rate limiter should use.\n *\n * @var string\n */\n protected $key;\n\n /**\n * Indicates whether the throttle key should use the job's UUID.\n *\n * @var bool\n */\n protected $byJob = false;\n\n /**\n * The maximum number of attempts allowed before rate limiting applies.\n *\n * @var int\n */\n protected $maxAttempts;\n\n /**\n * The number of seconds until the maximum attempts are reset.\n *\n * @var int\n */\n protected $decay", "suffix": " determines if the exception should be reported.\n *\n * @var callable\n */\n protected $reportCallback;\n\n /**\n * The callback that determines if rate limiting should apply.\n *\n * @var callable\n */\n protected $whenCallback;", "middle": "Seconds;\n\n /**\n * The number of minutes to wait before retrying the job after an exception.\n *\n * @var int|(\\Closure(\\Throwable): int)\n */\n protected $retryAfterMinutes = 0;\n\n /**\n * The callback that", "meta": {"filepath": "src/Illuminate/Queue/Middleware/ThrottlesExceptions.php", "language": "php", "file_size": 7995, "cut_index": 716, "middle_length": 229}} {"prefix": "hp\n\nnamespace Illuminate\\Queue\\Connectors;\n\nuse Illuminate\\Database\\ConnectionResolverInterface;\nuse Illuminate\\Queue\\DatabaseQueue;\n\nclass DatabaseConnector implements ConnectorInterface\n{\n /**\n * Database connections.\n *\n * @var \\Illuminate\\Database\\ConnectionResolverInterface\n */\n protected $connections;\n\n /**\n * Create a new connector instance.\n *\n * @param \\Illuminate\\Database\\ConnectionResolverInterface $connections\n */\n public function __construct(Connect", "suffix": "\n public function connect(array $config)\n {\n return new DatabaseQueue(\n $this->connections->connection($config['connection'] ?? null),\n $config['table'],\n $config['queue'],\n $config['retry_after'] ??", "middle": "ionResolverInterface $connections)\n {\n $this->connections = $connections;\n }\n\n /**\n * Establish a queue connection.\n *\n * @param array $config\n * @return \\Illuminate\\Contracts\\Queue\\Queue\n */", "meta": {"filepath": "src/Illuminate/Queue/Connectors/DatabaseConnector.php", "language": "php", "file_size": 1068, "cut_index": 515, "middle_length": 229}} {"prefix": "nate\\Container\\Container;\nuse Illuminate\\Contracts\\Queue\\Job as JobContract;\nuse Illuminate\\Queue\\DatabaseQueue;\n\nclass DatabaseJob extends Job implements JobContract\n{\n /**\n * The database queue instance.\n *\n * @var \\Illuminate\\Queue\\DatabaseQueue\n */\n protected $database;\n\n /**\n * The database job payload.\n *\n * @var \\Illuminate\\Queue\\Jobs\\DatabaseJobRecord\n */\n protected $job;\n\n /**\n * Create a new job instance.\n *\n * @param \\Illuminate\\Containe", "suffix": "ic function __construct(Container $container, DatabaseQueue $database, $job, $connectionName, $queue)\n {\n $this->job = $job;\n $this->queue = $queue;\n $this->database = $database;\n $this->container = $container;\n $this-", "middle": "r\\Container $container\n * @param \\Illuminate\\Queue\\DatabaseQueue $database\n * @param \\Illuminate\\Queue\\Jobs\\DatabaseJobRecord $job\n * @param string $connectionName\n * @param string $queue\n */\n publ", "meta": {"filepath": "src/Illuminate/Queue/Jobs/DatabaseJob.php", "language": "php", "file_size": 2307, "cut_index": 563, "middle_length": 229}} {"prefix": "ner;\nuse Illuminate\\Queue\\ListenerOptions;\nuse Illuminate\\Support\\Stringable;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\n\n#[AsCommand(name: 'queue:listen')]\nclass ListenCommand extends Command\n{\n /**\n * The console command name.\n *\n * @var string\n */\n protected $signature = 'queue:listen\n {connection? : The name of connection}\n {--name=default : The name of the worker}\n {--delay=0 : The number of s", "suffix": "ker to run even in maintenance mode}\n {--memory=128 : The memory limit in megabytes}\n {--queue= : The queue to listen on}\n {--sleep=3 : The number of seconds to sleep when no ", "middle": "econds to delay failed jobs (Deprecated)}\n {--backoff=0 : The number of seconds to wait before retrying a job that encountered an uncaught exception}\n {--force : Force the wor", "meta": {"filepath": "src/Illuminate/Queue/Console/ListenCommand.php", "language": "php", "file_size": 4162, "cut_index": 614, "middle_length": 229}} {"prefix": "\nnamespace Illuminate\\Queue\\Console;\n\nuse Illuminate\\Console\\Command;\nuse Illuminate\\Contracts\\Queue\\Factory as QueueManager;\nuse Illuminate\\Queue\\Console\\Concerns\\ParsesQueue;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\n\n#[AsCommand(name: 'queue:resume', aliases: ['queue:continue'])]\nclass ResumeCommand extends Command\n{\n use ParsesQueue;\n\n /**\n * The console command name.\n *\n * @var string\n */\n protected $signature = 'queue:resume {queue : The name of the queue that should ", "suffix": "g\n */\n protected $description = 'Resume job processing for a paused queue';\n\n /**\n * Execute the console command.\n *\n * @return int\n */\n public function handle(QueueManager $manager)\n {\n [$connection, $queue] = $this-", "middle": "resume processing}';\n\n /**\n * The console command name aliases.\n *\n * @var list\n */\n protected $aliases = ['queue:continue'];\n\n /**\n * The console command description.\n *\n * @var strin", "meta": {"filepath": "src/Illuminate/Queue/Console/ResumeCommand.php", "language": "php", "file_size": 1221, "cut_index": 518, "middle_length": 229}} {"prefix": "te\\Queue\\Middleware;\n\nuse Closure;\nuse Throwable;\n\nclass FailOnException\n{\n /**\n * The truth-test callback to determine if the job should fail.\n *\n * @var \\Closure(\\Throwable, mixed): bool\n */\n protected Closure $callback;\n\n /**\n * Create a middleware instance.\n *\n * @param (\\Closure(\\Throwable, mixed): bool)|array> $callback\n */\n public function __construct($callback)\n {\n if (is_array($callback)) {\n $call", "suffix": "ss-string<\\Throwable>> $exceptions\n * @return \\Closure(\\Throwable, mixed): bool\n */\n protected function failForExceptions(array $exceptions)\n {\n return static function (Throwable $throwable) use ($exceptions) {\n foreach ($e", "middle": "back = $this->failForExceptions($callback);\n }\n\n $this->callback = $callback;\n }\n\n /**\n * Indicate that the job should fail if it encounters the given exceptions.\n *\n * @param arraycache = $cache;\n }\n\n /**\n * ", "middle": " protected $description = 'Restart queue worker daemons after their current job';\n\n /**\n * The cache store implementation.\n *\n * @var \\Illuminate\\Contracts\\Cache\\Repository\n */\n protected $cache;\n\n /**\n ", "meta": {"filepath": "src/Illuminate/Queue/Console/RestartCommand.php", "language": "php", "file_size": 1269, "cut_index": 524, "middle_length": 229}} {"prefix": "\nnamespace Illuminate\\Auth;\n\nuse Illuminate\\Auth\\Notifications\\VerifyEmail;\n\ntrait MustVerifyEmail\n{\n /**\n * Determine if the user has verified their email address.\n *\n * @return bool\n */\n public function hasVerifiedEmail()\n {\n return ! is_null($this->email_verified_at);\n }\n\n /**\n * Mark the user's email as verified.\n *\n * @return bool\n */\n public function markEmailAsVerified()\n {\n return $this->forceFill([\n 'email_verified_at' =>", "suffix": " 'email_verified_at' => null,\n ])->save();\n }\n\n /**\n * Send the email verification notification.\n *\n * @return void\n */\n public function sendEmailVerificationNotification()\n {\n $this->notify(new VerifyEmail);", "middle": " $this->freshTimestamp(),\n ])->save();\n }\n\n /**\n * Mark the user's email as unverified.\n *\n * @return bool\n */\n public function markEmailAsUnverified()\n {\n return $this->forceFill([\n ", "meta": {"filepath": "src/Illuminate/Auth/MustVerifyEmail.php", "language": "php", "file_size": 1212, "cut_index": 518, "middle_length": 229}} {"prefix": "te\\Auth;\n\nclass Recaller\n{\n /**\n * The \"recaller\" / \"remember me\" cookie string.\n *\n * @var string\n */\n protected $recaller;\n\n /**\n * Create a new recaller instance.\n *\n * @param string $recaller\n */\n public function __construct($recaller)\n {\n $this->recaller = @unserialize($recaller, ['allowed_classes' => false]) ?: $recaller;\n }\n\n /**\n * Get the user ID from the recaller.\n *\n * @return string\n */\n public function id()\n {\n ", "suffix": "recaller, 3)[1];\n }\n\n /**\n * Get the password from the recaller.\n *\n * @return string\n */\n public function hash()\n {\n return explode('|', $this->recaller, 4)[2];\n }\n\n /**\n * Determine if the recaller is valid.\n ", "middle": " return explode('|', $this->recaller, 3)[0];\n }\n\n /**\n * Get the \"remember token\" token from the recaller.\n *\n * @return string\n */\n public function token()\n {\n return explode('|', $this->", "meta": {"filepath": "src/Illuminate/Auth/Recaller.php", "language": "php", "file_size": 1858, "cut_index": 537, "middle_length": 229}} {"prefix": "ontracts\\Auth\\Guard;\nuse Illuminate\\Contracts\\Auth\\UserProvider;\nuse Illuminate\\Http\\Request;\nuse Illuminate\\Support\\Traits\\Macroable;\n\nclass RequestGuard implements Guard\n{\n use GuardHelpers, Macroable;\n\n /**\n * The guard callback.\n *\n * @var callable\n */\n protected $callback;\n\n /**\n * The request instance.\n *\n * @var \\Illuminate\\Http\\Request\n */\n protected $request;\n\n /**\n * Create a new authentication guard.\n *\n * @param callable $callback\n ", "suffix": "\n {\n $this->request = $request;\n $this->callback = $callback;\n $this->provider = $provider;\n }\n\n /**\n * Get the currently authenticated user.\n *\n * @return \\Illuminate\\Contracts\\Auth\\Authenticatable|null\n */\n ", "middle": " * @param \\Illuminate\\Http\\Request $request\n * @param \\Illuminate\\Contracts\\Auth\\UserProvider|null $provider\n */\n public function __construct(callable $callback, Request $request, ?UserProvider $provider = null)", "meta": {"filepath": "src/Illuminate/Auth/RequestGuard.php", "language": "php", "file_size": 2126, "cut_index": 563, "middle_length": 229}} {"prefix": "\\Support\\Timebox;\nuse Illuminate\\Support\\Traits\\Macroable;\nuse InvalidArgumentException;\nuse RuntimeException;\nuse Symfony\\Component\\HttpFoundation\\Request;\nuse Symfony\\Component\\HttpKernel\\Exception\\UnauthorizedHttpException;\n\nclass SessionGuard implements StatefulGuard, SupportsBasicAuth\n{\n use GuardHelpers, Macroable;\n\n /**\n * The name of the guard. Typically \"web\".\n *\n * Corresponds to guard name in authentication configuration.\n *\n * @var string\n */\n public readonly str", "suffix": "recaller cookie.\n *\n * @var bool\n */\n protected $viaRemember = false;\n\n /**\n * The number of minutes that the \"remember me\" cookie should be valid for.\n *\n * @var int\n */\n protected $rememberDuration = 576000;\n\n /**\n", "middle": "ing $name;\n\n /**\n * The user we last attempted to retrieve.\n *\n * @var \\Illuminate\\Contracts\\Auth\\Authenticatable\n */\n protected $lastAttempted;\n\n /**\n * Indicates if the user was authenticated via a ", "meta": {"filepath": "src/Illuminate/Auth/SessionGuard.php", "language": "php", "file_size": 29384, "cut_index": 1331, "middle_length": 229}} {"prefix": "UserProvider;\nuse Illuminate\\Http\\Request;\nuse Illuminate\\Support\\Traits\\Macroable;\n\nclass TokenGuard implements Guard\n{\n use GuardHelpers, Macroable;\n\n /**\n * The request instance.\n *\n * @var \\Illuminate\\Http\\Request\n */\n protected $request;\n\n /**\n * The name of the query string item from the request containing the API token.\n *\n * @var string\n */\n protected $inputKey;\n\n /**\n * The name of the token \"column\" in persistent storage.\n *\n * @var str", "suffix": " @param \\Illuminate\\Contracts\\Auth\\UserProvider $provider\n * @param \\Illuminate\\Http\\Request $request\n * @param string $inputKey\n * @param string $storageKey\n * @param bool $hash\n */\n public function __construct(\n Us", "middle": "ing\n */\n protected $storageKey;\n\n /**\n * Indicates if the API token is hashed in storage.\n *\n * @var bool\n */\n protected $hash = false;\n\n /**\n * Create a new authentication guard.\n *\n *", "meta": {"filepath": "src/Illuminate/Auth/TokenGuard.php", "language": "php", "file_size": 3265, "cut_index": 614, "middle_length": 229}} {"prefix": "\\Auth\\CanResetPassword as CanResetPasswordContract;\nuse Illuminate\\Contracts\\Hashing\\Hasher as HasherContract;\nuse Illuminate\\Support\\Carbon;\nuse Illuminate\\Support\\Str;\n\nclass CacheTokenRepository implements TokenRepositoryInterface\n{\n /**\n * The format of the stored Carbon object.\n */\n protected string $format = 'Y-m-d H:i:s';\n\n /**\n * Create a new token repository instance.\n */\n public function __construct(\n protected Repository $cache,\n protected HasherContract ", "suffix": "assword $user\n * @return string\n */\n public function create(CanResetPasswordContract $user)\n {\n $this->delete($user);\n\n $token = hash_hmac('sha256', Str::random(40), $this->hashKey);\n\n $this->cache->put(\n $thi", "middle": "$hasher,\n protected string $hashKey,\n protected int $expires = 3600,\n protected int $throttle = 60,\n ) {\n }\n\n /**\n * Create a new token.\n *\n * @param \\Illuminate\\Contracts\\Auth\\CanResetP", "meta": {"filepath": "src/Illuminate/Auth/Passwords/CacheTokenRepository.php", "language": "php", "file_size": 3571, "cut_index": 614, "middle_length": 229}} {"prefix": "ConnectionInterface;\nuse Illuminate\\Support\\Carbon;\nuse Illuminate\\Support\\Str;\n\nclass DatabaseTokenRepository implements TokenRepositoryInterface\n{\n /**\n * Create a new token repository instance.\n *\n * @param int $expires The number of seconds a token should remain valid.\n * @param int $throttle Minimum number of seconds before the user can generate new password reset tokens.\n */\n public function __construct(\n protected ConnectionInterface $connection,\n protect", "suffix": " *\n * @param \\Illuminate\\Contracts\\Auth\\CanResetPassword $user\n * @return string\n */\n public function create(CanResetPasswordContract $user)\n {\n $email = $user->getEmailForPasswordReset();\n\n $this->deleteExisting($user", "middle": "ed HasherContract $hasher,\n protected string $table,\n protected string $hashKey,\n protected int $expires = 3600,\n protected int $throttle = 60,\n ) {\n }\n\n /**\n * Create a new token record.\n", "meta": {"filepath": "src/Illuminate/Auth/Passwords/DatabaseTokenRepository.php", "language": "php", "file_size": 5320, "cut_index": 716, "middle_length": 229}} {"prefix": "acts\\Auth\\PasswordBroker as PasswordBrokerContract;\nuse Illuminate\\Contracts\\Auth\\UserProvider;\nuse Illuminate\\Contracts\\Events\\Dispatcher;\nuse Illuminate\\Support\\Arr;\nuse Illuminate\\Support\\Timebox;\nuse UnexpectedValueException;\n\nclass PasswordBroker implements PasswordBrokerContract\n{\n /**\n * The password token repository.\n *\n * @var \\Illuminate\\Auth\\Passwords\\TokenRepositoryInterface\n */\n protected $tokens;\n\n /**\n * The user provider implementation.\n *\n * @var \\Illumi", "suffix": "box instance.\n *\n * @var \\Illuminate\\Support\\Timebox\n */\n protected $timebox;\n\n /**\n * The number of microseconds that the timebox should wait for.\n *\n * @var int\n */\n protected $timeboxDuration;\n\n /**\n * Create ", "middle": "nate\\Contracts\\Auth\\UserProvider\n */\n protected $users;\n\n /**\n * The event dispatcher instance.\n *\n * @var \\Illuminate\\Contracts\\Events\\Dispatcher|null\n */\n protected $events;\n\n /**\n * The time", "meta": {"filepath": "src/Illuminate/Auth/Passwords/PasswordBroker.php", "language": "php", "file_size": 7352, "cut_index": 716, "middle_length": 229}} {"prefix": "ctoryContract;\nuse InvalidArgumentException;\n\nuse function Illuminate\\Support\\enum_value;\n\n/**\n * @mixin \\Illuminate\\Contracts\\Auth\\PasswordBroker\n */\nclass PasswordBrokerManager implements FactoryContract\n{\n /**\n * The application instance.\n *\n * @var \\Illuminate\\Contracts\\Foundation\\Application\n */\n protected $app;\n\n /**\n * The array of created \"drivers\".\n *\n * @var array\n */\n protected $brokers = [];\n\n /**\n * Create a new PasswordBroker manager instance.", "suffix": "\n * @param \\UnitEnum|string|null $name\n * @return \\Illuminate\\Contracts\\Auth\\PasswordBroker\n */\n public function broker($name = null)\n {\n $name = enum_value($name) ?: $this->getDefaultDriver();\n\n return $this->brokers[$nam", "middle": "\n *\n * @param \\Illuminate\\Contracts\\Foundation\\Application $app\n */\n public function __construct($app)\n {\n $this->app = $app;\n }\n\n /**\n * Attempt to get the broker from the local cache.\n *", "meta": {"filepath": "src/Illuminate/Auth/Passwords/PasswordBrokerManager.php", "language": "php", "file_size": 4220, "cut_index": 614, "middle_length": 229}} {"prefix": "registerPasswordBroker();\n }\n\n /**\n * Register the password broker instance.\n *\n * @return void\n */\n protected function regi", "suffix": " return $app->make('auth.password')->broker();\n });\n }\n\n /**\n * Get the services provided by the provider.\n *\n * @return array\n */\n public function provides()\n {\n return ['auth.password', 'auth.password.broke", "middle": "sterPasswordBroker()\n {\n $this->app->singleton('auth.password', function ($app) {\n return new PasswordBrokerManager($app);\n });\n\n $this->app->bind('auth.password.broker', function ($app) {\n ", "meta": {"filepath": "src/Illuminate/Auth/Passwords/PasswordResetServiceProvider.php", "language": "php", "file_size": 1010, "cut_index": 512, "middle_length": 229}} {"prefix": "\nnamespace Illuminate\\Auth\\Passwords;\n\nuse Illuminate\\Contracts\\Auth\\CanResetPassword as CanResetPasswordContract;\n\ninterface TokenRepositoryInterface\n{\n /**\n * Create a new token.\n *\n * @param \\Illuminate\\Contracts\\Auth\\CanResetPassword $user\n * @return string\n */\n public function create(CanResetPasswordContract $user);\n\n /**\n * Determine if a token record exists and is valid.\n *\n * @param \\Illuminate\\Contracts\\Auth\\CanResetPassword $user\n * @param string ", "suffix": "am \\Illuminate\\Contracts\\Auth\\CanResetPassword $user\n * @return bool\n */\n public function recentlyCreatedToken(CanResetPasswordContract $user);\n\n /**\n * Delete a token record.\n *\n * @param \\Illuminate\\Contracts\\Auth\\CanResetPas", "middle": "$token\n * @return bool\n */\n public function exists(CanResetPasswordContract $user, #[\\SensitiveParameter] $token);\n\n /**\n * Determine if the given user recently created a password reset token.\n *\n * @par", "meta": {"filepath": "src/Illuminate/Auth/Passwords/TokenRepositoryInterface.php", "language": "php", "file_size": 1217, "cut_index": 518, "middle_length": 229}} {"prefix": "Illuminate\\Auth\\Console;\n\nuse Illuminate\\Console\\Command;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\n\n#[AsCommand(name: 'auth:clear-resets')]\nclass ClearResetsCommand extends Command\n{\n /**\n * The name and signature of the console command.\n *\n * @var string\n */\n protected $signature = 'auth:clear-resets {name? : The name of the password broker}';\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected $description = 'Flush expired passwo", "suffix": "e command.\n *\n * @return void\n */\n public function handle()\n {\n $this->laravel['auth.password']->broker($this->argument('name'))->getRepository()->deleteExpired();\n\n $this->components->info('Expired reset tokens cleared succ", "middle": "rd reset tokens';\n\n /**\n * Execute the consol", "meta": {"filepath": "src/Illuminate/Auth/Console/ClearResetsCommand.php", "language": "php", "file_size": 858, "cut_index": 529, "middle_length": 52}} {"prefix": "tion;\nuse Throwable;\n\nclass AuthorizationException extends Exception\n{\n /**\n * The authorization response returned by the gate.\n *\n * @var \\Illuminate\\Auth\\Access\\Response\n */\n protected $response;\n\n /**\n * The HTTP response status code.\n *\n * @var int|null\n */\n protected $status;\n\n /**\n * Create a new authorization exception instance.\n *\n * @param string|null $message\n * @param mixed $code\n * @param \\Throwable|null $previous\n */\n ", "suffix": " /**\n * Get the response from the gate.\n *\n * @return \\Illuminate\\Auth\\Access\\Response\n */\n public function response()\n {\n return $this->response;\n }\n\n /**\n * Set the response from the gate.\n *\n * @param \\Ill", "middle": " public function __construct($message = null, $code = null, ?Throwable $previous = null)\n {\n parent::__construct($message ?? 'This action is unauthorized.', 0, $previous);\n\n $this->code = $code ?: 0;\n }\n\n ", "meta": {"filepath": "src/Illuminate/Auth/Access/AuthorizationException.php", "language": "php", "file_size": 2236, "cut_index": 563, "middle_length": 229}} {"prefix": "Illuminate\\Queue\\Events;\n\nclass JobQueued\n{\n /**\n * Create a new event instance.\n *\n * @param string $connectionName The connection name.\n * @param string|null $queue The queue name.\n * @param string|int|null $id The job ID.\n * @param \\Closure|string|object $job The job instance.\n * @param string $payload The job payload.\n * @param int|null $delay The amount of time the job was delayed.\n */\n public function __construct(\n public $connectionNa", "suffix": " public $job,\n public $payload,\n public $delay,\n ) {\n }\n\n /**\n * Get the decoded job payload.\n *\n * @return array\n */\n public function payload()\n {\n return json_decode($this->payload, true, flags: JSON_", "middle": "me,\n public $queue,\n public $id,\n ", "meta": {"filepath": "src/Illuminate/Queue/Events/JobQueued.php", "language": "php", "file_size": 862, "cut_index": 529, "middle_length": 52}} {"prefix": "\n\nnamespace Illuminate\\Queue\\Events;\n\nclass JobQueueing\n{\n /**\n * Create a new event instance.\n *\n * @param string $connectionName The connection name.\n * @param string|null $queue The queue name.\n * @param \\Closure|string|object $job The job instance.\n * @param string $payload The job payload.\n * @param int|null $delay The number of seconds the job was delayed.\n */\n public function __construct(\n public $connectionName,\n public $queue,\n ", "suffix": ",\n public $payload,\n public $delay,\n ) {\n }\n\n /**\n * Get the decoded job payload.\n *\n * @return array\n */\n public function payload()\n {\n return json_decode($this->payload, true, flags: JSON_THROW_ON_ERROR", "middle": " public $job", "meta": {"filepath": "src/Illuminate/Queue/Events/JobQueueing.php", "language": "php", "file_size": 798, "cut_index": 517, "middle_length": 14}} {"prefix": "solverInterface;\nuse Illuminate\\Support\\Facades\\Date;\n\nclass DatabaseUuidFailedJobProvider implements CountableFailedJobProvider, FailedJobProviderInterface, PrunableFailedJobProvider\n{\n /**\n * The connection resolver implementation.\n *\n * @var \\Illuminate\\Database\\ConnectionResolverInterface\n */\n protected $resolver;\n\n /**\n * The database connection name.\n *\n * @var string\n */\n protected $database;\n\n /**\n * The database table.\n *\n * @var string\n ", "suffix": "e\n */\n public function __construct(ConnectionResolverInterface $resolver, $database, $table)\n {\n $this->table = $table;\n $this->resolver = $resolver;\n $this->database = $database;\n }\n\n /**\n * Log a failed job into s", "middle": " */\n protected $table;\n\n /**\n * Create a new database failed job provider.\n *\n * @param \\Illuminate\\Database\\ConnectionResolverInterface $resolver\n * @param string $database\n * @param string $tabl", "meta": {"filepath": "src/Illuminate/Queue/Failed/DatabaseUuidFailedJobProvider.php", "language": "php", "file_size": 4532, "cut_index": 614, "middle_length": 229}} {"prefix": "edJobProvider, FailedJobProviderInterface, PrunableFailedJobProvider\n{\n /**\n * The file path where the failed job file should be stored.\n *\n * @var string\n */\n protected $path;\n\n /**\n * The maximum number of failed jobs to retain.\n *\n * @var int\n */\n protected $limit;\n\n /**\n * The lock provider resolver.\n *\n * @var \\Closure\n */\n protected $lockProviderResolver;\n\n /**\n * Create a new file failed job provider.\n *\n * @param strin", "suffix": " $this->limit = $limit;\n $this->lockProviderResolver = $lockProviderResolver;\n }\n\n /**\n * Log a failed job into storage.\n *\n * @param string $connection\n * @param string $queue\n * @param string $payload\n * @param", "middle": "g $path\n * @param int $limit\n * @param \\Closure|null $lockProviderResolver\n */\n public function __construct($path, $limit = 100, ?Closure $lockProviderResolver = null)\n {\n $this->path = $path;\n ", "meta": {"filepath": "src/Illuminate/Queue/Failed/FileFailedJobProvider.php", "language": "php", "file_size": 5848, "cut_index": 716, "middle_length": 229}} {"prefix": "on;\nuse RuntimeException;\n\nuse function Illuminate\\Support\\enum_value;\n\n/**\n * @mixin \\Illuminate\\Contracts\\Auth\\Guard\n * @mixin \\Illuminate\\Contracts\\Auth\\StatefulGuard\n */\nclass AuthManager implements FactoryContract\n{\n use CreatesUserProviders, RebindsCallbacksToSelf;\n\n /**\n * The application instance.\n *\n * @var \\Illuminate\\Contracts\\Foundation\\Application\n */\n protected $app;\n\n /**\n * The registered custom driver creators.\n *\n * @var array\n */\n protected $", "suffix": "user for Gate, Request, and the Authenticatable contract.\n *\n * @var \\Closure\n */\n protected $userResolver;\n\n /**\n * Create a new Auth manager instance.\n *\n * @param \\Illuminate\\Contracts\\Foundation\\Application $app\n */\n", "middle": "customCreators = [];\n\n /**\n * The array of created \"drivers\".\n *\n * @var array\n */\n protected $guards = [];\n\n /**\n * The user resolver shared by various services.\n *\n * Determines the default ", "meta": {"filepath": "src/Illuminate/Auth/AuthManager.php", "language": "php", "file_size": 9002, "cut_index": 716, "middle_length": 229}} {"prefix": "uirePassword;\nuse Illuminate\\Contracts\\Auth\\Access\\Gate as GateContract;\nuse Illuminate\\Contracts\\Auth\\Authenticatable as AuthenticatableContract;\nuse Illuminate\\Contracts\\Routing\\ResponseFactory;\nuse Illuminate\\Contracts\\Routing\\UrlGenerator;\nuse Illuminate\\Support\\ServiceProvider;\n\nclass AuthServiceProvider extends ServiceProvider\n{\n /**\n * Register the service provider.\n *\n * @return void\n */\n public function register()\n {\n $this->registerAuthenticator();\n $this->re", "suffix": "uthenticator services.\n *\n * @return void\n */\n protected function registerAuthenticator()\n {\n $this->app->singleton('auth', fn ($app) => new AuthManager($app));\n\n $this->app->singleton('auth.driver', fn ($app) => $app['auth'", "middle": "gisterUserResolver();\n $this->registerAccessGate();\n $this->registerRequirePassword();\n $this->registerRequestRebindHandler();\n $this->registerEventRebindHandler();\n }\n\n /**\n * Register the a", "meta": {"filepath": "src/Illuminate/Auth/AuthServiceProvider.php", "language": "php", "file_size": 3110, "cut_index": 614, "middle_length": 229}} {"prefix": "entException;\n\ntrait CreatesUserProviders\n{\n /**\n * The registered custom provider creators.\n *\n * @var array\n */\n protected $customProviderCreators = [];\n\n /**\n * Create the user provider implementation for the driver.\n *\n * @param string|null $provider\n * @return \\Illuminate\\Contracts\\Auth\\UserProvider|null\n *\n * @throws \\InvalidArgumentException\n */\n public function createUserProvider($provider = null)\n {\n if (is_null($config = $this->ge", "suffix": "derCreators[$driver], $this->app, $config\n );\n }\n\n return match ($driver) {\n 'database' => $this->createDatabaseProvider($config),\n 'eloquent' => $this->createEloquentProvider($config),\n default => ", "middle": "tProviderConfiguration($provider))) {\n return;\n }\n\n if (isset($this->customProviderCreators[$driver = ($config['driver'] ?? null)])) {\n return call_user_func(\n $this->customProvi", "meta": {"filepath": "src/Illuminate/Auth/CreatesUserProviders.php", "language": "php", "file_size": 2485, "cut_index": 563, "middle_length": 229}} {"prefix": "Contract;\nuse Illuminate\\Contracts\\Support\\Arrayable;\nuse Illuminate\\Database\\ConnectionInterface;\n\nclass DatabaseUserProvider implements UserProvider\n{\n /**\n * The active database connection.\n *\n * @var \\Illuminate\\Database\\ConnectionInterface\n */\n protected $connection;\n\n /**\n * The hasher implementation.\n *\n * @var \\Illuminate\\Contracts\\Hashing\\Hasher\n */\n protected $hasher;\n\n /**\n * The table containing the users.\n *\n * @var string\n */\n p", "suffix": " $table\n */\n public function __construct(ConnectionInterface $connection, HasherContract $hasher, $table)\n {\n $this->connection = $connection;\n $this->table = $table;\n $this->hasher = $hasher;\n }\n\n /**\n * Retrieve a", "middle": "rotected $table;\n\n /**\n * Create a new database user provider.\n *\n * @param \\Illuminate\\Database\\ConnectionInterface $connection\n * @param \\Illuminate\\Contracts\\Hashing\\Hasher $hasher\n * @param string ", "meta": {"filepath": "src/Illuminate/Auth/DatabaseUserProvider.php", "language": "php", "file_size": 5628, "cut_index": 716, "middle_length": 229}} {"prefix": "ontracts\\Auth\\Authenticatable as UserContract;\n\nclass GenericUser implements UserContract\n{\n /**\n * All of the user's attributes.\n *\n * @var array\n */\n protected $attributes;\n\n /**\n * Create a new generic User object.\n *\n * @param array $attributes\n */\n public function __construct(array $attributes)\n {\n $this->attributes = $attributes;\n }\n\n /**\n * Get the name of the unique identifier for the user.\n *\n * @return string\n */\n pub", "suffix": ">attributes[$this->getAuthIdentifierName()];\n }\n\n /**\n * Get the name of the password attribute for the user.\n *\n * @return string\n */\n public function getAuthPasswordName()\n {\n return 'password';\n }\n\n /**\n * Ge", "middle": "lic function getAuthIdentifierName()\n {\n return 'id';\n }\n\n /**\n * Get the unique identifier for the user.\n *\n * @return mixed\n */\n public function getAuthIdentifier()\n {\n return $this-", "meta": {"filepath": "src/Illuminate/Auth/GenericUser.php", "language": "php", "file_size": 2739, "cut_index": 563, "middle_length": 229}} {"prefix": "Illuminate\\Container\\Container;\nuse Illuminate\\Contracts\\Redis\\Factory as Redis;\nuse Illuminate\\Redis\\Limiters\\DurationLimiter;\nuse Illuminate\\Support\\InteractsWithTime;\n\nclass RateLimitedWithRedis extends RateLimited\n{\n use InteractsWithTime;\n\n /**\n * The name of the Redis connection that should be used.\n *\n * @var string|null\n */\n protected $connectionName = null;\n\n /**\n * The timestamp of the end of the current duration by key.\n *\n * @var array\n */\n public $", "suffix": "ruct($limiterName);\n\n $this->connectionName = $connection;\n }\n\n /**\n * Handle a rate limited job.\n *\n * @param mixed $job\n * @param callable $next\n * @param array $limits\n * @return mixed\n */\n protected fun", "middle": "decaysAt = [];\n\n /**\n * Create a new middleware instance.\n *\n * @param \\UnitEnum|string $limiterName\n */\n public function __construct($limiterName, ?string $connection = null)\n {\n parent::__const", "meta": {"filepath": "src/Illuminate/Queue/Middleware/RateLimitedWithRedis.php", "language": "php", "file_size": 3034, "cut_index": 563, "middle_length": 229}} {"prefix": "Aws\\Credentials\\CredentialProvider;\nuse Aws\\Sqs\\SqsClient;\nuse Illuminate\\Queue\\SqsQueue;\nuse Illuminate\\Support\\Arr;\nuse InvalidArgumentException;\n\nclass SqsConnector implements ConnectorInterface\n{\n /**\n * Establish a queue connection.\n *\n * @param array $config\n * @return \\Illuminate\\Contracts\\Queue\\Queue\n */\n public function connect(array $config)\n {\n $config = $this->getDefaultConfiguration($config);\n\n if ($credentials = $this->resolveCredentialProvider($con", "suffix": "empty($config['token'])) {\n $config['credentials']['token'] = $config['token'];\n }\n }\n\n return new SqsQueue(\n new SqsClient(\n Arr::except($config, ['token', 'overflow'])\n ),\n ", "middle": "fig)) {\n $config['credentials'] = $credentials;\n } elseif (! empty($config['key']) && ! empty($config['secret'])) {\n $config['credentials'] = Arr::only($config, ['key', 'secret']);\n\n if (! ", "meta": {"filepath": "src/Illuminate/Queue/Connectors/SqsConnector.php", "language": "php", "file_size": 2615, "cut_index": 563, "middle_length": 229}} {"prefix": "hp\n\nnamespace Illuminate\\Queue\\Jobs;\n\nuse Illuminate\\Support\\InteractsWithTime;\n\nclass DatabaseJobRecord\n{\n use InteractsWithTime;\n\n /**\n * The underlying job record.\n *\n * @var \\stdClass\n */\n protected $record;\n\n /**\n * Create a new job record instance.\n *\n * @param \\stdClass $record\n */\n public function __construct($record)\n {\n $this->record = $record;\n }\n\n /**\n * Increment the number of times the job has been attempted.\n *\n * @r", "suffix": " */\n public function touch()\n {\n $this->record->reserved_at = $this->currentTime();\n\n return $this->record->reserved_at;\n }\n\n /**\n * Dynamically access the underlying job information.\n *\n * @param string $key\n ", "middle": "eturn int\n */\n public function increment()\n {\n $this->record->attempts++;\n\n return $this->record->attempts;\n }\n\n /**\n * Update the \"reserved at\" timestamp of the job.\n *\n * @return int\n ", "meta": {"filepath": "src/Illuminate/Queue/Jobs/DatabaseJobRecord.php", "language": "php", "file_size": 1108, "cut_index": 515, "middle_length": 229}} {"prefix": "pace Illuminate\\Queue\\Jobs;\n\nuse Illuminate\\Support\\Carbon;\n\nclass InspectedJob\n{\n /**\n * Create a new inspected job instance.\n *\n * @param string|null $uuid The unique identifier for the job.\n * @param string|null $name The display name of the job.\n * @param int $attempts The number of times the job has been attempted.\n * @param \\Illuminate\\Support\\Carbon|null $createdAt The date and time the job was created.\n */\n public function __construct(\n public rea", "suffix": " * @param string $payload The raw JSON job payload.\n * @param int|null $attempts The number of times the job has been attempted.\n * @return static\n */\n public static function fromPayload(string $payload, ?int $attempts = null): static", "middle": "donly ?string $uuid,\n public readonly ?string $name,\n public readonly int $attempts,\n public readonly ?Carbon $createdAt,\n ) {\n }\n\n /**\n * Create a new instance from a raw job payload.\n *\n ", "meta": {"filepath": "src/Illuminate/Queue/Jobs/InspectedJob.php", "language": "php", "file_size": 1381, "cut_index": 524, "middle_length": 229}} {"prefix": "\\Queue\\ManuallyFailedException;\nuse Illuminate\\Queue\\TimeoutExceededException;\nuse Illuminate\\Support\\InteractsWithTime;\nuse Throwable;\n\nabstract class Job\n{\n use InteractsWithTime;\n\n /**\n * The job handler instance.\n *\n * @var mixed\n */\n protected $instance;\n\n /**\n * The IoC container instance.\n *\n * @var \\Illuminate\\Container\\Container\n */\n protected $container;\n\n /**\n * Indicates if the job has been deleted.\n *\n * @var bool\n */\n protect", "suffix": "otected $failed = false;\n\n /**\n * The name of the connection the job belongs to.\n *\n * @var string\n */\n protected $connectionName;\n\n /**\n * The name of the queue the job belongs to.\n *\n * @var string\n */\n protect", "middle": "ed $deleted = false;\n\n /**\n * Indicates if the job has been released.\n *\n * @var bool\n */\n protected $released = false;\n\n /**\n * Indicates if the job has failed.\n *\n * @var bool\n */\n pr", "meta": {"filepath": "src/Illuminate/Queue/Jobs/Job.php", "language": "php", "file_size": 9159, "cut_index": 716, "middle_length": 229}} {"prefix": "e Illuminate\\Contracts\\Queue\\Job as JobContract;\nuse Illuminate\\Support\\Arr;\n\nclass SqsJob extends Job implements JobContract\n{\n /**\n * The Amazon SQS client instance.\n *\n * @var \\Aws\\Sqs\\SqsClient\n */\n protected $sqs;\n\n /**\n * The Amazon SQS job instance.\n *\n * @var array\n */\n protected $job;\n\n /**\n * The overflow storage options for large payload offloading.\n *\n * @var array\n */\n protected $overflowStorage = [];\n\n /**\n * The cached r", "suffix": "SqsClient $sqs\n * @param array $job\n * @param string $connectionName\n * @param string $queue\n * @param array $overflowStorage\n */\n public function __construct(Container $container, SqsClient $sqs, array $job, $connectionName", "middle": "aw body of the job.\n *\n * @var string|null\n */\n protected $cachedRawBody = null;\n\n /**\n * Create a new job instance.\n *\n * @param \\Illuminate\\Container\\Container $container\n * @param \\Aws\\Sqs\\", "meta": {"filepath": "src/Illuminate/Queue/Jobs/SqsJob.php", "language": "php", "file_size": 4334, "cut_index": 614, "middle_length": 229}} {"prefix": "ueueManager;\nuse Illuminate\\Queue\\QueueServiceProvider;\nuse Illuminate\\Support\\Traits\\CapsuleManagerTrait;\n\n/**\n * @mixin \\Illuminate\\Queue\\QueueManager\n * @mixin \\Illuminate\\Contracts\\Queue\\Queue\n */\nclass Manager\n{\n use CapsuleManagerTrait;\n\n /**\n * The queue manager instance.\n *\n * @var \\Illuminate\\Queue\\QueueManager\n */\n protected $manager;\n\n /**\n * Create a new queue capsule manager.\n *\n * @param \\Illuminate\\Container\\Container|null $container\n */\n publi", "suffix": "he container \"config\" bindings. This'll just make the queue\n // manager behave correctly since all the correct bindings are in place.\n $this->setupDefaultConfiguration();\n\n $this->setupManager();\n\n $this->registerConnectors();\n ", "middle": "c function __construct(?Container $container = null)\n {\n $this->setupContainer($container ?: new Container);\n\n // Once we have the container setup, we will set up the default configuration\n // options in t", "meta": {"filepath": "src/Illuminate/Queue/Capsule/Manager.php", "language": "php", "file_size": 4765, "cut_index": 614, "middle_length": 229}} {"prefix": "acades\\Date;\n\nclass DynamoDbFailedJobProvider implements FailedJobProviderInterface\n{\n /**\n * The DynamoDB client instance.\n *\n * @var \\Aws\\DynamoDb\\DynamoDbClient\n */\n protected $dynamo;\n\n /**\n * The application name.\n *\n * @var string\n */\n protected $applicationName;\n\n /**\n * The table name.\n *\n * @var string\n */\n protected $table;\n\n /**\n * Create a new DynamoDb failed job provider.\n *\n * @param \\Aws\\DynamoDb\\DynamoDbClient ", "suffix": " $dynamo;\n $this->applicationName = $applicationName;\n }\n\n /**\n * Log a failed job into storage.\n *\n * @param string $connection\n * @param string $queue\n * @param string $payload\n * @param \\Throwable $exception\n", "middle": " $dynamo\n * @param string $applicationName\n * @param string $table\n */\n public function __construct(DynamoDbClient $dynamo, $applicationName, $table)\n {\n $this->table = $table;\n $this->dynamo =", "meta": {"filepath": "src/Illuminate/Queue/Failed/DynamoDbFailedJobProvider.php", "language": "php", "file_size": 5397, "cut_index": 716, "middle_length": 229}} {"prefix": "te\\Queue\\Failed;\n\nclass NullFailedJobProvider implements CountableFailedJobProvider, FailedJobProviderInterface\n{\n /**\n * Log a failed job into storage.\n *\n * @param string $connection\n * @param string $queue\n * @param string $payload\n * @param \\Throwable $exception\n * @return int|null\n */\n public function log($connection, $queue, $payload, $exception)\n {\n //\n }\n\n /**\n * Get the IDs of all of the failed jobs.\n *\n * @param string|null", "suffix": "\n return [];\n }\n\n /**\n * Get a single failed job.\n *\n * @param mixed $id\n * @return object|null\n */\n public function find($id)\n {\n //\n }\n\n /**\n * Delete a single failed job from storage.\n *\n ", "middle": " $queue\n * @return array\n */\n public function ids($queue = null)\n {\n return [];\n }\n\n /**\n * Get a list of all of the failed jobs.\n *\n * @return array\n */\n public function all()\n {", "meta": {"filepath": "src/Illuminate/Queue/Failed/NullFailedJobProvider.php", "language": "php", "file_size": 1568, "cut_index": 537, "middle_length": 229}} {"prefix": "te\\Auth;\n\nuse Exception;\nuse Illuminate\\Http\\Request;\n\nclass AuthenticationException extends Exception\n{\n /**\n * All of the guards that were checked.\n *\n * @var array\n */\n protected $guards;\n\n /**\n * The path the user should be redirected to.\n *\n * @var string|null\n */\n protected $redirectTo;\n\n /**\n * The callback that should be used to generate the authentication redirect path.\n *\n * @var callable\n */\n protected static $redirectToCallback;\n\n", "suffix": "d.', array $guards = [], $redirectTo = null)\n {\n parent::__construct($message);\n\n $this->guards = $guards;\n $this->redirectTo = $redirectTo;\n }\n\n /**\n * Get the guards that were checked.\n *\n * @return array\n */", "middle": " /**\n * Create a new authentication exception.\n *\n * @param string $message\n * @param array $guards\n * @param string|null $redirectTo\n */\n public function __construct($message = 'Unauthenticate", "meta": {"filepath": "src/Illuminate/Auth/AuthenticationException.php", "language": "php", "file_size": 1831, "cut_index": 537, "middle_length": 229}} {"prefix": "ontracts\\Auth\\Authenticatable as AuthenticatableContract;\nuse Illuminate\\Contracts\\Auth\\UserProvider;\n\n/**\n * These methods are typically the same across all guards.\n */\ntrait GuardHelpers\n{\n /**\n * The currently authenticated user.\n *\n * @var \\Illuminate\\Contracts\\Auth\\Authenticatable|null\n */\n protected $user;\n\n /**\n * The user provider implementation.\n *\n * @var \\Illuminate\\Contracts\\Auth\\UserProvider\n */\n protected $provider;\n\n /**\n * Determine if the c", "suffix": " {\n return $this->user() ?? throw new AuthenticationException;\n }\n\n /**\n * Determine if the guard has a user instance.\n *\n * @return bool\n */\n public function hasUser()\n {\n return ! is_null($this->user);\n }\n\n", "middle": "urrent user is authenticated. If not, throw an exception.\n *\n * @return \\Illuminate\\Contracts\\Auth\\Authenticatable\n *\n * @throws \\Illuminate\\Auth\\AuthenticationException\n */\n public function authenticate()\n", "meta": {"filepath": "src/Illuminate/Auth/GuardHelpers.php", "language": "php", "file_size": 2498, "cut_index": 563, "middle_length": 229}} {"prefix": "\nnamespace Illuminate\\Queue\\Console;\n\nuse Illuminate\\Console\\Command;\nuse Illuminate\\Contracts\\Queue\\Factory as QueueManager;\nuse Illuminate\\Queue\\Console\\Concerns\\ParsesQueue;\nuse Illuminate\\Queue\\Worker;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\n\n#[AsCommand(name: 'queue:pause')]\nclass PauseCommand extends Command\n{\n use ParsesQueue;\n\n /**\n * The console command name.\n *\n * @var string\n */\n protected $signature = 'queue:pause {queue : The name of the queue to pause}';\n\n ", "suffix": " */\n public function handle(QueueManager $manager)\n {\n [$connection, $queue] = $this->parseQueue($this->argument('queue'));\n\n if (! Worker::$pausable) {\n $this->components->error('Queue pausing is currently disabled.');\n\n ", "middle": " /**\n * The console command description.\n *\n * @var string\n */\n protected $description = 'Pause job processing for a specific queue';\n\n /**\n * Execute the console command.\n *\n * @return int\n ", "meta": {"filepath": "src/Illuminate/Queue/Console/PauseCommand.php", "language": "php", "file_size": 1208, "cut_index": 518, "middle_length": 229}} {"prefix": "hp\n\nnamespace Illuminate\\Queue\\Jobs;\n\nuse Illuminate\\Support\\Str;\n\nclass JobName\n{\n /**\n * Parse the given job name into a class / method array.\n *\n * @param string $job\n * @return array\n */\n public static function parse($job)\n {\n return Str::parseCallback($job, 'fire');\n }\n\n /**\n * Get the resolved name of the queued job class.\n *\n * @param string $name\n * @param array $payload\n * @return string\n */\n public static function resolve($", "suffix": "m string $name\n * @param array $payload\n * @return string\n */\n public static function resolveClassName($name, $payload)\n {\n if (is_string($payload['data']['commandName'] ?? null)) {\n return $payload['d", "middle": "name, $payload)\n {\n if (! empty($payload['displayName'])) {\n return $payload['displayName'];\n }\n\n return $name;\n }\n\n /**\n * Get the class name for queued job class.\n *\n * @para", "meta": {"filepath": "src/Illuminate/Queue/Jobs/JobName.php", "language": "php", "file_size": 1063, "cut_index": 515, "middle_length": 229}} {"prefix": "te\\Queue\\Jobs;\n\nuse Illuminate\\Container\\Container;\nuse Illuminate\\Contracts\\Queue\\Job as JobContract;\n\nclass SyncJob extends Job implements JobContract\n{\n /**\n * The class name of the job.\n *\n * @var string\n */\n protected $job;\n\n /**\n * The queue message data.\n *\n * @var string\n */\n protected $payload;\n\n /**\n * Create a new job instance.\n *\n * @param \\Illuminate\\Container\\Container $container\n * @param string $payload\n * @param string ", "suffix": "->container = $container;\n $this->connectionName = $connectionName;\n }\n\n /**\n * Release the job back into the queue after (n) seconds.\n *\n * @param int $delay\n * @return void\n */\n public function release($delay = 0)\n ", "middle": " $connectionName\n * @param string $queue\n */\n public function __construct(Container $container, $payload, $connectionName, $queue)\n {\n $this->queue = $queue;\n $this->payload = $payload;\n $this", "meta": {"filepath": "src/Illuminate/Queue/Jobs/SyncJob.php", "language": "php", "file_size": 1700, "cut_index": 537, "middle_length": 229}} {"prefix": "hp\n\nnamespace Illuminate\\Queue\\Failed;\n\ninterface FailedJobProviderInterface\n{\n /**\n * Log a failed job into storage.\n *\n * @param string $connection\n * @param string $queue\n * @param string $payload\n * @param \\Throwable $exception\n * @return string|int|null\n */\n public function log($connection, $queue, $payload, $exception);\n\n /**\n * Get the IDs of all of the failed jobs.\n *\n * @param string|null $queue\n * @return array\n */\n public f", "suffix": "turn object|null\n */\n public function find($id);\n\n /**\n * Delete a single failed job from storage.\n *\n * @param mixed $id\n * @return bool\n */\n public function forget($id);\n\n /**\n * Flush all of the failed jobs from", "middle": "unction ids($queue = null);\n\n /**\n * Get a list of all of the failed jobs.\n *\n * @return array\n */\n public function all();\n\n /**\n * Get a single failed job.\n *\n * @param mixed $id\n * @re", "meta": {"filepath": "src/Illuminate/Queue/Failed/FailedJobProviderInterface.php", "language": "php", "file_size": 1121, "cut_index": 515, "middle_length": 229}} {"prefix": "Contract;\nuse Illuminate\\Contracts\\Support\\Arrayable;\n\nclass EloquentUserProvider implements UserProvider\n{\n /**\n * The hasher implementation.\n *\n * @var \\Illuminate\\Contracts\\Hashing\\Hasher\n */\n protected $hasher;\n\n /**\n * The Eloquent user model.\n *\n * @var class-string<\\Illuminate\\Contracts\\Auth\\Authenticatable&\\Illuminate\\Database\\Eloquent\\Model>\n */\n protected $model;\n\n /**\n * The callback that may modify the user retrieval queries.\n *\n * @var ", "suffix": " @param string $model\n */\n public function __construct(HasherContract $hasher, $model)\n {\n $this->model = $model;\n $this->hasher = $hasher;\n }\n\n /**\n * Retrieve a user by their unique identifier.\n *\n * @param mi", "middle": "(\\Closure(\\Illuminate\\Database\\Eloquent\\Builder<*>):mixed)|null\n */\n protected $queryCallback;\n\n /**\n * Create a new database user provider.\n *\n * @param \\Illuminate\\Contracts\\Hashing\\Hasher $hasher\n *", "meta": {"filepath": "src/Illuminate/Auth/EloquentUserProvider.php", "language": "php", "file_size": 7674, "cut_index": 716, "middle_length": 229}} {"prefix": "te\\Queue\\Jobs;\n\nuse Illuminate\\Contracts\\Queue\\Job as JobContract;\nuse Illuminate\\Support\\Str;\n\nclass FakeJob extends Job implements JobContract\n{\n /**\n * The number of seconds the released job was delayed.\n *\n * @var int\n */\n public $releaseDelay;\n\n /**\n * The number of attempts made to process the job.\n *\n * @var int\n */\n public $attempts = 1;\n\n /**\n * The exception the job failed with.\n *\n * @var \\Throwable\n */\n public $failedWith;\n\n /*", "suffix": "rn string\n */\n public function getRawBody()\n {\n return '';\n }\n\n /**\n * Release the job back into the queue after (n) seconds.\n *\n * @param \\DateTimeInterface|\\DateInterval|int $delay\n * @return void\n */\n publ", "middle": "*\n * Get the job identifier.\n *\n * @return string\n */\n public function getJobId()\n {\n return once(fn () => (string) Str::uuid());\n }\n\n /**\n * Get the raw body of the job.\n *\n * @retu", "meta": {"filepath": "src/Illuminate/Queue/Jobs/FakeJob.php", "language": "php", "file_size": 1739, "cut_index": 537, "middle_length": 229}} {"prefix": "nate\\Container\\Container;\nuse Illuminate\\Contracts\\Queue\\Job as JobContract;\nuse Illuminate\\Queue\\RedisQueue;\n\nclass RedisJob extends Job implements JobContract\n{\n /**\n * The Redis queue instance.\n *\n * @var \\Illuminate\\Queue\\RedisQueue\n */\n protected $redis;\n\n /**\n * The Redis raw job payload.\n *\n * @var string\n */\n protected $job;\n\n /**\n * The decoded JSON version of \"$job\".\n *\n * @var array\n */\n protected $decoded;\n\n /**\n * The Redi", "suffix": "minate\\Queue\\RedisQueue $redis\n * @param string $job\n * @param string $reserved\n * @param string $connectionName\n * @param string $queue\n */\n public function __construct(Container $container, RedisQueue $redis, $job, $reserv", "middle": "s job payload inside the reserved queue.\n *\n * @var string\n */\n protected $reserved;\n\n /**\n * Create a new job instance.\n *\n * @param \\Illuminate\\Container\\Container $container\n * @param \\Illu", "meta": {"filepath": "src/Illuminate/Queue/Jobs/RedisJob.php", "language": "php", "file_size": 3025, "cut_index": 563, "middle_length": 229}} {"prefix": "table\n{\n /**\n * The column name of the password field using during authentication.\n *\n * @var string\n */\n protected $authPasswordName = 'password';\n\n /**\n * The column name of the \"remember me\" token.\n *\n * @var string\n */\n protected $rememberTokenName = 'remember_token';\n\n /**\n * Get the name of the unique identifier for the user.\n *\n * @return string\n */\n public function getAuthIdentifierName()\n {\n return $this->getKeyName();\n ", "suffix": "que broadcast identifier for the user.\n *\n * @return mixed\n */\n public function getAuthIdentifierForBroadcasting()\n {\n return $this->getAuthIdentifier();\n }\n\n /**\n * Get the name of the password attribute for the user.\n ", "middle": "}\n\n /**\n * Get the unique identifier for the user.\n *\n * @return mixed\n */\n public function getAuthIdentifier()\n {\n return $this->{$this->getAuthIdentifierName()};\n }\n\n /**\n * Get the uni", "meta": {"filepath": "src/Illuminate/Auth/Authenticatable.php", "language": "php", "file_size": 2171, "cut_index": 563, "middle_length": 229}} {"prefix": "solverInterface;\nuse Illuminate\\Support\\Facades\\Date;\n\nclass DatabaseFailedJobProvider implements CountableFailedJobProvider, FailedJobProviderInterface, PrunableFailedJobProvider\n{\n /**\n * The connection resolver implementation.\n *\n * @var \\Illuminate\\Database\\ConnectionResolverInterface\n */\n protected $resolver;\n\n /**\n * The database connection name.\n *\n * @var string\n */\n protected $database;\n\n /**\n * The database table.\n *\n * @var string\n */", "suffix": " */\n public function __construct(ConnectionResolverInterface $resolver, $database, $table)\n {\n $this->table = $table;\n $this->resolver = $resolver;\n $this->database = $database;\n }\n\n /**\n * Log a failed job into stora", "middle": "\n protected $table;\n\n /**\n * Create a new database failed job provider.\n *\n * @param \\Illuminate\\Database\\ConnectionResolverInterface $resolver\n * @param string $database\n * @param string $table\n ", "meta": {"filepath": "src/Illuminate/Queue/Failed/DatabaseFailedJobProvider.php", "language": "php", "file_size": 4185, "cut_index": 614, "middle_length": 229}} {"prefix": "pace Illuminate\\Auth\\Access;\n\ntrait HandlesAuthorization\n{\n /**\n * Create a new access response.\n *\n * @param string|null $message\n * @param mixed $code\n * @return \\Illuminate\\Auth\\Access\\Response\n */\n protected function allow($message = null, $code = null)\n {\n return Response::allow($message, $code);\n }\n\n /**\n * Throws an unauthorized exception.\n *\n * @param string|null $message\n * @param mixed $code\n * @return \\Illuminate\\Auth\\Acces", "suffix": "ram string|null $message\n * @param int|null $code\n * @return \\Illuminate\\Auth\\Access\\Response\n */\n public function denyWithStatus($status, $message = null, $code = null)\n {\n return Response::denyWithStatus($status, $message, $c", "middle": "s\\Response\n */\n protected function deny($message = null, $code = null)\n {\n return Response::deny($message, $code);\n }\n\n /**\n * Deny with a HTTP status code.\n *\n * @param int $status\n * @pa", "meta": {"filepath": "src/Illuminate/Auth/Access/HandlesAuthorization.php", "language": "php", "file_size": 1345, "cut_index": 524, "middle_length": 229}} {"prefix": "\nclass Response implements Arrayable, Stringable\n{\n /**\n * Indicates whether the response was allowed.\n *\n * @var bool\n */\n protected $allowed;\n\n /**\n * The response message.\n *\n * @var string|null\n */\n protected $message;\n\n /**\n * The response code.\n *\n * @var mixed\n */\n protected $code;\n\n /**\n * The HTTP response status code.\n *\n * @var int|null\n */\n protected $status;\n\n /**\n * Create a new response.\n *\n ", "suffix": " $allowed;\n $this->message = $message;\n }\n\n /**\n * Create a new \"allow\" Response.\n *\n * @param string|null $message\n * @param mixed $code\n * @return \\Illuminate\\Auth\\Access\\Response\n */\n public static function al", "middle": " * @param bool $allowed\n * @param string|null $message\n * @param mixed $code\n */\n public function __construct($allowed, $message = '', $code = null)\n {\n $this->code = $code;\n $this->allowed =", "meta": {"filepath": "src/Illuminate/Auth/Access/Response.php", "language": "php", "file_size": 4364, "cut_index": 614, "middle_length": 229}} {"prefix": "ontract;\nuse Illuminate\\Support\\Str;\n\nclass Factory implements FactoryContract\n{\n /**\n * The Translator implementation.\n *\n * @var \\Illuminate\\Contracts\\Translation\\Translator\n */\n protected $translator;\n\n /**\n * The Presence Verifier implementation.\n *\n * @var \\Illuminate\\Validation\\PresenceVerifierInterface\n */\n protected $verifier;\n\n /**\n * The IoC container instance.\n *\n * @var \\Illuminate\\Contracts\\Container\\Container|null\n */\n protected", "suffix": "*\n * @var array\n */\n protected $implicitExtensions = [];\n\n /**\n * All of the custom dependent validator extensions.\n *\n * @var array\n */\n protected $dependentExtensions = []", "middle": " $container;\n\n /**\n * All of the custom validator extensions.\n *\n * @var array\n */\n protected $extensions = [];\n\n /**\n * All of the custom implicit validator extensions.\n ", "meta": {"filepath": "src/Illuminate/Validation/Factory.php", "language": "php", "file_size": 9089, "cut_index": 716, "middle_length": 229}} {"prefix": "nate\\Contracts\\Validation\\ImplicitRule;\nuse Illuminate\\Contracts\\Validation\\InvokableRule;\nuse Illuminate\\Contracts\\Validation\\Rule;\nuse Illuminate\\Contracts\\Validation\\ValidationRule;\nuse Illuminate\\Contracts\\Validation\\ValidatorAwareRule;\nuse Illuminate\\Translation\\CreatesPotentiallyTranslatedStrings;\n\nclass InvokableValidationRule implements Rule, ValidatorAwareRule\n{\n use CreatesPotentiallyTranslatedStrings;\n\n /**\n * The invokable that validates the attribute.\n *\n * @var \\Illuminate\\Co", "suffix": "d = false;\n\n /**\n * The validation error messages.\n *\n * @var array\n */\n protected $messages = [];\n\n /**\n * The current validator.\n *\n * @var \\Illuminate\\Validation\\Validator\n */\n protected $validator;\n\n /**\n ", "middle": "ntracts\\Validation\\ValidationRule|\\Illuminate\\Contracts\\Validation\\InvokableRule\n */\n protected $invokable;\n\n /**\n * Indicates if the validation invokable failed.\n *\n * @var bool\n */\n protected $faile", "meta": {"filepath": "src/Illuminate/Validation/InvokableValidationRule.php", "language": "php", "file_size": 3853, "cut_index": 614, "middle_length": 229}} {"prefix": "ion;\n\nuse Illuminate\\Contracts\\Validation\\CompilableRules;\n\nclass NestedRules implements CompilableRules\n{\n /**\n * The callback to execute.\n *\n * @var callable\n */\n protected $callback;\n\n /**\n * Create a new nested rule instance.\n *\n * @param callable $callback\n */\n public function __construct(callable $callback)\n {\n $this->callback = $callback;\n }\n\n /**\n * Compile the callback into an array of rules.\n *\n * @param string $attribute\n", "suffix": "data\n * @param mixed $context\n * @return \\stdClass\n */\n public function compile($attribute, $value, $data = null, $context = null)\n {\n $rules = call_user_func($this->callback, $value, $attribute, $data, $context);\n\n return", "middle": " * @param mixed $value\n * @param mixed $", "meta": {"filepath": "src/Illuminate/Validation/NestedRules.php", "language": "php", "file_size": 906, "cut_index": 547, "middle_length": 52}} {"prefix": "ion;\nuse Illuminate\\Contracts\\Validation\\UncompromisedVerifier;\nuse Illuminate\\Support\\Stringable;\n\nclass NotPwnedVerifier implements UncompromisedVerifier\n{\n /**\n * The HTTP factory instance.\n *\n * @var \\Illuminate\\Http\\Client\\Factory\n */\n protected $factory;\n\n /**\n * The number of seconds the request can run before timing out.\n *\n * @var int\n */\n protected $timeout;\n\n /**\n * Create a new uncompromised verifier.\n *\n * @param \\Illuminate\\Http\\Clien", "suffix": "fy that the given data has not been compromised in public breaches.\n *\n * @param array $data\n * @return bool\n */\n public function verify($data)\n {\n $value = $data['value'];\n $threshold = $data['threshold'];\n\n if", "middle": "t\\Factory $factory\n * @param int|null $timeout\n */\n public function __construct($factory, $timeout = null)\n {\n $this->factory = $factory;\n $this->timeout = $timeout ?? 30;\n }\n\n /**\n * Veri", "meta": {"filepath": "src/Illuminate/Validation/NotPwnedVerifier.php", "language": "php", "file_size": 2581, "cut_index": 563, "middle_length": 229}} {"prefix": "nate\\Validation;\n\ninterface PresenceVerifierInterface\n{\n /**\n * Count the number of objects in a collection having the given value.\n *\n * @param string $collection\n * @param string $column\n * @param string $value\n * @param int|null $excludeId\n * @param string|null $idColumn\n * @param array $extra\n * @return int\n */\n public function getCount($collection, $column, $value, $excludeId = null, $idColumn = null, array $extra = []);\n\n /**\n * Count th", "suffix": "alues.\n *\n * @param string $collection\n * @param string $column\n * @param array $values\n * @param array $extra\n * @return int\n */\n public function getMultiCount($collection, $column, array $values, array $extra = []);", "middle": "e number of objects in a collection with the given v", "meta": {"filepath": "src/Illuminate/Validation/PresenceVerifierInterface.php", "language": "php", "file_size": 846, "cut_index": 535, "middle_length": 52}} {"prefix": "Validation\\Rules\\Enum;\nuse Illuminate\\Validation\\Rules\\ExcludeIf;\nuse Illuminate\\Validation\\Rules\\ExcludeUnless;\nuse Illuminate\\Validation\\Rules\\Exists;\nuse Illuminate\\Validation\\Rules\\File;\nuse Illuminate\\Validation\\Rules\\ImageFile;\nuse Illuminate\\Validation\\Rules\\In;\nuse Illuminate\\Validation\\Rules\\NotIn;\nuse Illuminate\\Validation\\Rules\\Numeric;\nuse Illuminate\\Validation\\Rules\\ProhibitedIf;\nuse Illuminate\\Validation\\Rules\\ProhibitedUnless;\nuse Illuminate\\Validation\\Rules\\RequiredIf;\nuse Illuminate\\Validat", "suffix": "ability\n * @param mixed ...$arguments\n * @return \\Illuminate\\Validation\\Rules\\Can\n */\n public static function can($ability, ...$arguments)\n {\n return new Can($ability, $arguments);\n }\n\n /**\n * Apply the given rules if t", "middle": "ion\\Rules\\RequiredUnless;\nuse Illuminate\\Validation\\Rules\\StringRule;\nuse Illuminate\\Validation\\Rules\\Unique;\n\nclass Rule\n{\n use Macroable;\n\n /**\n * Get a can constraint builder instance.\n *\n * @param string $", "meta": {"filepath": "src/Illuminate/Validation/Rule.php", "language": "php", "file_size": 10352, "cut_index": 921, "middle_length": 229}} {"prefix": "nate\\Foundation\\Precognition;\n\n/**\n * Provides default implementation of ValidatesWhenResolved contract.\n */\ntrait ValidatesWhenResolvedTrait\n{\n /**\n * Validate the class instance.\n *\n * @return void\n */\n public function validateResolved()\n {\n $this->prepareForValidation();\n\n if (! $this->passesAuthorization()) {\n $this->failedAuthorization();\n }\n\n $instance = $this->getValidatorInstance();\n\n if ($this->isPrecognitive()) {\n $i", "suffix": "e data for validation.\n *\n * @return void\n */\n protected function prepareForValidation()\n {\n //\n }\n\n /**\n * Get the validator instance for the request.\n *\n * @return \\Illuminate\\Validation\\Validator\n */\n pr", "middle": "nstance->after(Precognition::afterValidationHook($this));\n }\n\n if ($instance->fails()) {\n $this->failedValidation($instance);\n }\n\n $this->passedValidation();\n }\n\n /**\n * Prepare th", "meta": {"filepath": "src/Illuminate/Validation/ValidatesWhenResolvedTrait.php", "language": "php", "file_size": 2207, "cut_index": 563, "middle_length": 229}} {"prefix": "nate\\Support\\Arr;\n\nclass ValidationData\n{\n /**\n * Initialize and gather data for the given attribute.\n *\n * @param string $attribute\n * @param array $masterData\n * @return array\n */\n public static function initializeAndGatherData($attribute, $masterData)\n {\n $data = Arr::dot(static::initializeAttributeOnData($attribute, $masterData));\n\n return array_merge($data, static::extractValuesForWildcards(\n $masterData, $data, $attribute\n ));\n }\n", "suffix": "izeAttributeOnData($attribute, $masterData)\n {\n $explicitPath = static::getLeadingExplicitAttributePath($attribute);\n\n $data = static::extractDataFromPath($explicitPath, $masterData);\n\n if (! str_contains($attribute, '*') || str_end", "middle": "\n /**\n * Gather a copy of the attribute data filled with any missing attributes.\n *\n * @param string $attribute\n * @param array $masterData\n * @return array\n */\n protected static function initial", "meta": {"filepath": "src/Illuminate/Validation/ValidationData.php", "language": "php", "file_size": 2924, "cut_index": 563, "middle_length": 229}} {"prefix": "port\\Facades\\Validator as ValidatorFacade;\n\nclass ValidationException extends Exception\n{\n /**\n * The validator instance.\n *\n * @var \\Illuminate\\Contracts\\Validation\\Validator\n */\n public $validator;\n\n /**\n * The recommended response to send to the client.\n *\n * @var \\Symfony\\Component\\HttpFoundation\\Response|null\n */\n public $response;\n\n /**\n * The status code to use for the response.\n *\n * @var int\n */\n public $status = 422;\n\n /**\n *", "suffix": "e a new exception instance.\n *\n * @param \\Illuminate\\Contracts\\Validation\\Validator $validator\n * @param \\Symfony\\Component\\HttpFoundation\\Response|null $response\n * @param string $errorBag\n */\n public function __construct($val", "middle": " The name of the error bag.\n *\n * @var string\n */\n public $errorBag;\n\n /**\n * The path the client should be redirected to.\n *\n * @var string|null\n */\n public $redirectTo;\n\n /**\n * Creat", "meta": {"filepath": "src/Illuminate/Validation/ValidationException.php", "language": "php", "file_size": 3747, "cut_index": 614, "middle_length": 229}} {"prefix": "te\\Validation\\Rules\\Exists;\nuse Illuminate\\Validation\\Rules\\Numeric;\nuse Illuminate\\Validation\\Rules\\StringRule;\nuse Illuminate\\Validation\\Rules\\Unique;\n\nclass ValidationRuleParser\n{\n /**\n * The data being validated.\n *\n * @var array\n */\n public $data;\n\n /**\n * The implicit attributes.\n *\n * @var array\n */\n public $implicitAttributes = [];\n\n /**\n * Create a new validation rule parser.\n *\n * @param array $data\n */\n public function __construc", "suffix": "ction explode($rules)\n {\n $this->implicitAttributes = [];\n\n $rules = $this->explodeRules($rules);\n\n return (object) [\n 'rules' => $rules,\n 'implicitAttributes' => $this->implicitAttributes,\n ];\n }\n\n ", "middle": "t(array $data)\n {\n $this->data = $data;\n }\n\n /**\n * Parse the human-friendly rules into a full rules array for the validator.\n *\n * @param array $rules\n * @return \\stdClass\n */\n public fun", "meta": {"filepath": "src/Illuminate/Validation/ValidationRuleParser.php", "language": "php", "file_size": 10229, "cut_index": 921, "middle_length": 229}} {"prefix": "nate\\Contracts\\Support\\DeferrableProvider;\nuse Illuminate\\Contracts\\Validation\\UncompromisedVerifier;\nuse Illuminate\\Http\\Client\\Factory as HttpFactory;\nuse Illuminate\\Support\\ServiceProvider;\n\nclass ValidationServiceProvider extends ServiceProvider implements DeferrableProvider\n{\n /**\n * Register the service provider.\n *\n * @return void\n */\n public function register()\n {\n $this->registerPresenceVerifier();\n $this->registerUncompromisedVerifier();\n $this->regist", "suffix": "{\n $validator = new Factory($app['translator'], $app);\n\n // The validation presence verifier is responsible for determining the existence of\n // values in a given data collection which is typically a relational database or\n", "middle": "erValidationFactory();\n }\n\n /**\n * Register the validation factory.\n *\n * @return void\n */\n protected function registerValidationFactory()\n {\n $this->app->singleton('validator', function ($app) ", "meta": {"filepath": "src/Illuminate/Validation/ValidationServiceProvider.php", "language": "php", "file_size": 2189, "cut_index": 563, "middle_length": 229}} {"prefix": " * @var \\Illuminate\\Support\\MessageBag\n */\n protected $messages;\n\n /**\n * The data under validation.\n *\n * @var array\n */\n protected $data;\n\n /**\n * The initial rules provided.\n *\n * @var array\n */\n protected $initialRules;\n\n /**\n * The rules to be applied to the data.\n *\n * @var array\n */\n protected $rules;\n\n /**\n * The current rule that is validating.\n *\n * @var string\n */\n protected $currentRule;\n\n /**\n ", "suffix": "@var callable|null\n */\n protected $implicitAttributesFormatter;\n\n /**\n * The cached data for the \"distinct\" rule.\n *\n * @var array\n */\n protected $distinctValues = [];\n\n /**\n * All of the registered \"after\" callbacks.\n ", "middle": " * The array of wildcard attributes with their asterisks expanded.\n *\n * @var array\n */\n protected $implicitAttributes = [];\n\n /**\n * The callback that should be used to format the attribute.\n *\n * ", "meta": {"filepath": "src/Illuminate/Validation/Validator.php", "language": "php", "file_size": 46393, "cut_index": 2151, "middle_length": 229}} {"prefix": "te\\Validation\\Concerns;\n\nuse Egulias\\EmailValidator\\EmailLexer;\nuse Egulias\\EmailValidator\\Result\\InvalidEmail;\nuse Egulias\\EmailValidator\\Validation\\EmailValidation;\n\nclass FilterEmailValidation implements EmailValidation\n{\n /**\n * The flags to pass to the filter_var function.\n *\n * @var int|null\n */\n protected $flags;\n\n /**\n * Create a new validation instance.\n *\n * @param int|null $flags\n */\n public function __construct($flags = null)\n {\n $this->fla", "suffix": "IL_UNICODE);\n }\n\n /**\n * Returns true if the given email is valid.\n *\n * @param string $email\n * @param \\Egulias\\EmailValidator\\EmailLexer $emailLexer\n * @return bool\n */\n public function isValid(string $email, EmailLex", "middle": "gs = $flags;\n }\n\n /**\n * Create a new instance which allows any unicode characters in local-part.\n *\n * @return static\n */\n public static function unicode()\n {\n return new static(FILTER_FLAG_EMA", "meta": {"filepath": "src/Illuminate/Validation/Concerns/FilterEmailValidation.php", "language": "php", "file_size": 1639, "cut_index": 537, "middle_length": 229}} {"prefix": " exists. If a custom validation message is being used we'll return the\n // custom message, otherwise we'll keep searching for a valid message.\n if (! is_null($inlineMessage)) {\n return $inlineMessage;\n }\n\n $lowerRule = Str::snake($rule);\n\n $customKey = \"validation.custom.{$attribute}.{$lowerRule}\";\n\n $customMessage = $this->getCustomMessageFromTranslator(\n in_array($rule, $this->sizeRules)\n ? [$customKey.\".{$this->getAttributeTyp", "suffix": " for\n // only some attributes and rules that need to get specially formed.\n if ($customMessage !== $customKey) {\n return $customMessage;\n }\n\n // If the rule being validated is a \"size\" rule, we will need to gather the", "middle": "e($attribute)}\", $customKey]\n : $customKey\n );\n\n // First we check for a custom defined validation message for the attribute\n // and rule. This allows the developer to specify specific messages", "meta": {"filepath": "src/Illuminate/Validation/Concerns/FormatsMessages.php", "language": "php", "file_size": 19022, "cut_index": 1331, "middle_length": 229}} {"prefix": " declined_if rule.\n *\n * @param string $message\n * @param string $attribute\n * @param string $rule\n * @param array $parameters\n * @return string\n */\n protected function replaceDeclinedIf($message, $attribute, $rule, $parameters)\n {\n return $this->replaceAcceptedIf($message, $attribute, $rule, $parameters);\n }\n\n /**\n * Replace all place-holders for the between rule.\n *\n * @param string $message\n * @param string $attribute\n", "suffix": "max'], $parameters, $message);\n }\n\n /**\n * Replace all place-holders for the date_format rule.\n *\n * @param string $message\n * @param string $attribute\n * @param string $rule\n * @param array $parameters\n ", "middle": " * @param string $rule\n * @param array $parameters\n * @return string\n */\n protected function replaceBetween($message, $attribute, $rule, $parameters)\n {\n return str_replace([':min', ':", "meta": {"filepath": "src/Illuminate/Validation/Concerns/ReplacesAttributes.php", "language": "php", "file_size": 29467, "cut_index": 1331, "middle_length": 229}} {"prefix": "ntRuleParameters($parameters);\n\n if (in_array($other, $values, is_bool($other) || is_null($other))) {\n return $this->validateRequired($attribute, $value) && in_array($value, $acceptable, true);\n }\n\n return true;\n }\n\n /**\n * Validate that an attribute is an active URL.\n *\n * @param string $attribute\n * @param mixed $value\n * @return bool\n */\n public function validateActiveUrl($attribute, $value)\n {\n if (! is_string($value)) {\n ", "suffix": "ords !== []) {\n return true;\n }\n } catch (Exception) {\n return false;\n }\n }\n\n return false;\n }\n\n /**\n * Get the DNS records for the given hostname.\n *\n *", "middle": " return false;\n }\n\n if ($url = parse_url($value, PHP_URL_HOST)) {\n try {\n $records = $this->getDnsRecords($url.'.', DNS_A | DNS_AAAA);\n\n if (is_array($records) && $rec", "meta": {"filepath": "src/Illuminate/Validation/Concerns/ValidatesAttributes.php", "language": "php", "file_size": 85405, "cut_index": 3790, "middle_length": 229}} {"prefix": "Illuminate\\Contracts\\Validation\\Rule;\nuse Illuminate\\Contracts\\Validation\\ValidatorAwareRule;\nuse Illuminate\\Support\\Arr;\nuse Illuminate\\Support\\Facades\\Validator;\nuse InvalidArgumentException;\n\nclass AnyOf implements Rule, ValidatorAwareRule\n{\n /**\n * The rules to match against.\n *\n * @var array\n */\n protected array $rules = [];\n\n /**\n * The validator performing the validation.\n *\n * @var \\Illuminate\\Validation\\Validator\n */\n protected $validator;\n\n /**\n *", "suffix": "throw new InvalidArgumentException('The provided value must be an array of validation rules.');\n }\n\n $this->rules = $rules;\n }\n\n /**\n * Determine if the validation rule passes.\n *\n * @param string $attribute\n * @param ", "middle": " Sets the validation rules to match against.\n *\n * @param array $rules\n *\n * @throws \\InvalidArgumentException\n */\n public function __construct($rules)\n {\n if (! is_array($rules)) {\n ", "meta": {"filepath": "src/Illuminate/Validation/Rules/AnyOf.php", "language": "php", "file_size": 2205, "cut_index": 563, "middle_length": 229}} {"prefix": "keys)) {\n return 'array';\n }\n\n $keys = array_map(\n static fn ($key) => enum_value($key),\n $this->keys,\n );\n\n return 'array:'.implode(',', $keys);", "middle": "\n $keys = $keys->toArray();\n }\n\n $this->keys = is_array($keys) ? $keys : func_get_args();\n }\n\n /**\n * Convert the rule to a validation string.\n *\n * @return string\n */\n public fun", "meta": {"filepath": "src/Illuminate/Validation/Rules/ArrayRule.php", "language": "php", "file_size": 1006, "cut_index": 512, "middle_length": 229}} {"prefix": "te\\Validation\\Rules;\n\nuse Illuminate\\Contracts\\Validation\\Rule;\nuse Illuminate\\Contracts\\Validation\\ValidatorAwareRule;\nuse Illuminate\\Support\\Facades\\Gate;\n\nclass Can implements Rule, ValidatorAwareRule\n{\n /**\n * The ability to check.\n *\n * @var string\n */\n protected $ability;\n\n /**\n * The arguments to pass to the authorization check.\n *\n * @var array\n */\n protected $arguments;\n\n /**\n * The current validator instance.\n *\n * @var \\Illuminate\\Validat", "suffix": " $this->ability = $ability;\n $this->arguments = $arguments;\n }\n\n /**\n * Determine if the validation rule passes.\n *\n * @param string $attribute\n * @param mixed $value\n * @return bool\n */\n public function pa", "middle": "ion\\Validator\n */\n protected $validator;\n\n /**\n * Constructor.\n *\n * @param string $ability\n * @param array $arguments\n */\n public function __construct($ability, array $arguments = [])\n {\n ", "meta": {"filepath": "src/Illuminate/Validation/Rules/Can.php", "language": "php", "file_size": 1840, "cut_index": 537, "middle_length": 229}} {"prefix": "hp\n\nnamespace Illuminate\\Validation\\Rules;\n\nuse Illuminate\\Contracts\\Support\\Arrayable;\nuse Stringable;\n\nuse function Illuminate\\Support\\enum_value;\n\nclass Contains implements Stringable\n{\n /**\n * The values that should be contained in the attribute.\n *\n * @var array\n */\n protected $values;\n\n /**\n * Create a new contains rule instance.\n *\n * @param \\Illuminate\\Contracts\\Support\\Arrayable|\\UnitEnum|array|string $values\n */\n public function __construct($values)\n ", "suffix": "ring.\n *\n * @return string\n */\n public function __toString()\n {\n $values = array_map(function ($value) {\n $value = enum_value($value);\n\n return '\"'.str_replace('\"', '\"\"', (string) $value).'\"';\n }, $this", "middle": " {\n if ($values instanceof Arrayable) {\n $values = $values->toArray();\n }\n\n $this->values = is_array($values) ? $values : func_get_args();\n }\n\n /**\n * Convert the rule to a validation st", "meta": {"filepath": "src/Illuminate/Validation/Rules/Contains.php", "language": "php", "file_size": 1070, "cut_index": 515, "middle_length": 229}} {"prefix": "Support\\enum_value;\n\ntrait DatabaseRule\n{\n /**\n * The table to run the query against.\n *\n * @var string\n */\n protected $table;\n\n /**\n * The column to check on.\n *\n * @var string\n */\n protected $column;\n\n /**\n * The extra where clauses for the query.\n *\n * @var array\n */\n protected $wheres = [];\n\n /**\n * The array of custom query callbacks.\n *\n * @var array\n */\n protected $using = [];\n\n /**\n * Create a new rule ins", "suffix": "table);\n }\n\n /**\n * Resolves the name of the table from the given string.\n *\n * @param string $table\n * @return string\n */\n public function resolveTableName($table)\n {\n if (! str_contains($table, '\\\\') || ! class_ex", "middle": "tance.\n *\n * @param string $table\n * @param string $column\n */\n public function __construct($table, $column = 'NULL')\n {\n $this->column = $column;\n\n $this->table = $this->resolveTableName($", "meta": {"filepath": "src/Illuminate/Validation/Rules/DatabaseRule.php", "language": "php", "file_size": 5480, "cut_index": 716, "middle_length": 229}} {"prefix": "Illuminate\\Support\\Traits\\Conditionable;\nuse Illuminate\\Support\\Traits\\Macroable;\nuse Stringable;\n\nclass Date implements Stringable\n{\n use Conditionable, Macroable;\n\n /**\n * The format of the date.\n */\n protected ?string $format = null;\n\n /**\n * The constraints for the date rule.\n */\n protected array $constraints = [];\n\n /**\n * Ensure the date has the given format.\n */\n public function format(string $format): static\n {\n $this->format = $format;\n\n ", "suffix": " public function afterToday(): static\n {\n return $this->after('today');\n }\n\n /**\n * Ensure the date is before or equal to today.\n */\n public function todayOrBefore(): static\n {\n return $this->beforeOrEqual('today');\n ", "middle": " return $this;\n }\n\n /**\n * Ensure the date is before today.\n */\n public function beforeToday(): static\n {\n return $this->before('today');\n }\n\n /**\n * Ensure the date is after today.\n */\n ", "meta": {"filepath": "src/Illuminate/Validation/Rules/Date.php", "language": "php", "file_size": 4123, "cut_index": 614, "middle_length": 229}} {"prefix": "able;\n\nclass Dimensions implements Stringable\n{\n use Conditionable;\n\n /**\n * The constraints for the dimensions rule.\n *\n * @var array\n */\n protected $constraints = [];\n\n /**\n * Create a new dimensions rule instance.\n *\n * @param array $constraints\n */\n public function __construct(array $constraints = [])\n {\n $this->constraints = $constraints;\n }\n\n /**\n * Set the \"width\" constraint.\n *\n * @param int $value\n * @return $this\n ", "suffix": " public function height($value)\n {\n $this->constraints['height'] = $value;\n\n return $this;\n }\n\n /**\n * Set the \"min width\" constraint.\n *\n * @param int $value\n * @return $this\n */\n public function minWidth", "middle": " */\n public function width($value)\n {\n $this->constraints['width'] = $value;\n\n return $this;\n }\n\n /**\n * Set the \"height\" constraint.\n *\n * @param int $value\n * @return $this\n */\n", "meta": {"filepath": "src/Illuminate/Validation/Rules/Dimensions.php", "language": "php", "file_size": 3222, "cut_index": 614, "middle_length": 229}} {"prefix": "hp\n\nnamespace Illuminate\\Validation\\Rules;\n\nuse Illuminate\\Contracts\\Support\\Arrayable;\nuse Stringable;\n\nuse function Illuminate\\Support\\enum_value;\n\nclass DoesntContain implements Stringable\n{\n /**\n * The values that should not be contained in the attribute.\n *\n * @var array\n */\n protected $values;\n\n /**\n * Create a new doesntContain rule instance.\n *\n * @param \\Illuminate\\Contracts\\Support\\Arrayable|\\UnitEnum|array|string $values\n */\n public function __constru", "suffix": " validation string.\n *\n * @return string\n */\n public function __toString()\n {\n $values = array_map(function ($value) {\n $value = enum_value($value);\n\n return '\"'.str_replace('\"', '\"\"', (string) $value).'\"';\n ", "middle": "ct($values)\n {\n if ($values instanceof Arrayable) {\n $values = $values->toArray();\n }\n\n $this->values = is_array($values) ? $values : func_get_args();\n }\n\n /**\n * Convert the rule to a", "meta": {"filepath": "src/Illuminate/Validation/Rules/DoesntContain.php", "language": "php", "file_size": 1090, "cut_index": 515, "middle_length": 229}} {"prefix": "minate\\Support\\Arr;\nuse Illuminate\\Support\\Facades\\Validator;\nuse Illuminate\\Support\\Traits\\Conditionable;\nuse Illuminate\\Support\\Traits\\Macroable;\nuse InvalidArgumentException;\n\nclass Email implements Rule, DataAwareRule, ValidatorAwareRule\n{\n use Conditionable, Macroable;\n\n public bool $validateMxRecord = false;\n public bool $preventSpoofing = false;\n public bool $nativeValidation = false;\n public bool $nativeValidationWithUnicodeAllowed = false;\n public bool $rfcCompliant = false;\n p", "suffix": " *\n * @var array\n */\n protected $data;\n\n /**\n * An array of custom rules that will be merged into the validation rules.\n *\n * @var array\n */\n protected $customRules = [];\n\n /**\n * The error message after validation,", "middle": "ublic bool $strictRfcCompliant = false;\n\n /**\n * The validator performing the validation.\n *\n * @var \\Illuminate\\Validation\\Validator\n */\n protected $validator;\n\n /**\n * The data under validation.\n ", "meta": {"filepath": "src/Illuminate/Validation/Rules/Email.php", "language": "php", "file_size": 6796, "cut_index": 716, "middle_length": 229}} {"prefix": "ate\\Contracts\\Validation\\Rule;\nuse Illuminate\\Contracts\\Validation\\ValidatorAwareRule;\nuse Illuminate\\Support\\Arr;\nuse Illuminate\\Support\\Traits\\Conditionable;\nuse Stringable;\nuse TypeError;\n\nuse function Illuminate\\Support\\enum_value;\n\nclass Enum implements Rule, ValidatorAwareRule, Stringable\n{\n use Conditionable;\n\n /**\n * The type of the enum.\n *\n * @var class-string<\\UnitEnum>\n */\n protected $type;\n\n /**\n * The current validator instance.\n *\n * @var \\Illuminate\\Va", "suffix": "d.\n *\n * @var array\n */\n protected $except = [];\n\n /**\n * Create a new rule instance.\n *\n * @param class-string<\\UnitEnum> $type\n */\n public function __construct($type)\n {\n $this->type = $type;\n }\n\n /*", "middle": "lidation\\Validator\n */\n protected $validator;\n\n /**\n * The cases that should be considered valid.\n *\n * @var array\n */\n protected $only = [];\n\n /**\n * The cases that should be considered invali", "meta": {"filepath": "src/Illuminate/Validation/Rules/Enum.php", "language": "php", "file_size": 4112, "cut_index": 614, "middle_length": 229}} {"prefix": "hp\n\nnamespace Illuminate\\Validation\\Rules;\n\nuse Closure;\nuse InvalidArgumentException;\nuse Stringable;\n\nclass ExcludeIf implements Stringable\n{\n /**\n * The condition that validates the attribute.\n *\n * @var (\\Closure(): bool)|bool\n */\n public $condition;\n\n /**\n * Create a new exclude validation rule based on a condition.\n *\n * @param (\\Closure(): bool)|bool $condition\n *\n * @throws \\InvalidArgumentException\n */\n public function __construct($condition)\n ", "suffix": "ean.');\n }\n }\n\n /**\n * Convert the rule to a validation string.\n *\n * @return string\n */\n public function __toString()\n {\n if (is_callable($this->condition)) {\n return call_user_func($this->condition) ? ", "middle": " {\n if ($condition instanceof Closure || is_bool($condition)) {\n $this->condition = $condition;\n } else {\n throw new InvalidArgumentException('The provided condition must be a callable or bool", "meta": {"filepath": "src/Illuminate/Validation/Rules/ExcludeIf.php", "language": "php", "file_size": 1085, "cut_index": 515, "middle_length": 229}} {"prefix": "hp\n\nnamespace Illuminate\\Validation\\Rules;\n\nuse Closure;\nuse InvalidArgumentException;\nuse Stringable;\n\nclass ExcludeUnless implements Stringable\n{\n /**\n * The condition that validates the attribute.\n *\n * @var (\\Closure(): bool)|bool\n */\n public $condition;\n\n /**\n * Create a new exclude validation rule based on a condition.\n *\n * @param (\\Closure(): bool)|bool $condition\n *\n * @throws \\InvalidArgumentException\n */\n public function __construct($condition", "suffix": "boolean.');\n }\n }\n\n /**\n * Convert the rule to a validation string.\n *\n * @return string\n */\n public function __toString()\n {\n if (is_callable($this->condition)) {\n return call_user_func($this->condition", "middle": ")\n {\n if ($condition instanceof Closure || is_bool($condition)) {\n $this->condition = $condition;\n } else {\n throw new InvalidArgumentException('The provided condition must be a callable or ", "meta": {"filepath": "src/Illuminate/Validation/Rules/ExcludeUnless.php", "language": "php", "file_size": 1089, "cut_index": 515, "middle_length": 229}} {"prefix": "\n\nclass File implements Rule, DataAwareRule, ValidatorAwareRule\n{\n use Conditionable, Macroable;\n\n /**\n * The MIME types that the given file should match. This array may also contain file extensions.\n *\n * @var array\n */\n protected $allowedMimetypes = [];\n\n /**\n * The extensions that the given file should match.\n *\n * @var array\n */\n protected $allowedExtensions = [];\n\n /**\n * The minimum size in kilobytes that the file can be.\n *\n * @var null|in", "suffix": "oding.\n *\n * @var string|null\n */\n protected $encoding = null;\n\n /**\n * An array of custom rules that will be merged into the validation rules.\n *\n * @var array\n */\n protected $customRules = [];\n\n /**\n * The erro", "middle": "t\n */\n protected $minimumFileSize = null;\n\n /**\n * The maximum size in kilobytes that the file can be.\n *\n * @var null|int\n */\n protected $maximumFileSize = null;\n\n /**\n * The required file enc", "meta": {"filepath": "src/Illuminate/Validation/Rules/File.php", "language": "php", "file_size": 9984, "cut_index": 921, "middle_length": 229}} {"prefix": "\nnamespace Illuminate\\Validation\\Rules;\n\nuse Illuminate\\Contracts\\Support\\Arrayable;\nuse Stringable;\n\nuse function Illuminate\\Support\\enum_value;\n\nclass In implements Stringable\n{\n /**\n * The name of the rule.\n *\n * @var string\n */\n protected $rule = 'in';\n\n /**\n * The accepted values.\n *\n * @var array\n */\n protected $values;\n\n /**\n * Create a new in rule instance.\n *\n * @param \\Illuminate\\Contracts\\Support\\Arrayable|\\UnitEnum|array|string $values", "suffix": "\n\n /**\n * Convert the rule to a validation string.\n *\n * @return string\n *\n * @see \\Illuminate\\Validation\\ValidationRuleParser::parseParameters\n */\n public function __toString()\n {\n $values = array_map(function ($val", "middle": "\n */\n public function __construct($values)\n {\n if ($values instanceof Arrayable) {\n $values = $values->toArray();\n }\n\n $this->values = is_array($values) ? $values : func_get_args();\n }", "meta": {"filepath": "src/Illuminate/Validation/Rules/In.php", "language": "php", "file_size": 1209, "cut_index": 518, "middle_length": 229}} {"prefix": "\nnamespace Illuminate\\Validation\\Rules;\n\nuse Illuminate\\Contracts\\Support\\Arrayable;\nuse Stringable;\n\nuse function Illuminate\\Support\\enum_value;\n\nclass NotIn implements Stringable\n{\n /**\n * The name of the rule.\n *\n * @var string\n */\n protected $rule = 'not_in';\n\n /**\n * The accepted values.\n *\n * @var array\n */\n protected $values;\n\n /**\n * Create a new \"not in\" rule instance.\n *\n * @param \\Illuminate\\Contracts\\Support\\Arrayable|\\UnitEnum|array|st", "suffix": "args();\n }\n\n /**\n * Convert the rule to a validation string.\n *\n * @return string\n */\n public function __toString()\n {\n $values = array_map(function ($value) {\n $value = enum_value($value);\n\n return ", "middle": "ring $values\n */\n public function __construct($values)\n {\n if ($values instanceof Arrayable) {\n $values = $values->toArray();\n }\n\n $this->values = is_array($values) ? $values : func_get_", "meta": {"filepath": "src/Illuminate/Validation/Rules/NotIn.php", "language": "php", "file_size": 1142, "cut_index": 518, "middle_length": 229}} {"prefix": "**\n * The constraints for the number rule.\n */\n protected array $constraints = ['numeric'];\n\n /**\n * The field under validation must have a size between the given min and max (inclusive).\n *\n * @param int|float $min\n * @param int|float $max\n * @return $this\n */\n public function between(int|float $min, int|float $max): Numeric\n {\n return $this->addRule('between:'.$min.','.$max);\n }\n\n /**\n * The field under validation must contain the specified ", "suffix": " if ($max !== null) {\n $rule .= ','.$max;\n }\n\n return $this->addRule($rule);\n }\n\n /**\n * The field under validation must have a different value than field.\n *\n * @param string $field\n * @return $this\n */", "middle": "number of decimal places.\n *\n * @param int $min\n * @param int|null $max\n * @return $this\n */\n public function decimal(int $min, ?int $max = null): Numeric\n {\n $rule = 'decimal:'.$min;\n\n ", "meta": {"filepath": "src/Illuminate/Validation/Rules/Numeric.php", "language": "php", "file_size": 5498, "cut_index": 716, "middle_length": 229}} {"prefix": "\n /**\n * The authenticatable model.\n *\n * @var \\Illuminate\\Contracts\\Auth\\Authenticatable|null\n */\n public $user;\n\n /**\n * The ability being evaluated.\n *\n * @var string\n */\n public $ability;\n\n /**\n * The result of the evaluation.\n *\n * @var bool|null\n */\n public $result;\n\n /**\n * The arguments given during evaluation.\n *\n * @var array\n */\n public $arguments;\n\n /**\n * Create a new event instance.\n *\n * @pa", "suffix": " $user\n * @param string $ability\n * @param bool|null $result\n * @param array $arguments\n */\n public function __construct($user, $ability, $result, $arguments)\n {\n $this->user = $user;\n $this->ability = $ability;\n ", "middle": "ram \\Illuminate\\Contracts\\Auth\\Authenticatable|null", "meta": {"filepath": "src/Illuminate/Auth/Access/Events/GateEvaluated.php", "language": "php", "file_size": 969, "cut_index": 582, "middle_length": 52}} {"prefix": "losure;\nuse Illuminate\\Contracts\\Auth\\Access\\Gate;\nuse Illuminate\\Database\\Eloquent\\Model;\nuse Illuminate\\Support\\Collection;\n\nuse function Illuminate\\Support\\enum_value;\n\nclass Authorize\n{\n /**\n * The gate instance.\n *\n * @var \\Illuminate\\Contracts\\Auth\\Access\\Gate\n */\n protected $gate;\n\n /**\n * Create a new middleware instance.\n *\n * @param \\Illuminate\\Contracts\\Auth\\Access\\Gate $gate\n */\n public function __construct(Gate $gate)\n {\n $this->gate = $ga", "suffix": "ty, ...$models)\n {\n return static::class.':'.implode(',', [enum_value($ability), ...$models]);\n }\n\n /**\n * Handle an incoming request.\n *\n * @param \\Illuminate\\Http\\Request $request\n * @param \\Closure $next\n * @param", "middle": "te;\n }\n\n /**\n * Specify the ability and models for the middleware.\n *\n * @param \\UnitEnum|string $ability\n * @param string ...$models\n * @return string\n */\n public static function using($abili", "meta": {"filepath": "src/Illuminate/Auth/Middleware/Authorize.php", "language": "php", "file_size": 2682, "cut_index": 563, "middle_length": 229}} {"prefix": "losure;\nuse Illuminate\\Http\\Request;\nuse Illuminate\\Support\\Facades\\Auth;\nuse Illuminate\\Support\\Facades\\Route;\nuse Symfony\\Component\\HttpFoundation\\Response;\n\nclass RedirectIfAuthenticated\n{\n /**\n * The callback that should be used to generate the authentication redirect path.\n *\n * @var callable|null\n */\n protected static $redirectToCallback;\n\n /**\n * Specify the guards for the middleware.\n *\n * @param string $guard\n * @param string $others\n * @return strin", "suffix": "e\\Http\\Request): (\\Symfony\\Component\\HttpFoundation\\Response) $next\n */\n public function handle(Request $request, Closure $next, string ...$guards): Response\n {\n $guards = empty($guards) ? [null] : $guards;\n\n foreach ($guards as $g", "middle": "g\n */\n public static function using($guard, ...$others)\n {\n return static::class.':'.implode(',', [$guard, ...$others]);\n }\n\n /**\n * Handle an incoming request.\n *\n * @param \\Closure(\\Illuminat", "meta": {"filepath": "src/Illuminate/Auth/Middleware/RedirectIfAuthenticated.php", "language": "php", "file_size": 2403, "cut_index": 563, "middle_length": 229}} {"prefix": "e Illuminate\\Notifications\\Notification;\nuse Illuminate\\Support\\Facades\\Lang;\n\nclass ResetPassword extends Notification\n{\n /**\n * The password reset token.\n *\n * @var string\n */\n public $token;\n\n /**\n * The callback that should be used to create the reset password URL.\n *\n * @var (\\Closure(mixed, string): string)|null\n */\n public static $createUrlCallback;\n\n /**\n * The callback that should be used to build the mail message.\n *\n * @var (\\Closure(mixe", "suffix": " */\n public function __construct(#[\\SensitiveParameter] $token)\n {\n $this->token = $token;\n }\n\n /**\n * Get the notification's channels.\n *\n * @param mixed $notifiable\n * @return array|string\n */\n public funct", "middle": "d, string): \\Illuminate\\Notifications\\Messages\\MailMessage|\\Illuminate\\Contracts\\Mail\\Mailable)|null\n */\n public static $toMailCallback;\n\n /**\n * Create a notification instance.\n *\n * @param string $token\n", "meta": {"filepath": "src/Illuminate/Auth/Notifications/ResetPassword.php", "language": "php", "file_size": 3565, "cut_index": 614, "middle_length": 229}} {"prefix": "r string\n */\n protected $key;\n\n /**\n * The previous / legacy encryption keys.\n *\n * @var array\n */\n protected $previousKeys = [];\n\n /**\n * The algorithm used for encryption.\n *\n * @var string\n */\n protected $cipher;\n\n /**\n * The supported cipher algorithms and their properties.\n *\n * @var array\n */\n private static $supportedCiphers = [\n 'aes-128-cbc' => ['size' => 16, 'aead' => false],\n 'aes-256-cbc' => ['size' => 32, 'ae", "suffix": "aram string $cipher\n *\n * @throws \\RuntimeException\n */\n public function __construct($key, $cipher = 'aes-128-cbc')\n {\n $key = (string) $key;\n\n if (! static::supported($key, $cipher)) {\n $ciphers = implode(', ',", "middle": "ad' => false],\n 'aes-128-gcm' => ['size' => 16, 'aead' => true],\n 'aes-256-gcm' => ['size' => 32, 'aead' => true],\n ];\n\n /**\n * Create a new encrypter instance.\n *\n * @param string $key\n * @p", "meta": {"filepath": "src/Illuminate/Encryption/Encrypter.php", "language": "php", "file_size": 11347, "cut_index": 921, "middle_length": 229}} {"prefix": "Illuminate\\Contracts\\Support\\Arrayable;\nuse Illuminate\\Foundation\\Events\\Dispatchable;\nuse Illuminate\\Support\\Arr;\nuse Illuminate\\Support\\Collection;\n\nclass AnonymousEvent implements ShouldBroadcast\n{\n use Dispatchable, InteractsWithBroadcasting, InteractsWithSockets;\n\n /**\n * The connection the event should be broadcast on.\n */\n protected ?string $connection = null;\n\n /**\n * The name the event should be broadcast as.\n */\n protected ?string $name = null;\n\n /**\n * The pa", "suffix": "if the event should be broadcast synchronously.\n */\n protected bool $shouldBroadcastNow = false;\n\n /**\n * Create a new anonymous broadcastable event instance.\n */\n public function __construct(protected Channel|array|string $channels)\n ", "middle": "yload the event should be broadcast with.\n */\n protected array $payload = [];\n\n /**\n * Should the broadcast include the current user.\n */\n protected bool $includeCurrentUser = true;\n\n /**\n * Indicates ", "meta": {"filepath": "src/Illuminate/Broadcasting/AnonymousEvent.php", "language": "php", "file_size": 3376, "cut_index": 614, "middle_length": 229}} {"prefix": "\nnamespace Illuminate\\Broadcasting;\n\nuse Illuminate\\Http\\Request;\nuse Illuminate\\Routing\\Controller;\nuse Illuminate\\Support\\Facades\\Broadcast;\nuse Symfony\\Component\\HttpKernel\\Exception\\AccessDeniedHttpException;\n\nclass BroadcastController extends Controller\n{\n /**\n * Authenticate the request for channel access.\n *\n * @param \\Illuminate\\Http\\Request $request\n * @return \\Illuminate\\Http\\Response\n */\n public function authenticate(Request $request)\n {\n if ($request->hasSes", "suffix": "ticating-users/#user-authentication.\n *\n * @param \\Illuminate\\Http\\Request $request\n * @return array|null\n *\n * @throws \\Symfony\\Component\\HttpKernel\\Exception\\AccessDeniedHttpException\n */\n public function authenticateUser(Req", "middle": "sion()) {\n $request->session()->reflash();\n }\n\n return Broadcast::auth($request);\n }\n\n /**\n * Authenticate the current user.\n *\n * See: https://pusher.com/docs/channels/server_api/authen", "meta": {"filepath": "src/Illuminate/Broadcasting/BroadcastController.php", "language": "php", "file_size": 1238, "cut_index": 518, "middle_length": 229}} {"prefix": "\nnamespace Illuminate\\Broadcasting;\n\nuse Illuminate\\Contracts\\Broadcasting\\Broadcaster as BroadcasterContract;\nuse Illuminate\\Contracts\\Broadcasting\\Factory as BroadcastingFactory;\nuse Illuminate\\Contracts\\Support\\DeferrableProvider;\nuse Illuminate\\Support\\ServiceProvider;\n\nclass BroadcastServiceProvider extends ServiceProvider implements DeferrableProvider\n{\n /**\n * Register the service provider.\n *\n * @return void\n */\n public function register()\n {\n $this->app->singleton(Br", "suffix": " $this->app->alias(\n BroadcastManager::class, BroadcastingFactory::class\n );\n }\n\n /**\n * Get the services provided by the provider.\n *\n * @return array\n */\n public function provides()\n {\n return [\n ", "middle": "oadcastManager::class, fn ($app) => new BroadcastManager($app));\n\n $this->app->singleton(BroadcasterContract::class, function ($app) {\n return $app->make(BroadcastManager::class)->connection();\n });\n\n ", "meta": {"filepath": "src/Illuminate/Broadcasting/BroadcastServiceProvider.php", "language": "php", "file_size": 1136, "cut_index": 518, "middle_length": 229}} {"prefix": "racts\\Cache\\Repository as Cache;\nuse Illuminate\\Support\\InteractsWithTime;\n\nclass WithoutOverlapping\n{\n use InteractsWithTime;\n\n /**\n * The job's unique key used for preventing overlaps.\n *\n * @var string\n */\n public $key;\n\n /**\n * The number of seconds before a job should be available again if no lock was acquired.\n *\n * @var \\DateTimeInterface|int|null\n */\n public $releaseAfter;\n\n /**\n * The number of seconds before the lock should expire.\n *\n ", "suffix": "\n * @var bool\n */\n public $shareKey = false;\n\n /**\n * Create a new middleware instance.\n *\n * @param string $key\n * @param \\DateTimeInterface|int|null $releaseAfter\n * @param \\DateTimeInterface|int $expiresAfter\n ", "middle": "* @var int\n */\n public $expiresAfter;\n\n /**\n * The prefix of the lock key.\n *\n * @var string\n */\n public $prefix = 'laravel-queue-overlap:';\n\n /**\n * Share the key across different jobs.\n *", "meta": {"filepath": "src/Illuminate/Queue/Middleware/WithoutOverlapping.php", "language": "php", "file_size": 3684, "cut_index": 614, "middle_length": 229}} {"prefix": "te\\Broadcasting;\n\nuse Illuminate\\Contracts\\Events\\Dispatcher;\n\nuse function Illuminate\\Support\\enum_value;\n\nclass PendingBroadcast\n{\n /**\n * The event dispatcher implementation.\n *\n * @var \\Illuminate\\Contracts\\Events\\Dispatcher\n */\n protected $events;\n\n /**\n * The event instance.\n *\n * @var mixed\n */\n protected $event;\n\n /**\n * Create a new pending broadcast instance.\n *\n * @param \\Illuminate\\Contracts\\Events\\Dispatcher $events\n * @param mix", "suffix": " * @param \\UnitEnum|string|null $connection\n * @return $this\n */\n public function via($connection = null)\n {\n if (method_exists($this->event, 'broadcastVia')) {\n $this->event->broadcastVia(enum_value($connection));\n ", "middle": "ed $event\n */\n public function __construct(Dispatcher $events, $event)\n {\n $this->event = $event;\n $this->events = $events;\n }\n\n /**\n * Broadcast the event using a specific broadcaster.\n *\n ", "meta": {"filepath": "src/Illuminate/Broadcasting/PendingBroadcast.php", "language": "php", "file_size": 1549, "cut_index": 537, "middle_length": 229}} {"prefix": "luminate\\Support\\Str;\nuse Symfony\\Component\\HttpKernel\\Exception\\AccessDeniedHttpException;\n\n/**\n * @author Matthew Hall (matthall28@gmail.com)\n * @author Taylor Otwell (taylor@laravel.com)\n */\nclass AblyBroadcaster extends Broadcaster\n{\n /**\n * The AblyRest SDK instance.\n *\n * @var \\Ably\\AblyRest\n */\n protected $ably;\n\n /**\n * Create a new broadcaster instance.\n *\n * @param \\Ably\\AblyRest $ably\n */\n public function __construct(AblyRest $ably)\n {\n $thi", "suffix": "tion\\AccessDeniedHttpException\n */\n public function auth($request)\n {\n $channelName = $this->normalizeChannelName($request->channel_name);\n\n if (empty($request->channel_name) ||\n ($this->isGuardedChannel($request->channel", "middle": "s->ably = $ably;\n }\n\n /**\n * Authenticate the incoming request for a given channel.\n *\n * @param \\Illuminate\\Http\\Request $request\n * @return mixed\n *\n * @throws \\Symfony\\Component\\HttpKernel\\Excep", "meta": {"filepath": "src/Illuminate/Broadcasting/Broadcasters/AblyBroadcaster.php", "language": "php", "file_size": 6633, "cut_index": 716, "middle_length": 229}} {"prefix": "hp\n\nnamespace Illuminate\\Broadcasting\\Broadcasters;\n\nuse Psr\\Log\\LoggerInterface;\n\nclass LogBroadcaster extends Broadcaster\n{\n /**\n * The logger implementation.\n *\n * @var \\Psr\\Log\\LoggerInterface\n */\n protected $logger;\n\n /**\n * Create a new broadcaster instance.\n *\n * @param \\Psr\\Log\\LoggerInterface $logger\n */\n public function __construct(LoggerInterface $logger)\n {\n $this->logger = $logger;\n }\n\n /**\n * {@inheritdoc}\n */\n public fun", "suffix": " broadcast(array $channels, $event, array $payload = [])\n {\n $channels = implode(', ', $this->formatChannels($channels));\n\n $payload = json_encode($payload, JSON_PRETTY_PRINT);\n\n $this->logger->info('Broadcasting ['.$event.'] on cha", "middle": "ction auth($request)\n {\n //\n }\n\n /**\n * {@inheritdoc}\n */\n public function validAuthenticationResponse($request, $result)\n {\n //\n }\n\n /**\n * {@inheritdoc}\n */\n public function", "meta": {"filepath": "src/Illuminate/Broadcasting/Broadcasters/LogBroadcaster.php", "language": "php", "file_size": 1064, "cut_index": 515, "middle_length": 229}} {"prefix": "nection;\nuse Illuminate\\Redis\\Connections\\PredisClusterConnection;\nuse Illuminate\\Redis\\Connections\\PredisConnection;\nuse Illuminate\\Support\\Arr;\nuse Predis\\Connection\\Cluster\\RedisCluster;\nuse Predis\\Connection\\ConnectionException;\nuse RedisException;\nuse Symfony\\Component\\HttpKernel\\Exception\\AccessDeniedHttpException;\n\nclass RedisBroadcaster extends Broadcaster\n{\n use UsePusherChannelConventions;\n\n /**\n * The Redis instance.\n *\n * @var \\Illuminate\\Contracts\\Redis\\Factory\n */\n pro", "suffix": "tected $prefix = '';\n\n /**\n * Create a new broadcaster instance.\n *\n * @param \\Illuminate\\Contracts\\Redis\\Factory $redis\n * @param string|null $connection\n * @param string $prefix\n */\n public function __construct(Redis $", "middle": "tected $redis;\n\n /**\n * The Redis connection to use for broadcasting.\n *\n * @var string|null\n */\n protected $connection = null;\n\n /**\n * The Redis key prefix.\n *\n * @var string\n */\n pro", "meta": {"filepath": "src/Illuminate/Broadcasting/Broadcasters/RedisBroadcaster.php", "language": "php", "file_size": 5533, "cut_index": 716, "middle_length": 229}} {"prefix": "te\\Validation;\n\nuse Illuminate\\Contracts\\Validation\\Rule as RuleContract;\nuse Illuminate\\Contracts\\Validation\\ValidatorAwareRule;\nuse Illuminate\\Translation\\CreatesPotentiallyTranslatedStrings;\n\nclass ClosureValidationRule implements RuleContract, ValidatorAwareRule\n{\n use CreatesPotentiallyTranslatedStrings;\n\n /**\n * The callback that validates the attribute.\n *\n * @var \\Closure\n */\n public $callback;\n\n /**\n * Indicates if the validation callback failed.\n *\n * @var b", "suffix": "alidator\n */\n protected $validator;\n\n /**\n * Create a new Closure based validation rule.\n *\n * @param \\Closure $callback\n */\n public function __construct($callback)\n {\n $this->callback = $callback;\n }\n\n /**\n ", "middle": "ool\n */\n public $failed = false;\n\n /**\n * The validation error messages.\n *\n * @var array\n */\n public $messages = [];\n\n /**\n * The current validator.\n *\n * @var \\Illuminate\\Validation\\V", "meta": {"filepath": "src/Illuminate/Validation/ClosureValidationRule.php", "language": "php", "file_size": 1955, "cut_index": 537, "middle_length": 229}} {"prefix": "ace;\n\nclass DatabasePresenceVerifier implements DatabasePresenceVerifierInterface\n{\n /**\n * The database connection instance.\n *\n * @var \\Illuminate\\Database\\ConnectionResolverInterface\n */\n protected $db;\n\n /**\n * The database connection to use.\n *\n * @var string\n */\n protected $connection;\n\n /**\n * Create a new database presence verifier.\n *\n * @param \\Illuminate\\Database\\ConnectionResolverInterface $db\n */\n public function __construct(Co", "suffix": " * @param string $value\n * @param int|null $excludeId\n * @param string|null $idColumn\n * @param array $extra\n * @return int\n */\n public function getCount($collection, $column, $value, $excludeId = null, $idColumn = null, arra", "middle": "nnectionResolverInterface $db)\n {\n $this->db = $db;\n }\n\n /**\n * Count the number of objects in a collection having the given value.\n *\n * @param string $collection\n * @param string $column\n ", "meta": {"filepath": "src/Illuminate/Validation/DatabasePresenceVerifier.php", "language": "php", "file_size": 3664, "cut_index": 614, "middle_length": 229}} {"prefix": ";\nuse Illuminate\\Contracts\\Auth\\Factory as Auth;\nuse Illuminate\\Contracts\\Auth\\Middleware\\AuthenticatesRequests;\nuse Illuminate\\Http\\Request;\n\nclass Authenticate implements AuthenticatesRequests\n{\n /**\n * The authentication factory instance.\n *\n * @var \\Illuminate\\Contracts\\Auth\\Factory\n */\n protected $auth;\n\n /**\n * The callback that should be used to generate the authentication redirect path.\n *\n * @var callable\n */\n protected static $redirectToCallback;\n\n /*", "suffix": "uards for the middleware.\n *\n * @param string $guard\n * @param string $others\n * @return string\n */\n public static function using($guard, ...$others)\n {\n return static::class.':'.implode(',', [$guard, ...$others]);\n ", "middle": "*\n * Create a new middleware instance.\n *\n * @param \\Illuminate\\Contracts\\Auth\\Factory $auth\n */\n public function __construct(Auth $auth)\n {\n $this->auth = $auth;\n }\n\n /**\n * Specify the g", "meta": {"filepath": "src/Illuminate/Auth/Middleware/Authenticate.php", "language": "php", "file_size": 3315, "cut_index": 614, "middle_length": 229}} {"prefix": "\nnamespace Illuminate\\Auth\\Middleware;\n\nuse Closure;\nuse Illuminate\\Contracts\\Auth\\MustVerifyEmail;\nuse Illuminate\\Support\\Facades\\Redirect;\nuse Illuminate\\Support\\Facades\\URL;\n\nclass EnsureEmailIsVerified\n{\n /**\n * Specify the redirect route for the middleware.\n *\n * @param string $route\n * @return string\n */\n public static function redirectTo($route)\n {\n return static::class.':'.$route;\n }\n\n /**\n * Handle an incoming request.\n *\n * @param \\Illuminat", "suffix": "sure $next, $redirectToRoute = null)\n {\n if (! $request->user() ||\n ($request->user() instanceof MustVerifyEmail &&\n ! $request->user()->hasVerifiedEmail())) {\n return $request->expectsJson()\n ? abo", "middle": "e\\Http\\Request $request\n * @param \\Closure $next\n * @param string|null $redirectToRoute\n * @return \\Illuminate\\Http\\Response|\\Illuminate\\Http\\RedirectResponse|null\n */\n public function handle($request, Clo", "meta": {"filepath": "src/Illuminate/Auth/Middleware/EnsureEmailIsVerified.php", "language": "php", "file_size": 1191, "cut_index": 518, "middle_length": 229}} {"prefix": "losure;\nuse Illuminate\\Contracts\\Routing\\ResponseFactory;\nuse Illuminate\\Contracts\\Routing\\UrlGenerator;\nuse Illuminate\\Support\\Facades\\Date;\n\nclass RequirePassword\n{\n /**\n * The response factory instance.\n *\n * @var \\Illuminate\\Contracts\\Routing\\ResponseFactory\n */\n protected $responseFactory;\n\n /**\n * The URL generator instance.\n *\n * @var \\Illuminate\\Contracts\\Routing\\UrlGenerator\n */\n protected $urlGenerator;\n\n /**\n * The password timeout.\n *\n *", "suffix": "g\\UrlGenerator $urlGenerator\n * @param int|null $passwordTimeout\n */\n public function __construct(ResponseFactory $responseFactory, UrlGenerator $urlGenerator, $passwordTimeout = null)\n {\n $this->responseFactory = $responseFactory;\n", "middle": " @var int\n */\n protected $passwordTimeout;\n\n /**\n * Create a new middleware instance.\n *\n * @param \\Illuminate\\Contracts\\Routing\\ResponseFactory $responseFactory\n * @param \\Illuminate\\Contracts\\Routin", "meta": {"filepath": "src/Illuminate/Auth/Middleware/RequirePassword.php", "language": "php", "file_size": 2935, "cut_index": 563, "middle_length": 229}} {"prefix": "ntracts\\Support\\Arrayable;\nuse Illuminate\\Queue\\Attributes\\Backoff;\nuse Illuminate\\Queue\\Attributes\\DeleteWhenMissingModels;\nuse Illuminate\\Queue\\Attributes\\MaxExceptions;\nuse Illuminate\\Queue\\Attributes\\ReadsQueueAttributes;\nuse Illuminate\\Queue\\Attributes\\Timeout;\nuse Illuminate\\Queue\\Attributes\\Tries;\nuse Illuminate\\Support\\Arr;\nuse ReflectionClass;\nuse ReflectionProperty;\nuse Throwable;\n\nclass BroadcastEvent implements ShouldQueue\n{\n use Queueable, ReadsQueueAttributes;\n\n /**\n * The event inst", "suffix": "e timing out.\n *\n * @var int\n */\n public $timeout;\n\n /**\n * The number of seconds to wait before retrying the job when encountering an uncaught exception.\n *\n * @var int\n */\n public $backoff;\n\n /**\n * The maximum", "middle": "ance.\n *\n * @var mixed\n */\n public $event;\n\n /**\n * The number of times the job may be attempted.\n *\n * @var int\n */\n public $tries;\n\n /**\n * The number of seconds the job can run befor", "meta": {"filepath": "src/Illuminate/Broadcasting/BroadcastEvent.php", "language": "php", "file_size": 6051, "cut_index": 716, "middle_length": 229}} {"prefix": "e\\Support\\enum_value;\n\ntrait InteractsWithBroadcasting\n{\n /**\n * The broadcaster connection to use to broadcast the event.\n *\n * @var array\n */\n protected $broadcastConnection = [null];\n\n /**\n * Broadcast the event using a specific broadcaster.\n *\n * @param \\UnitEnum|array|string|null $connection\n * @return $this\n */\n public function broadcastVia($connection = null)\n {\n $connection = enum_value($connection);\n\n $this->broadcastConnection = is", "suffix": ": Arr::wrap($connection);\n\n return $this;\n }\n\n /**\n * Get the broadcaster connections the event should be broadcast on.\n *\n * @return array\n */\n public function broadcastConnections()\n {\n return $this->broadcastCon", "middle": "_null($connection)\n ? [null]\n ", "meta": {"filepath": "src/Illuminate/Broadcasting/InteractsWithBroadcasting.php", "language": "php", "file_size": 931, "cut_index": 606, "middle_length": 52}} {"prefix": "pace Illuminate\\Broadcasting;\n\nuse Illuminate\\Container\\Container;\nuse Illuminate\\Contracts\\Cache\\Repository;\nuse Illuminate\\Contracts\\Queue\\ShouldBeUnique;\n\nclass UniqueBroadcastEvent extends BroadcastEvent implements ShouldBeUnique\n{\n /**\n * The unique lock identifier.\n *\n * @var mixed\n */\n public $uniqueId;\n\n /**\n * The number of seconds the unique lock should be maintained.\n *\n * @var int\n */\n public $uniqueFor;\n\n /**\n * Create a new event instance.\n ", "suffix": "'uniqueId')) {\n $this->uniqueId .= $event->uniqueId;\n }\n\n if (method_exists($event, 'uniqueFor')) {\n $this->uniqueFor = $event->uniqueFor();\n } elseif (property_exists($event, 'uniqueFor')) {\n $this->un", "middle": " *\n * @param mixed $event\n */\n public function __construct($event)\n {\n if (method_exists($event, 'uniqueId')) {\n $this->uniqueId .= $event->uniqueId();\n } elseif (property_exists($event, ", "meta": {"filepath": "src/Illuminate/Broadcasting/UniqueBroadcastEvent.php", "language": "php", "file_size": 1460, "cut_index": 524, "middle_length": 229}} {"prefix": "her\\Pusher;\nuse Symfony\\Component\\HttpKernel\\Exception\\AccessDeniedHttpException;\n\nclass PusherBroadcaster extends Broadcaster\n{\n use UsePusherChannelConventions;\n\n /**\n * The Pusher SDK instance.\n *\n * @var \\Pusher\\Pusher\n */\n protected $pusher;\n\n /**\n * Indicates if JSONP callbacks are allowed on authorization.\n *\n * @var bool\n */\n protected $allowJsonp = false;\n\n /**\n * Create a new broadcaster instance.\n *\n * @param \\Pusher\\Pusher $pusher\n ", "suffix": "incoming connection request.\n *\n * See: https://pusher.com/docs/channels/library_auth_reference/auth-signatures/#user-authentication\n * See: https://pusher.com/docs/channels/server_api/authenticating-users/#response\n *\n * @param \\Illum", "middle": " */\n public function __construct(Pusher $pusher, bool $allowJsonp = false)\n {\n $this->pusher = $pusher;\n $this->allowJsonp = $allowJsonp;\n }\n\n /**\n * Resolve the authenticated user payload for an ", "meta": {"filepath": "src/Illuminate/Broadcasting/Broadcasters/PusherBroadcaster.php", "language": "php", "file_size": 5846, "cut_index": 716, "middle_length": 229}} {"prefix": "nate\\Support\\Fluent;\n\nclass ConditionalRules\n{\n /**\n * The boolean condition indicating if the rules should be added to the attribute.\n *\n * @var callable|bool\n */\n protected $condition;\n\n /**\n * The rules to be added to the attribute.\n *\n * @var \\Illuminate\\Contracts\\Validation\\ValidationRule|\\Illuminate\\Contracts\\Validation\\InvokableRule|\\Illuminate\\Contracts\\Validation\\Rule|\\Closure|array|string\n */\n protected $rules;\n\n /**\n * The rules to be added to th", "suffix": "ed $defaultRules;\n\n /**\n * Create a new conditional rules instance.\n *\n * @param callable|bool $condition\n * @param \\Illuminate\\Contracts\\Validation\\ValidationRule|\\Illuminate\\Contracts\\Validation\\InvokableRule|\\Illuminate\\Contracts\\V", "middle": "e attribute if the condition fails.\n *\n * @var \\Illuminate\\Contracts\\Validation\\ValidationRule|\\Illuminate\\Contracts\\Validation\\InvokableRule|\\Illuminate\\Contracts\\Validation\\Rule|\\Closure|array|string\n */\n protect", "meta": {"filepath": "src/Illuminate/Validation/ConditionalRules.php", "language": "php", "file_size": 2424, "cut_index": 563, "middle_length": 229}} {"prefix": "pace Illuminate\\Auth\\Middleware;\n\nuse Closure;\nuse Illuminate\\Contracts\\Auth\\Factory as AuthFactory;\n\nclass AuthenticateWithBasicAuth\n{\n /**\n * The guard factory instance.\n *\n * @var \\Illuminate\\Contracts\\Auth\\Factory\n */\n protected $auth;\n\n /**\n * Create a new middleware instance.\n *\n * @param \\Illuminate\\Contracts\\Auth\\Factory $auth\n */\n public function __construct(AuthFactory $auth)\n {\n $this->auth = $auth;\n }\n\n /**\n * Specify the guard an", "suffix": "d = null)\n {\n return static::class.':'.implode(',', func_get_args());\n }\n\n /**\n * Handle an incoming request.\n *\n * @param \\Illuminate\\Http\\Request $request\n * @param \\Closure $next\n * @param string|null $guard\n ", "middle": "d field for the middleware.\n *\n * @param string|null $guard\n * @param string|null $field\n * @return string\n *\n * @named-arguments-supported\n */\n public static function using($guard = null, $fiel", "meta": {"filepath": "src/Illuminate/Auth/Middleware/AuthenticateWithBasicAuth.php", "language": "php", "file_size": 1349, "cut_index": 524, "middle_length": 229}} {"prefix": "e Illuminate\\Notifications\\Notification;\nuse Illuminate\\Support\\Carbon;\nuse Illuminate\\Support\\Facades\\Config;\nuse Illuminate\\Support\\Facades\\Lang;\nuse Illuminate\\Support\\Facades\\URL;\n\nclass VerifyEmail extends Notification\n{\n /**\n * The callback that should be used to create the verify email URL.\n *\n * @var \\Closure|null\n */\n public static $createUrlCallback;\n\n /**\n * The callback that should be used to build the mail message.\n *\n * @var (\\Closure(mixed, string): \\Illum", "suffix": "n array|string\n */\n public function via($notifiable)\n {\n return ['mail'];\n }\n\n /**\n * Build the mail representation of the notification.\n *\n * @param mixed $notifiable\n * @return \\Illuminate\\Notifications\\Messages\\M", "middle": "inate\\Notifications\\Messages\\MailMessage|\\Illuminate\\Contracts\\Mail\\Mailable)|null\n */\n public static $toMailCallback;\n\n /**\n * Get the notification's channels.\n *\n * @param mixed $notifiable\n * @retur", "meta": {"filepath": "src/Illuminate/Auth/Notifications/VerifyEmail.php", "language": "php", "file_size": 3330, "cut_index": 614, "middle_length": 229}} {"prefix": " Illuminate\\Bus\\UniqueLock;\nuse Illuminate\\Contracts\\Broadcasting\\Factory as FactoryContract;\nuse Illuminate\\Contracts\\Broadcasting\\ShouldBeUnique;\nuse Illuminate\\Contracts\\Broadcasting\\ShouldBroadcastNow;\nuse Illuminate\\Contracts\\Broadcasting\\ShouldRescue;\nuse Illuminate\\Contracts\\Bus\\Dispatcher as BusDispatcherContract;\nuse Illuminate\\Contracts\\Cache\\Repository as Cache;\nuse Illuminate\\Contracts\\Foundation\\CachesRoutes;\nuse Illuminate\\Queue\\Attributes\\Connection as ConnectionAttribute;\nuse Illuminate\\Queu", "suffix": "se Psr\\Log\\LoggerInterface;\nuse Pusher\\Pusher;\nuse ReflectionException;\nuse RuntimeException;\nuse Throwable;\n\nuse function Illuminate\\Support\\enum_value;\n\n/**\n * @mixin \\Illuminate\\Contracts\\Broadcasting\\Broadcaster\n */\nclass BroadcastManager implements Fa", "middle": "e\\Attributes\\Queue as QueueAttribute;\nuse Illuminate\\Queue\\Attributes\\ReadsQueueAttributes;\nuse Illuminate\\Support\\Queue\\Concerns\\ResolvesQueueRoutes;\nuse Illuminate\\Support\\RebindsCallbacksToSelf;\nuse InvalidArgumentException;\nu", "meta": {"filepath": "src/Illuminate/Broadcasting/BroadcastManager.php", "language": "php", "file_size": 15753, "cut_index": 921, "middle_length": 229}} {"prefix": "on;\nuse Illuminate\\Support\\Reflector;\nuse ReflectionClass;\nuse ReflectionFunction;\nuse Symfony\\Component\\HttpKernel\\Exception\\AccessDeniedHttpException;\n\nabstract class Broadcaster implements BroadcasterContract\n{\n /**\n * The callback to resolve the authenticated user information.\n *\n * @var \\Closure|null\n */\n protected $authenticatedUserCallback = null;\n\n /**\n * The registered channel authenticators.\n *\n * @var array\n */\n protected $channels = [];\n\n /**\n *", "suffix": "rotected $bindingRegistrar;\n\n /**\n * Resolve the authenticated user payload for the incoming connection request.\n *\n * See: https://pusher.com/docs/channels/library_auth_reference/auth-signatures/#user-authentication.\n *\n * @param \\", "middle": " The registered channel options.\n *\n * @var array\n */\n protected $channelOptions = [];\n\n /**\n * The binding registrar instance.\n *\n * @var \\Illuminate\\Contracts\\Routing\\BindingRegistrar\n */\n p", "meta": {"filepath": "src/Illuminate/Broadcasting/Broadcasters/Broadcaster.php", "language": "php", "file_size": 11133, "cut_index": 921, "middle_length": 229}} {"prefix": "nate\\Support\\ServiceProvider;\nuse Illuminate\\Support\\Str;\nuse Laravel\\SerializableClosure\\SerializableClosure;\n\nclass EncryptionServiceProvider extends ServiceProvider\n{\n /**\n * Register the service provider.\n *\n * @return void\n */\n public function register()\n {\n $this->registerEncrypter();\n $this->registerSerializableClosureSecurityKey();\n }\n\n /**\n * Register the encrypter.\n *\n * @return void\n */\n protected function registerEncrypter()\n {\n ", "suffix": "rray_map(\n fn ($key) => $this->parseKey(['key' => $key]),\n $config['previous_keys'] ?? []\n ));\n });\n }\n\n /**\n * Configure Serializable Closure signing for security.\n *\n * @return", "middle": " $this->app->singleton('encrypter', function ($app) {\n $config = $app->make('config')->get('app');\n\n return (new Encrypter($this->parseKey($config), $config['cipher']))\n ->previousKeys(a", "meta": {"filepath": "src/Illuminate/Encryption/EncryptionServiceProvider.php", "language": "php", "file_size": 2145, "cut_index": 563, "middle_length": 229}} {"prefix": "?php\n\nnamespace Illuminate\\Broadcasting\\Broadcasters;\n\nuse Illuminate\\Support\\Str;\n\ntrait UsePusherChannelConventions\n{\n /**\n * Return true if the channel is protected by authentication.\n *\n * @param string $channel\n * @return bool\n */\n public function isGuardedChannel($channel)\n {\n return Str::startsWith($channel, ['private-', 'presence-']);\n }\n\n /**\n * Remove prefix from channel name.\n *\n * @param string $channel\n * @return string\n */\n p", "suffix": " foreach (['private-encrypted-', 'private-', 'presence-'] as $prefix) {\n if (Str::startsWith($channel, $prefix)) {\n return Str::replaceFirst($prefix, '', $channel);\n }\n }\n\n return $channel;\n }\n}\n", "middle": "ublic function normalizeChannelName($channel)\n {\n", "meta": {"filepath": "src/Illuminate/Broadcasting/Broadcasters/UsePusherChannelConventions.php", "language": "php", "file_size": 821, "cut_index": 513, "middle_length": 52}} {"prefix": " protected $userResolver;\n\n /**\n * All of the defined abilities.\n *\n * @var array\n */\n protected $abilities = [];\n\n /**\n * All of the defined policies.\n *\n * @var array\n */\n protected $policies = [];\n\n /**\n * All of the registered before callbacks.\n *\n * @var array\n */\n protected $beforeCallbacks = [];\n\n /**\n * All of the registered after callbacks.\n *\n * @var array\n */\n protected $afterCallbacks = [];\n\n /**\n * A", "suffix": "h\\Access\\Response|null\n */\n protected $defaultDenialResponse;\n\n /**\n * The callback to be used to guess policy names.\n *\n * @var callable|null\n */\n protected $guessPolicyNamesUsingCallback;\n\n /**\n * Create a new gate ins", "middle": "ll of the defined abilities using class@method notation.\n *\n * @var array\n */\n protected $stringCallbacks = [];\n\n /**\n * The default denial response for gates and policies.\n *\n * @var \\Illuminate\\Aut", "meta": {"filepath": "src/Illuminate/Auth/Access/Gate.php", "language": "php", "file_size": 26962, "cut_index": 1331, "middle_length": 229}} {"prefix": "te\\Cache;\n\nclass DynamoDbLock extends Lock\n{\n /**\n * The DynamoDB client instance.\n *\n * @var \\Illuminate\\Cache\\DynamoDbStore\n */\n protected $dynamo;\n\n /**\n * Create a new lock instance.\n *\n * @param \\Illuminate\\Cache\\DynamoDbStore $dynamo\n * @param string $name\n * @param int $seconds\n * @param string|null $owner\n */\n public function __construct(DynamoDbStore $dynamo, $name, $seconds, $owner = null)\n {\n parent::__construct($name, $sec", "suffix": "->dynamo->add($this->name, $this->owner, $this->seconds);\n }\n\n return $this->dynamo->add($this->name, $this->owner, 86400);\n }\n\n /**\n * Release the lock.\n *\n * @return bool\n */\n public function release()\n {\n ", "middle": "onds, $owner);\n\n $this->dynamo = $dynamo;\n }\n\n /**\n * Attempt to acquire the lock.\n *\n * @return bool\n */\n public function acquire()\n {\n if ($this->seconds > 0) {\n return $this", "meta": {"filepath": "src/Illuminate/Cache/DynamoDbLock.php", "language": "php", "file_size": 1562, "cut_index": 537, "middle_length": 229}} {"prefix": "e\\Support\\Carbon;\nuse Illuminate\\Support\\LazyCollection;\n\nclass RedisTagSet extends TagSet\n{\n /**\n * Add a reference entry to the tag set's underlying sorted set.\n *\n * @param string $key\n * @param int|null $ttl\n * @param string|null $updateWhen\n * @return void\n */\n public function addEntry(string $key, ?int $ttl = null, $updateWhen = null)\n {\n $ttl = is_null($ttl) ? -1 : Carbon::now()->addSeconds($ttl)->getTimestamp();\n\n foreach ($this->tagIds() as $", "suffix": "tore->getPrefix().$tagKey, $ttl, $key);\n }\n }\n }\n\n /**\n * Get all of the cache entry keys for the tag set.\n *\n * @return \\Illuminate\\Support\\LazyCollection\n */\n public function entries()\n {\n $connection ", "middle": "tagKey) {\n if ($updateWhen) {\n $this->store->connection()->zadd($this->store->getPrefix().$tagKey, $updateWhen, $ttl, $key);\n } else {\n $this->store->connection()->zadd($this->s", "meta": {"filepath": "src/Illuminate/Cache/RedisTagSet.php", "language": "php", "file_size": 3910, "cut_index": 614, "middle_length": 229}} {"prefix": "nnections\\PhpRedisConnection;\nuse Illuminate\\Redis\\Connections\\PredisClusterConnection;\nuse Illuminate\\Redis\\Connections\\PredisConnection;\n\nuse function Illuminate\\Support\\enum_value;\n\nclass RedisTaggedCache extends TaggedCache\n{\n /**\n * Store an item in the cache if the key does not exist.\n *\n * @param \\UnitEnum|string $key\n * @param mixed $value\n * @param \\DateTimeInterface|\\DateInterval|int|null $ttl\n * @return bool\n */\n public function add($key, $value, $ttl = nul", "suffix": " $this->itemKey($key),\n $seconds\n );\n }\n }\n\n return parent::add($key, $value, $ttl);\n }\n\n /**\n * Store an item in the cache.\n *\n * @param \\UnitEnum|string $key\n * @p", "middle": "l)\n {\n $key = enum_value($key);\n\n $seconds = null;\n\n if ($ttl !== null) {\n $seconds = $this->getSeconds($ttl);\n\n if ($seconds > 0) {\n $this->tags->addEntry(\n ", "meta": {"filepath": "src/Illuminate/Cache/RedisTaggedCache.php", "language": "php", "file_size": 5931, "cut_index": 716, "middle_length": 229}} {"prefix": "se Illuminate\\Cache\\Events\\WritingManyKeys;\nuse Illuminate\\Cache\\Limiters\\ConcurrencyLimiterBuilder;\nuse Illuminate\\Contracts\\Cache\\CanFlushLocks;\nuse Illuminate\\Contracts\\Cache\\LockProvider;\nuse Illuminate\\Contracts\\Cache\\Repository as CacheContract;\nuse Illuminate\\Contracts\\Cache\\Store;\nuse Illuminate\\Contracts\\Events\\Dispatcher;\nuse Illuminate\\Support\\Carbon;\nuse Illuminate\\Support\\Collection;\nuse Illuminate\\Support\\InteractsWithTime;\nuse Illuminate\\Support\\Traits\\Macroable;\nuse InvalidArgumentException;", "suffix": "le {\n __call as macroCall;\n }\n\n /**\n * The cache store implementation.\n *\n * @var \\Illuminate\\Contracts\\Cache\\Store\n */\n protected $store;\n\n /**\n * The event dispatcher implementation.\n *\n * @var \\Illuminate\\C", "middle": "\n\nuse function Illuminate\\Support\\defer;\nuse function Illuminate\\Support\\enum_value;\n\n/**\n * @mixin \\Illuminate\\Contracts\\Cache\\Store\n */\nclass Repository implements ArrayAccess, CacheContract\n{\n use InteractsWithTime, Macroab", "meta": {"filepath": "src/Illuminate/Cache/Repository.php", "language": "php", "file_size": 28327, "cut_index": 1331, "middle_length": 229}} {"prefix": "pace Illuminate\\Cache;\n\nuse Illuminate\\Support\\Collection;\n\ntrait RetrievesMultipleKeys\n{\n /**\n * Retrieve multiple items from the cache by key.\n *\n * Items not found in the cache will have a null value.\n *\n * @param array $keys\n * @return array\n */\n public function many(array $keys)\n {\n $return = [];\n\n $keys = (new Collection($keys))\n ->mapWithKeys(fn ($value, $key) => [is_string($key) ? $key : $value => is_string($key) ? $value : null])\n ", "suffix": "turn $return;\n }\n\n /**\n * Store multiple items in the cache for a given number of seconds.\n *\n * @param array $values\n * @param int $seconds\n * @return bool\n */\n public function putMany(array $values, $seconds)\n {\n ", "middle": " ->all();\n\n foreach ($keys as $key => $default) {\n /** @phpstan-ignore arguments.count (some clients don't accept a default) */\n $return[$key] = $this->get($key, $default);\n }\n\n re", "meta": {"filepath": "src/Illuminate/Cache/RetrievesMultipleKeys.php", "language": "php", "file_size": 1280, "cut_index": 524, "middle_length": 229}} {"prefix": "n;\nuse Illuminate\\Support\\InteractsWithTime;\n\nclass SessionStore implements Store\n{\n use InteractsWithTime, RetrievesMultipleKeys;\n\n /**\n * The key for cache items.\n *\n * @var string\n */\n public $key;\n\n /**\n * The session instance.\n *\n * @var \\Illuminate\\Contracts\\Session\\Session\n */\n public $session;\n\n /**\n * Create a new session cache store.\n *\n * @param \\Illuminate\\Contracts\\Session\\Session $session\n * @param string $key\n */\n pu", "suffix": "tring, array{value: mixed, expiresAt: float}>\n */\n public function all()\n {\n return $this->session->get($this->key, []);\n }\n\n /**\n * Retrieve an item from the cache by key.\n *\n * @param string $key\n * @return mixed\n", "middle": "blic function __construct($session, $key = '_cache')\n {\n $this->key = $key;\n $this->session = $session;\n }\n\n /**\n * Get all of the cached values and their expiration times.\n *\n * @return arraydisk =", "middle": "alization.\n *\n * @var array|bool|null\n */\n protected $serializableClasses;\n\n /**\n * Create a new storage cache store instance.\n *\n * @param \\Illuminate\\Contracts\\Filesystem\\Filesystem $disk\n * ", "meta": {"filepath": "src/Illuminate/Cache/StorageStore.php", "language": "php", "file_size": 7252, "cut_index": 716, "middle_length": 229}} {"prefix": "Contracts\\Cache\\Store;\n\nclass TagSet\n{\n /**\n * The cache store implementation.\n *\n * @var \\Illuminate\\Contracts\\Cache\\Store\n */\n protected $store;\n\n /**\n * The tag names.\n *\n * @var array\n */\n protected $names = [];\n\n /**\n * Create a new TagSet instance.\n *\n * @param \\Illuminate\\Contracts\\Cache\\Store $store\n * @param array $names\n */\n public function __construct(Store $store, array $names = [])\n {\n $this->store = $store;\n ", "suffix": " the tag and return the new tag identifier.\n *\n * @param string $name\n * @return string\n */\n public function resetTag($name)\n {\n $this->store->forever($this->tagKey($name), $id = str_replace('.', '', uniqid('', true)));\n\n ", "middle": " $this->names = $names;\n }\n\n /**\n * Reset all tags in the set.\n *\n * @return void\n */\n public function reset()\n {\n array_walk($this->names, $this->resetTag(...));\n }\n\n /**\n * Reset", "meta": {"filepath": "src/Illuminate/Cache/TagSet.php", "language": "php", "file_size": 2500, "cut_index": 563, "middle_length": 229}} {"prefix": "Cache\\Events\\CacheFlushed;\nuse Illuminate\\Cache\\Events\\CacheFlushing;\nuse Illuminate\\Contracts\\Cache\\Store;\n\nuse function Illuminate\\Support\\enum_value;\n\nclass TaggedCache extends Repository\n{\n use RetrievesMultipleKeys {\n putMany as putManyAlias;\n }\n\n /**\n * The tag set instance.\n *\n * @var \\Illuminate\\Cache\\TagSet\n */\n protected $tags;\n\n /**\n * Create a new tagged cache instance.\n *\n * @param \\Illuminate\\Contracts\\Cache\\Store $store\n * @param \\Illum", "suffix": "given number of seconds.\n *\n * @param array $values\n * @param int|null $ttl\n * @return bool\n */\n public function putMany(array $values, $ttl = null)\n {\n if ($ttl === null) {\n return $this->putManyForever($val", "middle": "inate\\Cache\\TagSet $tags\n */\n public function __construct(Store $store, TagSet $tags)\n {\n parent::__construct($store);\n\n $this->tags = $tags;\n }\n\n /**\n * Store multiple items in the cache for a ", "meta": {"filepath": "src/Illuminate/Cache/TaggedCache.php", "language": "php", "file_size": 2884, "cut_index": 563, "middle_length": 229}} {"prefix": " key.\n *\n * @var mixed\n */\n public $key;\n\n /**\n * The maximum number of attempts allowed within the given number of seconds.\n *\n * @var int\n */\n public $maxAttempts;\n\n /**\n * The number of seconds until the rate limit is reset.\n *\n * @var int\n */\n public $decaySeconds;\n\n /**\n * The after callback used to determine if the limiter should be hit.\n *\n * @var ?callable\n */\n public $afterCallback = null;\n\n /**\n * The response ", "suffix": "ds\n */\n public function __construct($key = '', int $maxAttempts = 60, int $decaySeconds = 60)\n {\n $this->key = $key;\n $this->maxAttempts = $maxAttempts;\n $this->decaySeconds = $decaySeconds;\n }\n\n /**\n * Create a new", "middle": "generator callback.\n *\n * @var callable\n */\n public $responseCallback;\n\n /**\n * Create a new limit instance.\n *\n * @param mixed $key\n * @param int $maxAttempts\n * @param int $decaySecon", "meta": {"filepath": "src/Illuminate/Cache/RateLimiting/Limit.php", "language": "php", "file_size": 3836, "cut_index": 614, "middle_length": 229}} {"prefix": "?php\n\nnamespace Illuminate\\Cache\\Console;\n\nuse Illuminate\\Console\\MigrationGeneratorCommand;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\n\n#[AsCommand(name: 'make:cache-table', aliases: ['cache:table'])]\nclass CacheTableCommand extends MigrationGeneratorCommand\n{\n /**\n * The console command name.\n *\n * @var string\n */\n protected $name = 'make:cache-table';\n\n /**\n * The console command name aliases.\n *\n * @var array\n */\n protected $aliases = ['cache:table'];\n", "suffix": "n string\n */\n protected function migrationTableName()\n {\n return 'cache';\n }\n\n /**\n * Get the path to the migration stub file.\n *\n * @return string\n */\n protected function migrationStubFile()\n {\n return _", "middle": "\n /**\n * The console command description.\n *\n * @var string\n */\n protected $description = 'Create a migration for the cache database table';\n\n /**\n * Get the migration table name.\n *\n * @retur", "meta": {"filepath": "src/Illuminate/Cache/Console/CacheTableCommand.php", "language": "php", "file_size": 1034, "cut_index": 513, "middle_length": 229}} {"prefix": "ger;\nuse Illuminate\\Console\\Command;\nuse Illuminate\\Filesystem\\Filesystem;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\nuse Symfony\\Component\\Console\\Input\\InputArgument;\nuse Symfony\\Component\\Console\\Input\\InputOption;\n\n#[AsCommand(name: 'cache:clear')]\nclass ClearCommand extends Command\n{\n /**\n * The console command name.\n *\n * @var string\n */\n protected $name = 'cache:clear';\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected $desc", "suffix": "uminate\\Filesystem\\Filesystem\n */\n protected $files;\n\n /**\n * Create a new cache clear command instance.\n *\n * @param \\Illuminate\\Cache\\CacheManager $cache\n * @param \\Illuminate\\Filesystem\\Filesystem $files\n */\n public ", "middle": "ription = 'Flush the application cache';\n\n /**\n * The cache manager instance.\n *\n * @var \\Illuminate\\Cache\\CacheManager\n */\n protected $cache;\n\n /**\n * The filesystem instance.\n *\n * @var \\Ill", "meta": {"filepath": "src/Illuminate/Cache/Console/ClearCommand.php", "language": "php", "file_size": 4543, "cut_index": 614, "middle_length": 229}} {"prefix": "pace Illuminate\\Cache\\Console;\n\nuse Illuminate\\Cache\\CacheManager;\nuse Illuminate\\Console\\Command;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\n\n#[AsCommand(name: 'cache:forget')]\nclass ForgetCommand extends Command\n{\n /**\n * The console command name.\n *\n * @var string\n */\n protected $signature = 'cache:forget {key : The key to remove} {store? : The store to remove the key from}';\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected $de", "suffix": " *\n * @param \\Illuminate\\Cache\\CacheManager $cache\n */\n public function __construct(CacheManager $cache)\n {\n parent::__construct();\n\n $this->cache = $cache;\n }\n\n /**\n * Execute the console command.\n *\n * @", "middle": "scription = 'Remove an item from the cache';\n\n /**\n * The cache manager instance.\n *\n * @var \\Illuminate\\Cache\\CacheManager\n */\n protected $cache;\n\n /**\n * Create a new cache clear command instance.\n ", "meta": {"filepath": "src/Illuminate/Cache/Console/ForgetCommand.php", "language": "php", "file_size": 1288, "cut_index": 524, "middle_length": 229}} {"prefix": "pace Illuminate\\Cache\\Console;\n\nuse Illuminate\\Cache\\CacheManager;\nuse Illuminate\\Console\\Command;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\nuse Symfony\\Component\\Console\\Input\\InputArgument;\n\n#[AsCommand(name: 'cache:prune-stale-tags')]\nclass PruneStaleTagsCommand extends Command\n{\n /**\n * The console command name.\n *\n * @var string\n */\n protected $name = 'cache:prune-stale-tags';\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected", "suffix": "andle(CacheManager $cache)\n {\n $cache = $cache->store($this->argument('store'));\n\n if (method_exists($cache->getStore(), 'flushStaleTags')) {\n $cache->flushStaleTags();\n }\n\n $this->components->info('Stale cache tag", "middle": " $description = 'Prune stale cache tags from the cache (Redis only)';\n\n /**\n * Execute the console command.\n *\n * @param \\Illuminate\\Cache\\CacheManager $cache\n * @return int|null\n */\n public function h", "meta": {"filepath": "src/Illuminate/Cache/Console/PruneStaleTagsCommand.php", "language": "php", "file_size": 1315, "cut_index": 524, "middle_length": 229}} {"prefix": "luminate\\Support\\Sleep;\nuse Illuminate\\Support\\Str;\nuse Throwable;\n\nclass ConcurrencyLimiter\n{\n /**\n * The cache store instance.\n *\n * @var \\Illuminate\\Contracts\\Cache\\LockProvider\n */\n protected $store;\n\n /**\n * The name of the limiter.\n *\n * @var string\n */\n protected $name;\n\n /**\n * The allowed number of concurrent locks.\n *\n * @var int\n */\n protected $maxLocks;\n\n /**\n * The number of seconds a slot should be maintained.\n *\n ", "suffix": "maxLocks\n * @param int $releaseAfter\n */\n public function __construct($store, $name, $maxLocks, $releaseAfter)\n {\n $this->name = $name;\n $this->store = $store;\n $this->maxLocks = $maxLocks;\n $this->releaseAfter =", "middle": " * @var int\n */\n protected $releaseAfter;\n\n /**\n * Create a new concurrency limiter instance.\n *\n * @param \\Illuminate\\Contracts\\Cache\\LockProvider $store\n * @param string $name\n * @param int $", "meta": {"filepath": "src/Illuminate/Cache/Limiters/ConcurrencyLimiter.php", "language": "php", "file_size": 2728, "cut_index": 563, "middle_length": 229}} {"prefix": "ncyLimiterBuilder\n{\n use InteractsWithTime;\n\n /**\n * The cache repository or Redis connection.\n *\n * @var \\Illuminate\\Cache\\Repository\n */\n public $connection;\n\n /**\n * The name of the lock.\n *\n * @var string\n */\n public $name;\n\n /**\n * The maximum number of entities that can hold the lock at the same time.\n *\n * @var int\n */\n public $maxLocks;\n\n /**\n * The number of seconds to maintain the lock until it is automatically released.\n ", "suffix": "onds to wait between attempts to acquire the lock.\n *\n * @var int\n */\n public $sleep = 250;\n\n /**\n * Create a new builder instance.\n *\n * @param mixed $connection\n * @param string $name\n */\n public function __co", "middle": " *\n * @var int\n */\n public $releaseAfter = 60;\n\n /**\n * The number of seconds to block until a lock is available.\n *\n * @var int\n */\n public $timeout = 3;\n\n /**\n * The number of millisec", "meta": {"filepath": "src/Illuminate/Cache/Limiters/ConcurrencyLimiterBuilder.php", "language": "php", "file_size": 3261, "cut_index": 614, "middle_length": 229}} {"prefix": " of the cache store.\n *\n * @var string|null\n */\n public $storeName;\n\n /**\n * The key of the event.\n *\n * @var string\n */\n public $key;\n\n /**\n * The tags that were assigned to the key.\n *\n * @var array\n */\n public $tags;\n\n /**\n * Create a new event instance.\n *\n * @param string|null $storeName\n * @param string $key\n * @param array $tags\n */\n public function __construct($storeName, $key, array $tags = [])\n {\n ", "suffix": "y = $key;\n $this->tags = $tags;\n }\n\n /**\n * Set the tags for the cache event.\n *\n * @param array $tags\n * @return $this\n */\n public function setTags($tags)\n {\n $this->tags = $tags;\n\n return $this;\n ", "middle": " $this->storeName = $storeName;\n $this->ke", "meta": {"filepath": "src/Illuminate/Cache/Events/CacheEvent.php", "language": "php", "file_size": 918, "cut_index": 606, "middle_length": 52}} {"prefix": "vents;\n\nclass WritingManyKeys extends CacheEvent\n{\n /**\n * The keys that are being written.\n *\n * @var mixed\n */\n public $keys;\n\n /**\n * The value that is being written.\n *\n * @var mixed\n */\n public $values;\n\n /**\n * The number of seconds the keys should be valid.\n *\n * @var int|null\n */\n public $seconds;\n\n /**\n * Create a new event instance.\n *\n * @param string|null $storeName\n * @param array $keys\n * @param array", "suffix": "param array $tags\n */\n public function __construct($storeName, $keys, $values, $seconds = null, $tags = [])\n {\n parent::__construct($storeName, $keys[0], $tags);\n\n $this->keys = $keys;\n $this->values = $values;\n $thi", "middle": " $values\n * @param int|null $seconds\n * @", "meta": {"filepath": "src/Illuminate/Cache/Events/WritingManyKeys.php", "language": "php", "file_size": 886, "cut_index": 547, "middle_length": 52}} {"prefix": "\nnamespace Illuminate\\Http;\n\nuse Illuminate\\Support\\Str;\n\ntrait FileHelpers\n{\n /**\n * The cache copy of the file's hash name.\n *\n * @var string|null\n */\n protected $hashName = null;\n\n /**\n * Get the fully-qualified path to the file.\n *\n * @return string\n */\n public function path()\n {\n return $this->getRealPath();\n }\n\n /**\n * Get the file's extension.\n *\n * @return string\n */\n public function extension()\n {\n return $this", "suffix": " = rtrim($path, '/').'/';\n }\n\n $hash = $this->hashName ?: $this->hashName = Str::random(40);\n\n if ($extension = $this->guessExtension()) {\n $extension = '.'.$extension;\n }\n\n return $path.$hash.$extension;\n }", "middle": "->guessExtension();\n }\n\n /**\n * Get a filename for the file.\n *\n * @param string|null $path\n * @return string\n */\n public function hashName($path = null)\n {\n if ($path) {\n $path", "meta": {"filepath": "src/Illuminate/Http/FileHelpers.php", "language": "php", "file_size": 1209, "cut_index": 518, "middle_length": 229}} {"prefix": "s\\Support\\Jsonable;\nuse Illuminate\\Support\\Traits\\Macroable;\nuse InvalidArgumentException;\nuse JsonSerializable;\nuse Symfony\\Component\\HttpFoundation\\JsonResponse as BaseJsonResponse;\n\nclass JsonResponse extends BaseJsonResponse\n{\n use ResponseTrait, Macroable {\n Macroable::__call as macroCall;\n }\n\n /**\n * Create a new JSON response instance.\n *\n * @param mixed $data\n * @param int $status\n * @param array $headers\n * @param int $options\n * @param bool $js", "suffix": " }\n\n /**\n * {@inheritdoc}\n *\n * @return static\n */\n #[\\Override]\n public static function fromJsonString(?string $data = null, int $status = 200, array $headers = []): static\n {\n return new static($data, $status, $header", "middle": "on\n */\n public function __construct($data = null, $status = 200, $headers = [], $options = 0, $json = false)\n {\n $this->encodingOptions = $options;\n\n parent::__construct($data, $status, $headers, $json);\n ", "meta": {"filepath": "src/Illuminate/Http/JsonResponse.php", "language": "php", "file_size": 3555, "cut_index": 614, "middle_length": 229}} {"prefix": "nate\\Support\\Traits\\ForwardsCalls;\nuse Illuminate\\Support\\Traits\\Macroable;\nuse Illuminate\\Support\\Uri;\nuse Illuminate\\Support\\ViewErrorBag;\nuse Symfony\\Component\\HttpFoundation\\File\\UploadedFile as SymfonyUploadedFile;\nuse Symfony\\Component\\HttpFoundation\\RedirectResponse as BaseRedirectResponse;\n\nclass RedirectResponse extends BaseRedirectResponse\n{\n use ForwardsCalls, ResponseTrait, Macroable {\n Macroable::__call as macroCall;\n }\n\n /**\n * The request instance.\n *\n * @var \\Illu", "suffix": " *\n * @param string|array $key\n * @param mixed $value\n * @return $this\n */\n public function with($key, $value = null)\n {\n $key = is_array($key) ? $key : [$key => $value];\n\n foreach ($key as $k => $v) {\n ", "middle": "minate\\Http\\Request\n */\n protected $request;\n\n /**\n * The session store instance.\n *\n * @var \\Illuminate\\Session\\Store\n */\n protected $session;\n\n /**\n * Flash a piece of data to the session.\n ", "meta": {"filepath": "src/Illuminate/Http/RedirectResponse.php", "language": "php", "file_size": 6682, "cut_index": 716, "middle_length": 229}} {"prefix": "e)\n * @method bool hasValidRelativeSignature()\n * @method bool hasValidSignatureWhileIgnoring($ignoreQuery = [], $absolute = true)\n * @method bool hasValidRelativeSignatureWhileIgnoring($ignoreQuery = [])\n */\nclass Request extends SymfonyRequest implements Arrayable, ArrayAccess\n{\n use Concerns\\CanBePrecognitive,\n Concerns\\InteractsWithContentTypes,\n Concerns\\InteractsWithFlashData,\n Concerns\\InteractsWithInput,\n Conditionable,\n Macroable;\n\n /**\n * The decoded JS", "suffix": "p\\UploadedFile|\\Illuminate\\Http\\UploadedFile[]>\n */\n protected $convertedFiles;\n\n /**\n * The user resolver callback.\n *\n * @var \\Closure\n */\n protected $userResolver;\n\n /**\n * The route resolver callback.\n *\n * @", "middle": "ON content for the request.\n *\n * @var \\Symfony\\Component\\HttpFoundation\\InputBag|null\n */\n protected $json;\n\n /**\n * All of the converted files for the request.\n *\n * @var arraysetContent($content);\n $this->setStatusCode($status);\n $this->setProtocolVersion('1.0');\n }\n\n /**\n * Get the response content.\n */\n #[\\Override]\n public function getContent(): string|", "middle": "ram int $status\n * @param array $headers\n *\n * @throws \\InvalidArgumentException\n */\n public function __construct($content = '', $status = 200, array $headers = [])\n {\n $this->headers = new Respon", "meta": {"filepath": "src/Illuminate/Http/Response.php", "language": "php", "file_size": 3307, "cut_index": 614, "middle_length": 229}} {"prefix": "omponent\\HttpFoundation\\HeaderBag;\nuse Throwable;\n\ntrait ResponseTrait\n{\n /**\n * The original content of the response.\n *\n * @var mixed\n */\n public $original;\n\n /**\n * The exception that triggered the error response (if applicable).\n *\n * @var \\Throwable|null\n */\n public $exception;\n\n /**\n * Get the status code for the response.\n *\n * @return int\n */\n public function status()\n {\n return $this->getStatusCode();\n }\n\n /**\n * ", "suffix": "ng\n */\n public function content()\n {\n return $this->getContent();\n }\n\n /**\n * Get the original response content.\n *\n * @return mixed\n */\n public function getOriginalContent()\n {\n $original = $this->origin", "middle": "Get the status text for the response.\n *\n * @return string\n */\n public function statusText()\n {\n return $this->statusText;\n }\n\n /**\n * Get the content of the response.\n *\n * @return stri", "meta": {"filepath": "src/Illuminate/Http/ResponseTrait.php", "language": "php", "file_size": 4144, "cut_index": 614, "middle_length": 229}} {"prefix": "stem\\Factory as FilesystemFactory;\nuse Illuminate\\Contracts\\Filesystem\\FileNotFoundException;\nuse Illuminate\\Http\\Testing\\FileFactory;\nuse Illuminate\\Support\\Arr;\nuse Illuminate\\Support\\Traits\\Macroable;\nuse Symfony\\Component\\HttpFoundation\\File\\UploadedFile as SymfonyUploadedFile;\n\nclass UploadedFile extends SymfonyUploadedFile\n{\n use FileHelpers, Macroable;\n\n /**\n * Begin creating a new file fake.\n *\n * @return \\Illuminate\\Http\\Testing\\FileFactory\n */\n public static function fake(", "suffix": "function store($path = '', $options = [])\n {\n return $this->storeAs($path, $this->hashName(), $this->parseOptions($options));\n }\n\n /**\n * Store the uploaded file on a filesystem disk with public visibility.\n *\n * @param string ", "middle": ")\n {\n return new FileFactory;\n }\n\n /**\n * Store the uploaded file on a filesystem disk.\n *\n * @param string $path\n * @param array|string $options\n * @return string|false\n */\n public ", "meta": {"filepath": "src/Illuminate/Http/UploadedFile.php", "language": "php", "file_size": 4121, "cut_index": 614, "middle_length": 229}} {"prefix": "ry instance.\n *\n * @var \\Illuminate\\Http\\Client\\Factory\n */\n protected $factory;\n\n /**\n * The array of requests.\n *\n * @var array\n */\n protected $requests = [];\n\n /**\n * The total number of requests that belong to the batch.\n *\n * @var non-negative-int\n */\n public $totalRequests = 0;\n\n /**\n * The total number of requests that are still pending.\n *\n * @var non-negative-int\n */\n ", "suffix": " *\n * @var callable\n */\n protected $handler;\n\n /**\n * The callback to run before the first request from the batch runs.\n *\n * @var (\\Closure($this): void)|null\n */\n protected $beforeCallback = null;\n\n /**\n * The c", "middle": "public $pendingRequests = 0;\n\n /**\n * The total number of requests that have failed.\n *\n * @var non-negative-int\n */\n public $failedRequests = 0;\n\n /**\n * The handler function for the Guzzle client.\n ", "meta": {"filepath": "src/Illuminate/Http/Client/Batch.php", "language": "php", "file_size": 12179, "cut_index": 921, "middle_length": 229}} {"prefix": "able;\nuse Illuminate\\Support\\Traits\\Macroable;\nuse InvalidArgumentException;\nuse PHPUnit\\Framework\\Assert as PHPUnit;\n\n/**\n * @mixin \\Illuminate\\Http\\Client\\PendingRequest\n */\nclass Factory\n{\n use Macroable {\n __call as macroCall;\n }\n\n /**\n * The event dispatcher implementation.\n *\n * @var \\Illuminate\\Contracts\\Events\\Dispatcher|null\n */\n protected $dispatcher;\n\n /**\n * The middleware to apply to every request.\n *\n * @var array\n */\n protected $globalM", "suffix": "\\Illuminate\\Support\\Collection\n */\n protected $stubCallbacks;\n\n /**\n * Indicates if the factory is recording requests and responses.\n *\n * @var bool\n */\n protected $recording = false;\n\n /**\n * The recorded response array", "middle": "iddleware = [];\n\n /**\n * The options to apply to every request.\n *\n * @var \\Closure|array\n */\n protected $globalOptions = [];\n\n /**\n * The stub callables that will handle requests.\n *\n * @var ", "meta": {"filepath": "src/Illuminate/Http/Client/Factory.php", "language": "php", "file_size": 16602, "cut_index": 921, "middle_length": 229}} {"prefix": "g\n */\n protected $baseUrl = '';\n\n /**\n * The parameters that can be substituted into the URL.\n *\n * @var array\n */\n protected $urlParameters = [];\n\n /**\n * The request body format.\n *\n * @var string\n */\n protected $bodyFormat;\n\n /**\n * The raw body for the request.\n *\n * @var \\Psr\\Http\\Message\\StreamInterface|string\n */\n protected $pendingBody;\n\n /**\n * The pending files for the request.\n *\n * @var array\n */\n prot", "suffix": "protected $transferStats;\n\n /**\n * The request options.\n *\n * @var array\n */\n protected $options = [];\n\n /**\n * A callback to run when throwing if a server or client error occurs.\n *\n * @var \\Closure\n */\n protect", "middle": "ected $pendingFiles = [];\n\n /**\n * The request cookies.\n *\n * @var array\n */\n protected $cookies;\n\n /**\n * The transfer stats for the request.\n *\n * @var \\GuzzleHttp\\TransferStats\n */\n ", "meta": {"filepath": "src/Illuminate/Http/Client/PendingRequest.php", "language": "php", "file_size": 56513, "cut_index": 2151, "middle_length": 229}} {"prefix": "eHttp\\Utils;\n\n/**\n * @mixin \\Illuminate\\Http\\Client\\Factory\n */\nclass Pool\n{\n /**\n * The factory instance.\n *\n * @var \\Illuminate\\Http\\Client\\Factory\n */\n protected $factory;\n\n /**\n * The handler function for the Guzzle client.\n *\n * @var callable\n */\n protected $handler;\n\n /**\n * The pool of requests.\n *\n * @var array\n */\n protected $pool = [];\n\n /**\n * Create a new requests pool.\n ", "suffix": "andler();\n }\n\n /**\n * Add a request to the pool with a numeric index.\n *\n * @return \\Illuminate\\Http\\Client\\PendingRequest|\\GuzzleHttp\\Promise\\Promise\n */\n public function newRequest()\n {\n return $this->pool[] = $this->as", "middle": " *\n * @param \\Illuminate\\Http\\Client\\Factory|null $factory\n */\n public function __construct(?Factory $factory = null)\n {\n $this->factory = $factory ?: new Factory();\n $this->handler = Utils::chooseH", "meta": {"filepath": "src/Illuminate/Http/Client/Pool.php", "language": "php", "file_size": 2173, "cut_index": 563, "middle_length": 229}} {"prefix": "ption;\n\nclass Request implements ArrayAccess\n{\n use Macroable;\n\n /**\n * The underlying PSR request.\n *\n * @var \\Psr\\Http\\Message\\RequestInterface\n */\n protected $request;\n\n /**\n * The decoded payload for the request.\n *\n * @var array\n */\n protected $data;\n\n /**\n * The attribute data passed when building the PendingRequest.\n *\n * @var array\n */\n protected $attributes = [];\n\n /**\n * Create a new request instance.\n ", "suffix": "\n */\n public function method()\n {\n return $this->request->getMethod();\n }\n\n /**\n * Get the URL of the request.\n *\n * @return string\n */\n public function url()\n {\n return (string) $this->request->getUri();", "middle": " *\n * @param \\Psr\\Http\\Message\\RequestInterface $request\n */\n public function __construct($request)\n {\n $this->request = $request;\n }\n\n /**\n * Get the request method.\n *\n * @return string", "meta": {"filepath": "src/Illuminate/Http/Client/Request.php", "language": "php", "file_size": 7221, "cut_index": 716, "middle_length": 229}} {"prefix": "eHttp\\Psr7\\Message;\n\nclass RequestException extends HttpClientException\n{\n /**\n * The response instance.\n *\n * @var \\Illuminate\\Http\\Client\\Response\n */\n public $response;\n\n /**\n * The current truncation length for the exception message.\n *\n * @var int|false|null\n */\n public $truncateExceptionsAt;\n\n /**\n * The global truncation length for the exception message.\n *\n * @var int|false\n */\n public static $truncateAt = 120;\n\n /**\n * Whether", "suffix": "sponse\n * @param int|false|null $truncateExceptionsAt\n */\n public function __construct(Response $response, $truncateExceptionsAt = null)\n {\n $this->truncateExceptionsAt = $truncateExceptionsAt;\n\n $this->response = $response;\n\n", "middle": " the response has been summarized in the message.\n *\n * @var bool\n */\n public $hasBeenSummarized = false;\n\n /**\n * Create a new exception instance.\n *\n * @param \\Illuminate\\Http\\Client\\Response $re", "meta": {"filepath": "src/Illuminate/Http/Client/RequestException.php", "language": "php", "file_size": 2884, "cut_index": 563, "middle_length": 229}} {"prefix": "esStatusCode, Tappable, Macroable {\n __call as macroCall;\n }\n\n /**\n * The underlying PSR response.\n *\n * @var \\Psr\\Http\\Message\\ResponseInterface\n */\n protected $response;\n\n /**\n * The decoded JSON response.\n *\n * @var array\n */\n protected $decoded;\n\n /**\n * The flags that were used when decoding the JSON response.\n *\n * @var int-mask|false|null\n */\n protected $truncateExceptionsAt = null;\n\n /**", "middle": "THROW_ON_ERROR>\n */\n protected int $decodingFlags;\n\n /**\n * The request cookies.\n *\n * @var \\GuzzleHttp\\Cookie\\CookieJar\n */\n public $cookies;\n\n /**\n * The transfer stats for the request.\n ", "meta": {"filepath": "src/Illuminate/Http/Client/Response.php", "language": "php", "file_size": 15020, "cut_index": 921, "middle_length": 229}} {"prefix": "tOfBoundsException;\n\nclass ResponseSequence\n{\n use Macroable;\n\n /**\n * The responses in the sequence.\n *\n * @var array\n */\n protected $responses;\n\n /**\n * Indicates that invoking this sequence when it is empty should throw an exception.\n *\n * @var bool\n */\n protected $failWhenEmpty = true;\n\n /**\n * The response that should be returned when the sequence is empty.\n *\n * @var \\GuzzleHttp\\Promise\\PromiseInterface\n */\n protected $emptyResponse;", "suffix": " to the sequence.\n *\n * @param string|array|null $body\n * @param int $status\n * @param array $headers\n * @return $this\n */\n public function push($body = null, int $status = 200, array $headers = [])\n {\n return $th", "middle": "\n\n /**\n * Create a new response sequence.\n *\n * @param array $responses\n */\n public function __construct(array $responses)\n {\n $this->responses = $responses;\n }\n\n /**\n * Push a response", "meta": {"filepath": "src/Illuminate/Http/Client/ResponseSequence.php", "language": "php", "file_size": 3993, "cut_index": 614, "middle_length": 229}} {"prefix": "Dispatcher;\nuse RuntimeException;\nuse Throwable;\n\nclass FailoverStore extends TaggableStore implements CanFlushLocks, LockProvider\n{\n /**\n * The caches which failed on the last action.\n *\n * @var list\n */\n protected array $failingCaches = [];\n\n /**\n * Create a new failover store.\n *\n * @param array $stores\n */\n public function __construct(\n protected CacheManager $cache,\n protected Dispatcher $events,\n protected array $s", "suffix": ", func_get_args());\n }\n\n /**\n * Retrieve multiple items from the cache by key.\n *\n * Items not found in the cache will have a null value.\n *\n * @return array\n */\n public function many(array $keys)\n {\n return $this", "middle": "tores\n ) {\n }\n\n /**\n * Retrieve an item from the cache by key.\n *\n * @param string $key\n * @return mixed\n */\n public function get($key)\n {\n return $this->attemptOnAllStores(__FUNCTION__", "meta": {"filepath": "src/Illuminate/Cache/FailoverStore.php", "language": "php", "file_size": 6846, "cut_index": 716, "middle_length": 229}} {"prefix": "anFlushLocks, LockProvider, Store\n{\n use InteractsWithTime, RetrievesMultipleKeys;\n\n /**\n * The Illuminate Filesystem instance.\n *\n * @var \\Illuminate\\Filesystem\\Filesystem\n */\n protected $files;\n\n /**\n * The file cache directory.\n *\n * @var string\n */\n protected $directory;\n\n /**\n * The file cache lock directory.\n *\n * @var string|null\n */\n protected $lockDirectory;\n\n /**\n * Octal representation of the cache file permissions.\n ", "suffix": " * Create a new file cache store instance.\n *\n * @param \\Illuminate\\Filesystem\\Filesystem $files\n * @param string $directory\n * @param int|null $filePermission\n * @param array|bool|null $serializableClasses\n */\n public fu", "middle": "*\n * @var int|null\n */\n protected $filePermission;\n\n /**\n * The classes that should be allowed during unserialization.\n *\n * @var array|bool|null\n */\n protected $serializableClasses;\n\n /**\n ", "meta": {"filepath": "src/Illuminate/Cache/FileStore.php", "language": "php", "file_size": 12611, "cut_index": 921, "middle_length": 229}} {"prefix": "e\\Contracts\\Cache\\LockTimeoutException;\nuse Illuminate\\Support\\Carbon;\nuse Illuminate\\Support\\InteractsWithTime;\nuse Illuminate\\Support\\Sleep;\nuse Illuminate\\Support\\Str;\n\nabstract class Lock implements LockContract\n{\n use InteractsWithTime;\n\n /**\n * The name of the lock.\n *\n * @var string\n */\n protected $name;\n\n /**\n * The number of seconds the lock should be maintained.\n *\n * @var int\n */\n protected $seconds;\n\n /**\n * The scope identifier of this lock.", "suffix": "250;\n\n /**\n * Create a new lock instance.\n *\n * @param string $name\n * @param int $seconds\n * @param string|null $owner\n */\n public function __construct($name, $seconds, $owner = null)\n {\n if (is_null($owner)) ", "middle": "\n *\n * @var string\n */\n protected $owner;\n\n /**\n * The number of milliseconds to wait before re-attempting to acquire a lock while blocking.\n *\n * @var int\n */\n protected $sleepMilliseconds = ", "meta": {"filepath": "src/Illuminate/Cache/Lock.php", "language": "php", "file_size": 4188, "cut_index": 614, "middle_length": 229}} {"prefix": "pace Illuminate\\Cache;\n\nclass MemcachedLock extends Lock\n{\n /**\n * The Memcached instance.\n *\n * @var \\Memcached\n */\n protected $memcached;\n\n /**\n * Create a new lock instance.\n *\n * @param \\Memcached $memcached\n * @param string $name\n * @param int $seconds\n * @param string|null $owner\n */\n public function __construct($memcached, $name, $seconds, $owner = null)\n {\n parent::__construct($name, $seconds, $owner);\n\n $this->memcache", "suffix": "\n );\n }\n\n /**\n * Release the lock.\n *\n * @return bool\n */\n public function release()\n {\n if ($this->isOwnedByCurrentProcess()) {\n return $this->memcached->delete($this->name);\n }\n\n return f", "middle": "d = $memcached;\n }\n\n /**\n * Attempt to acquire the lock.\n *\n * @return bool\n */\n public function acquire()\n {\n return $this->memcached->add(\n $this->name, $this->owner, $this->seconds", "meta": {"filepath": "src/Illuminate/Cache/MemcachedLock.php", "language": "php", "file_size": 1433, "cut_index": 524, "middle_length": 229}} {"prefix": "izedStore implements CanFlushLocks, LockProvider, Store\n{\n /**\n * The memoized cache values.\n *\n * @var array\n */\n protected $cache = [];\n\n /**\n * Create a new memoized cache instance.\n *\n * @param string $name\n * @param \\Illuminate\\Cache\\Repository $repository\n */\n public function __construct(\n protected $name,\n protected $repository,\n ) {\n //\n }\n\n /**\n * Retrieve an item from the cache by key.\n *\n ", "suffix": "fixedKey];\n }\n\n return $this->cache[$prefixedKey] = $this->repository->get($key);\n }\n\n /**\n * Retrieve multiple items from the cache by key.\n *\n * Items not found in the cache will have a null value.\n *\n * @return ar", "middle": "* @param string $key\n * @return mixed\n */\n public function get($key)\n {\n $prefixedKey = $this->prefix($key);\n\n if (array_key_exists($prefixedKey, $this->cache)) {\n return $this->cache[$pre", "meta": {"filepath": "src/Illuminate/Cache/MemoizedStore.php", "language": "php", "file_size": 6798, "cut_index": 716, "middle_length": 229}} {"prefix": "Contracts\\Cache\\CanFlushLocks;\nuse Illuminate\\Contracts\\Cache\\LockProvider;\n\nclass NullStore extends TaggableStore implements CanFlushLocks, LockProvider\n{\n use RetrievesMultipleKeys;\n\n /**\n * Retrieve an item from the cache by key.\n *\n * @param string $key\n * @return void\n */\n public function get($key)\n {\n //\n }\n\n /**\n * Store an item in the cache for a given number of seconds.\n *\n * @param string $key\n * @param mixed $value\n * @param ", "suffix": "aram mixed $value\n * @return false\n */\n public function increment($key, $value = 1)\n {\n return false;\n }\n\n /**\n * Decrement the value of an item in the cache.\n *\n * @param string $key\n * @param mixed $value\n", "middle": "int $seconds\n * @return bool\n */\n public function put($key, $value, $seconds)\n {\n return false;\n }\n\n /**\n * Increment the value of an item in the cache.\n *\n * @param string $key\n * @p", "meta": {"filepath": "src/Illuminate/Cache/NullStore.php", "language": "php", "file_size": 2994, "cut_index": 563, "middle_length": 229}} {"prefix": "ate\\Cache;\n\nuse Illuminate\\Redis\\Connections\\PhpRedisConnection;\n\nclass PhpRedisLock extends RedisLock\n{\n /**\n * Create a new phpredis lock instance.\n *\n * @param \\Illuminate\\Redis\\Connections\\PhpRedisConnection $redis\n * @param string $name\n * @param int $seconds\n * @param string|null $owner\n */\n public function __construct(PhpRedisConnection $redis, string $name, int $seconds, ?string $owner = null)\n {\n parent::__construct($redis, $name, $seconds, $owner", "suffix": "/**\n * {@inheritDoc}\n */\n public function release()\n {\n return (bool) $this->redis->eval(\n LuaScripts::releaseLock(),\n 1,\n $this->name,\n ...$this->redis->pack([$this->owner])\n );\n }", "middle": ");\n }\n\n ", "meta": {"filepath": "src/Illuminate/Cache/PhpRedisLock.php", "language": "php", "file_size": 809, "cut_index": 536, "middle_length": 14}} {"prefix": "ate\\Support\\LazyCollection;\nuse Illuminate\\Support\\Str;\nuse RuntimeException;\n\nclass RedisStore extends TaggableStore implements CanFlushLocks, LockProvider\n{\n use RetrievesMultipleKeys {\n many as private manyAlias;\n putMany as private putManyAlias;\n }\n\n /**\n * The Redis factory implementation.\n *\n * @var \\Illuminate\\Contracts\\Redis\\Factory\n */\n protected $redis;\n\n /**\n * A string that should be prepended to keys.\n *\n * @var string\n */\n protect", "suffix": "\n *\n * @var string\n */\n protected $lockConnection;\n\n /**\n * The classes that should be allowed during unserialization.\n *\n * @var array|bool|null\n */\n protected $serializableClasses;\n\n /**\n * Create a new Redis s", "middle": "ed $prefix;\n\n /**\n * The Redis connection instance that should be used to manage locks.\n *\n * @var string\n */\n protected $connection;\n\n /**\n * The name of the connection that should be used for locks.", "meta": {"filepath": "src/Illuminate/Cache/RedisStore.php", "language": "php", "file_size": 15085, "cut_index": 921, "middle_length": 229}} {"prefix": "t\\Facades\\Validator;\nuse Illuminate\\Support\\Traits\\Conditionable;\nuse InvalidArgumentException;\nuse IteratorAggregate;\nuse Traversable;\n\nclass Password implements DataAwareRule, ImplicitRule, IteratorAggregate, Rule, ValidatorAwareRule\n{\n use Conditionable;\n\n /**\n * The validator performing the validation.\n *\n * @var \\Illuminate\\Contracts\\Validation\\Validator\n */\n protected $validator;\n\n /**\n * The data under validation.\n *\n * @var array\n */\n protected $data;\n\n", "suffix": "assword is required.\n *\n * @var bool\n */\n protected $required = false;\n\n /**\n * If the password should only be validated when present.\n *\n * @var bool\n */\n protected $sometimes = false;\n\n /**\n * If the password r", "middle": " /**\n * The minimum size of the password.\n *\n * @var int\n */\n protected $min = 8;\n\n /**\n * The maximum size of the password.\n *\n * @var int\n */\n protected $max;\n\n /**\n * If the p", "meta": {"filepath": "src/Illuminate/Validation/Rules/Password.php", "language": "php", "file_size": 11280, "cut_index": 921, "middle_length": 229}} {"prefix": "\nnamespace Illuminate\\Validation\\Rules;\n\nuse Closure;\nuse InvalidArgumentException;\nuse Stringable;\n\nclass RequiredIf implements Stringable\n{\n /**\n * The condition that validates the attribute.\n *\n * @var (\\Closure(): bool)|bool\n */\n public $condition;\n\n /**\n * Create a new required validation rule based on a condition.\n *\n * @param (\\Closure(): bool)|bool|null $condition\n *\n * @throws \\InvalidArgumentException\n */\n public function __construct($condition", "suffix": "ow new InvalidArgumentException('The provided condition must be a callable or boolean.');\n }\n }\n\n /**\n * Convert the rule to a validation string.\n *\n * @return string\n */\n public function __toString()\n {\n if (is_ca", "middle": ")\n {\n if (is_null($condition)) {\n $condition = false;\n }\n\n if ($condition instanceof Closure || is_bool($condition)) {\n $this->condition = $condition;\n } else {\n thr", "meta": {"filepath": "src/Illuminate/Validation/Rules/RequiredIf.php", "language": "php", "file_size": 1172, "cut_index": 518, "middle_length": 229}} {"prefix": "ts\\Conditionable;\nuse Stringable;\n\nclass StringRule implements Stringable\n{\n use Conditionable;\n\n /**\n * The constraints for the string rule.\n */\n protected array $constraints = ['string'];\n\n /**\n * The field under validation must be entirely alphabetic characters.\n *\n * @param bool $ascii\n * @return $this\n */\n public function alpha(bool $ascii = false): static\n {\n return $this->addRule($ascii ? 'alpha:ascii' : 'alpha');\n }\n\n /**\n * The field ", "suffix": "$this->addRule($ascii ? 'alpha_dash:ascii' : 'alpha_dash');\n }\n\n /**\n * The field under validation must be entirely alpha-numeric characters.\n *\n * @param bool $ascii\n * @return $this\n */\n public function alphaNumeric(bool $a", "middle": "under validation must be entirely alpha-numeric characters, dashes, and underscores.\n *\n * @param bool $ascii\n * @return $this\n */\n public function alphaDash(bool $ascii = false): static\n {\n return ", "meta": {"filepath": "src/Illuminate/Validation/Rules/StringRule.php", "language": "php", "file_size": 4469, "cut_index": 614, "middle_length": 229}} {"prefix": "ys;\n\n /**\n * The APC wrapper instance.\n *\n * @var \\Illuminate\\Cache\\ApcWrapper\n */\n protected $apc;\n\n /**\n * A string that should be prepended to keys.\n *\n * @var string\n */\n protected $prefix;\n\n /**\n * Create a new APC store.\n *\n * @param \\Illuminate\\Cache\\ApcWrapper $apc\n * @param string $prefix\n */\n public function __construct(ApcWrapper $apc, $prefix = '')\n {\n $this->apc = $apc;\n $this->prefix = $prefix;\n }\n\n ", "suffix": "ore an item in the cache for a given number of seconds.\n *\n * @param string $key\n * @param mixed $value\n * @param int $seconds\n * @return bool\n */\n public function put($key, $value, $seconds)\n {\n return $this->apc", "middle": " /**\n * Retrieve an item from the cache by key.\n *\n * @param string $key\n * @return mixed\n */\n public function get($key)\n {\n return $this->apc->get($this->prefix.$key);\n }\n\n /**\n * St", "meta": {"filepath": "src/Illuminate/Cache/ApcStore.php", "language": "php", "file_size": 3076, "cut_index": 614, "middle_length": 229}} {"prefix": "Support\\Carbon;\n\nclass ArrayLock extends Lock\n{\n /**\n * The parent array cache store.\n *\n * @var \\Illuminate\\Cache\\ArrayStore\n */\n protected $store;\n\n /**\n * Create a new lock instance.\n *\n * @param \\Illuminate\\Cache\\ArrayStore $store\n * @param string $name\n * @param int $seconds\n * @param string|null $owner\n */\n public function __construct($store, $name, $seconds, $owner = null)\n {\n parent::__construct($name, $seconds, $owner);\n\n ", "suffix": "ow()->addSecond();\n\n if ($this->exists() && $expiration->isFuture()) {\n return false;\n }\n\n $this->store->locks[$this->name] = [\n 'owner' => $this->owner,\n 'expiresAt' => $this->seconds === 0 ? null : Ca", "middle": " $this->store = $store;\n }\n\n /**\n * Attempt to acquire the lock.\n *\n * @return bool\n */\n public function acquire()\n {\n $expiration = $this->store->locks[$this->name]['expiresAt'] ?? Carbon::n", "meta": {"filepath": "src/Illuminate/Cache/ArrayLock.php", "language": "php", "file_size": 2132, "cut_index": 563, "middle_length": 229}} {"prefix": "port\\InteractsWithTime;\nuse RuntimeException;\n\nclass ArrayStore extends TaggableStore implements CanFlushLocks, LockProvider\n{\n use InteractsWithTime, RetrievesMultipleKeys;\n\n /**\n * The array of stored values.\n *\n * @var array\n */\n protected $storage = [];\n\n /**\n * The array of locks.\n *\n * @var array\n */\n public $locks = [];\n\n /**\n * In", "suffix": " */\n protected $serializableClasses;\n\n /**\n * Create a new Array store.\n *\n * @param bool $serializesValues\n * @param array|bool|null $serializableClasses\n */\n public function __construct($serializesValues = false, $serial", "middle": "dicates if values are serialized within the store.\n *\n * @var bool\n */\n protected $serializesValues;\n\n /**\n * The classes that should be allowed during unserialization.\n *\n * @var array|bool|null\n ", "meta": {"filepath": "src/Illuminate/Cache/ArrayStore.php", "language": "php", "file_size": 7409, "cut_index": 716, "middle_length": 229}} {"prefix": "nException;\nuse RuntimeException;\n\nuse function Illuminate\\Support\\enum_value;\n\n/**\n * @mixin \\Illuminate\\Cache\\Repository\n * @mixin \\Illuminate\\Contracts\\Cache\\LockProvider\n */\nclass CacheManager implements FactoryContract\n{\n use RebindsCallbacksToSelf;\n\n /**\n * The application instance.\n *\n * @var \\Illuminate\\Contracts\\Foundation\\Application\n */\n protected $app;\n\n /**\n * The array of resolved cache stores.\n *\n * @var array\n */\n protected $stores = [];\n\n /*", "suffix": "ication $app\n */\n public function __construct($app)\n {\n $this->app = $app;\n }\n\n /**\n * Get a cache store instance by name, wrapped in a repository.\n *\n * @param \\UnitEnum|string|null $name\n * @return \\Illuminate\\Co", "middle": "*\n * The registered custom driver creators.\n *\n * @var array\n */\n protected $customCreators = [];\n\n /**\n * Create a new Cache manager instance.\n *\n * @param \\Illuminate\\Contracts\\Foundation\\Appl", "meta": {"filepath": "src/Illuminate/Cache/CacheManager.php", "language": "php", "file_size": 15896, "cut_index": 921, "middle_length": 229}} {"prefix": "sConcurrencyErrors;\nuse Illuminate\\Database\\QueryException;\nuse Throwable;\n\nclass DatabaseLock extends Lock\n{\n use DetectsConcurrencyErrors;\n\n /**\n * The database connection instance.\n *\n * @var \\Illuminate\\Database\\Connection\n */\n protected $connection;\n\n /**\n * The database table name.\n *\n * @var string\n */\n protected $table;\n\n /**\n * The prune probability odds.\n *\n * @var array{int, int}|null\n */\n protected $lottery;\n\n /**\n * The", "suffix": "nection\n * @param string $table\n * @param string $name\n * @param int $seconds\n * @param string|null $owner\n * @param array{int, int}|null $lottery\n * @param int $defaultTimeoutInSeconds\n */\n public function __cons", "middle": " default number of seconds that a lock should be held.\n *\n * @var int\n */\n protected $defaultTimeoutInSeconds;\n\n /**\n * Create a new lock instance.\n *\n * @param \\Illuminate\\Database\\Connection $con", "meta": {"filepath": "src/Illuminate/Cache/DatabaseLock.php", "language": "php", "file_size": 4680, "cut_index": 614, "middle_length": 229}} {"prefix": "ements LockProvider, Store\n{\n use InteractsWithTime;\n\n /**\n * A string that should be prepended to keys.\n *\n * @var string\n */\n protected $prefix;\n\n /**\n * The classes that should be allowed during unserialization.\n *\n * @var array|bool|null\n */\n protected $serializableClasses;\n\n /**\n * Create a new store instance.\n *\n * @param \\Aws\\DynamoDb\\DynamoDbClient $dynamo The DynamoDB client instance.\n * @param string $table The table name.\n ", "suffix": " name of the attribute that should hold the expiration timestamp.\n * @param string $prefix\n * @param array|bool|null $serializableClasses\n */\n public function __construct(\n protected DynamoDbClient $dynamo,\n protected $tabl", "middle": " * @param string $keyAttribute The name of the attribute that should hold the key.\n * @param string $valueAttribute The name of the attribute that should hold the value.\n * @param string $expirationAttribute The", "meta": {"filepath": "src/Illuminate/Cache/DynamoDbStore.php", "language": "php", "file_size": 16090, "cut_index": 921, "middle_length": 229}} {"prefix": "\nclass LuaScripts\n{\n /**\n * Get the Lua script that sets a key only when it does not yet exist.\n *\n * KEYS[1] - The name of the key\n * ARGV[1] - The value of the key\n * ARGV[2] - The number of seconds the key should be valid\n *\n * @return string\n */\n public static function add()\n {\n return <<<'LUA'\nreturn redis.call('exists',KEYS[1])<1 and redis.call('setex',KEYS[1],ARGV[2],ARGV[1])\nLUA;\n }\n\n /**\n * Get the Lua script to atomically release a lock.\n ", "suffix": "GV[1] - The owner key of the lock instance trying to release it\n *\n * @return string\n */\n public static function releaseLock()\n {\n return <<<'LUA'\nif redis.call(\"get\",KEYS[1]) == ARGV[1] then\n return redis.call(\"del\",KEYS[1])\nel", "middle": " *\n * KEYS[1] - The name of the lock\n * AR", "meta": {"filepath": "src/Illuminate/Cache/LuaScripts.php", "language": "php", "file_size": 888, "cut_index": 547, "middle_length": 52}} {"prefix": "implements LockProvider\n{\n use InteractsWithTime;\n\n /**\n * The Memcached instance.\n *\n * @var \\Memcached\n */\n protected $memcached;\n\n /**\n * A string that should be prepended to keys.\n *\n * @var string\n */\n protected $prefix;\n\n /**\n * Indicates whether we are using Memcached version >= 3.0.0.\n *\n * @var bool\n */\n protected $onVersionThree;\n\n /**\n * Create a new Memcached store.\n *\n * @param \\Memcached $memcached\n * @pa", "suffix": "hed', 'getMulti'))\n ->getNumberOfParameters() == 2;\n }\n\n /**\n * Retrieve an item from the cache by key.\n *\n * @param string $key\n * @return mixed\n */\n public function get($key)\n {\n $value = $this->memcach", "middle": "ram string $prefix\n */\n public function __construct($memcached, $prefix = '')\n {\n $this->setPrefix($prefix);\n $this->memcached = $memcached;\n\n $this->onVersionThree = (new ReflectionMethod('Memcac", "meta": {"filepath": "src/Illuminate/Cache/MemcachedStore.php", "language": "php", "file_size": 6574, "cut_index": 716, "middle_length": 229}} {"prefix": "Support\\InteractsWithTime;\n\nuse function Illuminate\\Support\\enum_value;\n\nclass RateLimiter\n{\n use InteractsWithTime;\n\n /**\n * The cache store implementation.\n *\n * @var \\Illuminate\\Contracts\\Cache\\Repository\n */\n protected $cache;\n\n /**\n * The configured limit object resolvers.\n *\n * @var array\n */\n protected $limiters = [];\n\n /**\n * Create a new rate limiter instance.\n *\n * @param \\Illuminate\\Contracts\\Cache\\Repository $cache\n */\n publi", "suffix": "@return $this\n */\n public function for($name, Closure $callback)\n {\n $resolvedName = $this->resolveLimiterName($name);\n\n $this->limiters[$resolvedName] = $callback;\n\n return $this;\n }\n\n /**\n * Get the given named ra", "middle": "c function __construct(Cache $cache)\n {\n $this->cache = $cache;\n }\n\n /**\n * Register a named rate limiter configuration.\n *\n * @param \\UnitEnum|string $name\n * @param \\Closure $callback\n * ", "meta": {"filepath": "src/Illuminate/Cache/RateLimiter.php", "language": "php", "file_size": 7890, "cut_index": 716, "middle_length": 229}} {"prefix": "te\\Cache;\n\nclass RedisLock extends Lock\n{\n /**\n * The Redis factory implementation.\n *\n * @var \\Illuminate\\Redis\\Connections\\Connection\n */\n protected $redis;\n\n /**\n * Create a new lock instance.\n *\n * @param \\Illuminate\\Redis\\Connections\\Connection $redis\n * @param string $name\n * @param int $seconds\n * @param string|null $owner\n */\n public function __construct($redis, $name, $seconds, $owner = null)\n {\n parent::__construct($name, $s", "suffix": "->redis->set($this->name, $this->owner, 'EX', $this->seconds, 'NX') == true;\n }\n\n return $this->redis->setnx($this->name, $this->owner) === 1;\n }\n\n /**\n * Release the lock.\n *\n * @return bool\n */\n public function rele", "middle": "econds, $owner);\n\n $this->redis = $redis;\n }\n\n /**\n * Attempt to acquire the lock.\n *\n * @return bool\n */\n public function acquire()\n {\n if ($this->seconds > 0) {\n return $this", "meta": {"filepath": "src/Illuminate/Cache/RedisLock.php", "language": "php", "file_size": 1759, "cut_index": 537, "middle_length": 229}} {"prefix": "hp\n\nnamespace Illuminate\\Validation\\Rules;\n\nuse Closure;\nuse InvalidArgumentException;\nuse Stringable;\n\nclass ProhibitedUnless implements Stringable\n{\n /**\n * The condition that validates the attribute.\n *\n * @var (\\Closure(): bool)|bool\n */\n public $condition;\n\n /**\n * Create a new prohibited validation rule based on a condition.\n *\n * @param (\\Closure(): bool)|bool $condition\n *\n * @throws \\InvalidArgumentException\n */\n public function __construct($con", "suffix": "le or boolean.');\n }\n }\n\n /**\n * Convert the rule to a validation string.\n *\n * @return string\n */\n public function __toString()\n {\n if (is_callable($this->condition)) {\n return call_user_func($this->con", "middle": "dition)\n {\n if ($condition instanceof Closure || is_bool($condition)) {\n $this->condition = $condition;\n } else {\n throw new InvalidArgumentException('The provided condition must be a callab", "meta": {"filepath": "src/Illuminate/Validation/Rules/ProhibitedUnless.php", "language": "php", "file_size": 1101, "cut_index": 515, "middle_length": 229}} {"prefix": "pace Illuminate\\Cache;\n\nclass ApcWrapper\n{\n /**\n * Get an item from the cache.\n *\n * @param string $key\n * @return mixed\n */\n public function get($key)\n {\n $fetchedValue = apcu_fetch($key, $success);\n\n return $success ? $fetchedValue : null;\n }\n\n /**\n * Store an item in the cache.\n *\n * @param string $key\n * @param mixed $value\n * @param int $seconds\n * @return bool\n */\n public function put($key, $value, $seconds)\n {\n", "suffix": "ion increment($key, $value)\n {\n return apcu_inc($key, $value);\n }\n\n /**\n * Decrement the value of an item in the cache.\n *\n * @param string $key\n * @param int $value\n * @return int|false\n */\n public function d", "middle": " return apcu_store($key, $value, $seconds);\n }\n\n /**\n * Increment the value of an item in the cache.\n *\n * @param string $key\n * @param int $value\n * @return int|false\n */\n public funct", "meta": {"filepath": "src/Illuminate/Cache/ApcWrapper.php", "language": "php", "file_size": 1433, "cut_index": 524, "middle_length": 229}} {"prefix": "te\\Cache;\n\nclass CacheLock extends Lock\n{\n /**\n * The cache store implementation.\n *\n * @var \\Illuminate\\Contracts\\Cache\\Store\n */\n protected $store;\n\n /**\n * Create a new lock instance.\n *\n * @param \\Illuminate\\Contracts\\Cache\\Store $store\n * @param string $name\n * @param int $seconds\n * @param string|null $owner\n */\n public function __construct($store, $name, $seconds, $owner = null)\n {\n parent::__construct($name, $seconds, $owner);", "suffix": " return $this->store->add(\n $this->name, $this->owner, $this->seconds\n );\n }\n\n if (! is_null($this->store->get($this->name))) {\n return false;\n }\n\n return ($this->seconds > 0)\n ", "middle": "\n\n $this->store = $store;\n }\n\n /**\n * Attempt to acquire the lock.\n *\n * @return bool\n */\n public function acquire()\n {\n if (method_exists($this->store, 'add') && $this->seconds > 0) {\n ", "meta": {"filepath": "src/Illuminate/Cache/CacheLock.php", "language": "php", "file_size": 1809, "cut_index": 537, "middle_length": 229}} {"prefix": "Support\\Arr;\nuse Illuminate\\Support\\Collection;\nuse Illuminate\\Support\\InteractsWithTime;\nuse Illuminate\\Support\\Str;\nuse RuntimeException;\n\nclass DatabaseStore implements CanFlushLocks, LockProvider, Store\n{\n use InteractsWithTime;\n\n /**\n * The database connection instance.\n *\n * @var \\Illuminate\\Database\\ConnectionInterface\n */\n protected $connection;\n\n /**\n * The database connection instance that should be used to manage locks.\n *\n * @var \\Illuminate\\Database\\Conne", "suffix": "var string\n */\n protected $prefix;\n\n /**\n * The name of the cache locks table.\n *\n * @var string\n */\n protected $lockTable;\n\n /**\n * An array representation of the lock lottery odds.\n *\n * @var array\n */\n ", "middle": "ctionInterface\n */\n protected $lockConnection;\n\n /**\n * The name of the cache table.\n *\n * @var string\n */\n protected $table;\n\n /**\n * A string that should be prepended to keys.\n *\n * @", "meta": {"filepath": "src/Illuminate/Cache/DatabaseStore.php", "language": "php", "file_size": 15981, "cut_index": 921, "middle_length": 229}} {"prefix": "k extends Lock\n{\n /**\n * Attempt to acquire the lock.\n *\n * @return bool\n */\n public function acquire()\n {\n return true;\n }\n\n /**\n * Release the lock.\n *\n * @return bool\n */\n public function release()\n {\n return true;\n }\n\n /**\n * Releases this lock in disregard of ownership.\n *\n * @return void\n */\n public function forceRelease()\n {\n //\n }\n\n /**\n * Determine if the lock is currently held by any pro", "suffix": "function isLocked(): bool\n {\n return false;\n }\n\n /**\n * Returns the owner value written into the driver for this lock.\n *\n * @return mixed\n */\n protected function getCurrentOwner()\n {\n return $this->owner;\n }", "middle": "cess.\n *\n * @return bool\n */\n public ", "meta": {"filepath": "src/Illuminate/Cache/NoLock.php", "language": "php", "file_size": 870, "cut_index": 559, "middle_length": 52}} {"prefix": "hp\n\nnamespace Illuminate\\Validation\\Rules;\n\nuse Closure;\nuse InvalidArgumentException;\nuse Stringable;\n\nclass ProhibitedIf implements Stringable\n{\n /**\n * The condition that validates the attribute.\n *\n * @var (\\Closure(): bool)|bool\n */\n public $condition;\n\n /**\n * Create a new prohibited validation rule based on a condition.\n *\n * @param (\\Closure(): bool)|bool $condition\n *\n * @throws \\InvalidArgumentException\n */\n public function __construct($conditi", "suffix": "r boolean.');\n }\n }\n\n /**\n * Convert the rule to a validation string.\n *\n * @return string\n */\n public function __toString()\n {\n if (is_callable($this->condition)) {\n return call_user_func($this->conditi", "middle": "on)\n {\n if ($condition instanceof Closure || is_bool($condition)) {\n $this->condition = $condition;\n } else {\n throw new InvalidArgumentException('The provided condition must be a callable o", "meta": {"filepath": "src/Illuminate/Validation/Rules/ProhibitedIf.php", "language": "php", "file_size": 1097, "cut_index": 515, "middle_length": 229}} {"prefix": "pace Illuminate\\Cache;\n\nuse Illuminate\\Contracts\\Support\\DeferrableProvider;\nuse Illuminate\\Support\\ServiceProvider;\nuse Symfony\\Component\\Cache\\Adapter\\Psr16Adapter;\n\nclass CacheServiceProvider extends ServiceProvider implements DeferrableProvider\n{\n /**\n * Register the service provider.\n *\n * @return void\n */\n public function register()\n {\n $this->app->singleton('cache', function ($app) {\n return new CacheManager($app);\n });\n\n $this->app->singleton(", "suffix": " $this->app->singleton('memcached.connector', function () {\n return new MemcachedConnector;\n });\n\n $this->app->singleton(RateLimiter::class, function ($app) {\n return new RateLimiter($app->make('cache')->driver(\n ", "middle": "'cache.store', function ($app) {\n return $app['cache']->driver();\n });\n\n $this->app->singleton('cache.psr6', function ($app) {\n return new Psr16Adapter($app['cache.store']);\n });\n\n ", "meta": {"filepath": "src/Illuminate/Cache/CacheServiceProvider.php", "language": "php", "file_size": 1350, "cut_index": 524, "middle_length": 229}} {"prefix": "\nnamespace Illuminate\\Validation\\Rules;\n\nuse Closure;\nuse InvalidArgumentException;\nuse Stringable;\n\nclass RequiredUnless implements Stringable\n{\n /**\n * The condition that validates the attribute.\n *\n * @var (\\Closure(): bool)|bool\n */\n public $condition;\n\n /**\n * Create a new required validation rule based on a condition.\n *\n * @param (\\Closure(): bool)|bool|null $condition\n *\n * @throws \\InvalidArgumentException\n */\n public function __construct($condi", "suffix": " throw new InvalidArgumentException('The provided condition must be a callable or boolean.');\n }\n }\n\n /**\n * Convert the rule to a validation string.\n *\n * @return string\n */\n public function __toString()\n {\n if (i", "middle": "tion)\n {\n if (is_null($condition)) {\n $condition = false;\n }\n\n if ($condition instanceof Closure || is_bool($condition)) {\n $this->condition = $condition;\n } else {\n ", "meta": {"filepath": "src/Illuminate/Validation/Rules/RequiredUnless.php", "language": "php", "file_size": 1176, "cut_index": 518, "middle_length": 229}} {"prefix": "te\\Validation\\Rules;\n\nuse Illuminate\\Database\\Eloquent\\Model;\nuse Illuminate\\Support\\Traits\\Conditionable;\nuse Stringable;\n\nclass Unique implements Stringable\n{\n use Conditionable, DatabaseRule;\n\n /**\n * The ID that should be ignored.\n *\n * @var mixed\n */\n protected $ignore;\n\n /**\n * The name of the ID column.\n *\n * @var string\n */\n protected $idColumn = 'id';\n\n /**\n * Ignore the given ID during the unique check.\n *\n * @param mixed $id\n * @", "suffix": "s->ignore = $id;\n $this->idColumn = $idColumn ?? 'id';\n\n return $this;\n }\n\n /**\n * Ignore the given model during the unique check.\n *\n * @param \\Illuminate\\Database\\Eloquent\\Model $model\n * @param string|null $idColu", "middle": "param string|null $idColumn\n * @return $this\n */\n public function ignore($id, $idColumn = null)\n {\n if ($id instanceof Model) {\n return $this->ignoreModel($id, $idColumn);\n }\n\n $thi", "meta": {"filepath": "src/Illuminate/Validation/Rules/Unique.php", "language": "php", "file_size": 1659, "cut_index": 537, "middle_length": 229}} {"prefix": "\nclass MemcachedConnector\n{\n /**\n * Create a new Memcached connection.\n *\n * @param array $servers\n * @param string|null $connectionId\n * @param array $options\n * @param array $credentials\n * @return \\Memcached\n */\n public function connect(array $servers, $connectionId = null, array $options = [], array $credentials = [])\n {\n $memcached = $this->getMemcached(\n $connectionId, $credentials, $options\n );\n\n if (! $memcached->getSer", "suffix": " connection is successful and return it back.\n foreach ($servers as $server) {\n $memcached->addServer(\n $server['host'], $server['port'], $server['weight']\n );\n }\n }\n\n ret", "middle": "verList()) {\n // For each server in the array, we'll just extract the configuration and add\n // the server to the Memcached connection. Once we have added all of these\n // servers we'll verify the", "meta": {"filepath": "src/Illuminate/Cache/MemcachedConnector.php", "language": "php", "file_size": 2382, "cut_index": 563, "middle_length": 229}} {"prefix": "minate\\Http\\UploadedFile;\n\nclass File extends UploadedFile\n{\n /**\n * The name of the file.\n *\n * @var string\n */\n public $name;\n\n /**\n * The temporary file resource.\n *\n * @var resource\n */\n public $tempFile;\n\n /**\n * The \"size\" to report.\n *\n * @var int\n */\n public $sizeToReport;\n\n /**\n * The MIME type to report.\n *\n * @var string|null\n */\n public $mimeTypeToReport;\n\n /**\n * Create a new file instance.\n *\n ", "suffix": " $this->tempFilePath(), $name, $this->getMimeType(),\n null, true\n );\n }\n\n /**\n * Create a new fake file.\n *\n * @param string $name\n * @param string|int $kilobytes\n * @return \\Illuminate\\Http\\Testing\\File\n ", "middle": " * @param string $name\n * @param resource $tempFile\n */\n public function __construct($name, $tempFile)\n {\n $this->name = $name;\n $this->tempFile = $tempFile;\n\n parent::__construct(\n ", "meta": {"filepath": "src/Illuminate/Http/Testing/File.php", "language": "php", "file_size": 2905, "cut_index": 563, "middle_length": 229}} {"prefix": "hp\n\nnamespace Illuminate\\Http\\Resources\\JsonApi\\Exceptions;\n\nuse RuntimeException;\n\nclass ResourceIdentificationException extends RuntimeException\n{\n /**\n * Create an exception indicating we were unable to determine the resource ID for the given resource.\n *\n * @param mixed $resource\n * @return self\n */\n public static function attemptingToDetermineIdFor($resource)\n {\n $resourceType = is_object($resource) ? $resource::class : gettype($resource);\n\n return new self(", "suffix": " * @param mixed $resource\n * @return self\n */\n public static function attemptingToDetermineTypeFor($resource)\n {\n $resourceType = is_object($resource) ? $resource::class : gettype($resource);\n\n return new self(sprintf(\n ", "middle": "sprintf(\n 'Unable to resolve resource object ID for [%s].', $resourceType\n ));\n }\n\n /**\n * Create an exception indicating we were unable to determine the resource type for the given resource.\n *\n ", "meta": {"filepath": "src/Illuminate/Http/Resources/JsonApi/Exceptions/ResourceIdentificationException.php", "language": "php", "file_size": 1093, "cut_index": 515, "middle_length": 229}} {"prefix": "se Illuminate\\Support\\Arr;\n\nclass PaginatedResourceResponse extends ResourceResponse\n{\n /**\n * Create an HTTP response that represents the object.\n *\n * @param \\Illuminate\\Http\\Request $request\n * @return \\Illuminate\\Http\\JsonResponse\n */\n public function toResponse($request)\n {\n return tap(response()->json(\n $this->wrap(\n $this->resource->resolve($request),\n array_merge_recursive(\n $this->paginationInformation", "suffix": "jsonOptions()\n ), function ($response) use ($request) {\n $response->original = $this->resource->resource->map(function ($item) {\n if (is_array($item)) {\n return Arr::get($item, 'resource');\n ", "middle": "($request),\n $this->resource->with($request),\n $this->resource->additional\n )\n ),\n $this->calculateStatus(),\n [],\n $this->resource->", "meta": {"filepath": "src/Illuminate/Http/Resources/Json/PaginatedResourceResponse.php", "language": "php", "file_size": 2783, "cut_index": 563, "middle_length": 229}} {"prefix": "minate\\Http\\Resources\\CollectsResources;\nuse Illuminate\\Pagination\\AbstractCursorPaginator;\nuse Illuminate\\Pagination\\AbstractPaginator;\nuse IteratorAggregate;\n\nclass ResourceCollection extends JsonResource implements Countable, IteratorAggregate\n{\n use CollectsResources;\n\n /**\n * The resource that this resource collects.\n *\n * @var string\n */\n public $collects;\n\n /**\n * The mapped collection instance.\n *\n * @var \\Illuminate\\Support\\Collection|null\n */\n public ", "suffix": "ameters that should be added to the pagination links.\n *\n * @var array|null\n */\n protected $queryParameters;\n\n /**\n * Create a new resource instance.\n *\n * @param mixed $resource\n */\n public function __construct($reso", "middle": "$collection;\n\n /**\n * Indicates if all existing request query parameters should be added to pagination links.\n *\n * @var bool\n */\n protected $preserveAllQueryParameters = false;\n\n /**\n * The query par", "meta": {"filepath": "src/Illuminate/Http/Resources/Json/ResourceCollection.php", "language": "php", "file_size": 3499, "cut_index": 614, "middle_length": 229}} {"prefix": "aits\\Macroable;\nuse InvalidArgumentException;\n\nclass Repository implements ArrayAccess, ConfigContract\n{\n use Macroable;\n\n /**\n * All of the configuration items.\n *\n * @var array\n */\n protected $items = [];\n\n /**\n * Create a new configuration repository.\n *\n * @param array $items\n */\n public function __construct(array $items = [])\n {\n $this->items = $items;\n }\n\n /**\n * Determine if the given configuration value exists.\n *", "suffix": "ring $key\n * @param mixed $default\n * @return mixed\n */\n public function get($key, $default = null)\n {\n if (is_array($key)) {\n return $this->getMany($key);\n }\n\n return Arr::get($this->items, $key, $defau", "middle": "\n * @param string $key\n * @return bool\n */\n public function has($key)\n {\n return Arr::has($this->items, $key);\n }\n\n /**\n * Get the specified configuration value.\n *\n * @param array|st", "meta": {"filepath": "src/Illuminate/Config/Repository.php", "language": "php", "file_size": 7194, "cut_index": 716, "middle_length": 229}} {"prefix": "s\\Connectors\\PredisConnector;\nuse Illuminate\\Support\\Arr;\nuse Illuminate\\Support\\ConfigurationUrlParser;\nuse Illuminate\\Support\\RebindsCallbacksToSelf;\nuse InvalidArgumentException;\nuse ReflectionException;\nuse RuntimeException;\n\nuse function Illuminate\\Support\\enum_value;\n\n/**\n * @mixin \\Illuminate\\Redis\\Connections\\Connection\n */\nclass RedisManager implements Factory\n{\n use RebindsCallbacksToSelf;\n\n /**\n * The application instance.\n *\n * @var \\Illuminate\\Contracts\\Foundation\\Application\n", "suffix": "ected $customCreators = [];\n\n /**\n * The Redis server configurations.\n *\n * @var array\n */\n protected $config;\n\n /**\n * The Redis connections.\n *\n * @var mixed\n */\n protected $connections;\n\n /**\n * Indicat", "middle": " */\n protected $app;\n\n /**\n * The name of the default driver.\n *\n * @var string\n */\n protected $driver;\n\n /**\n * The registered custom driver creators.\n *\n * @var array\n */\n prot", "meta": {"filepath": "src/Illuminate/Redis/RedisManager.php", "language": "php", "file_size": 7094, "cut_index": 716, "middle_length": 229}} {"prefix": "\nuse Illuminate\\Contracts\\Support\\DeferrableProvider;\nuse Illuminate\\Support\\Arr;\nuse Illuminate\\Support\\ServiceProvider;\n\nclass RedisServiceProvider extends ServiceProvider implements DeferrableProvider\n{\n /**\n * Register the service provider.\n *\n * @return void\n */\n public function register()\n {\n $this->app->singleton('redis', function ($app) {\n $config = $app->make('config')->get('database.redis', []);\n\n return new RedisManager($app, Arr::pull($config", "suffix": " $this->app->bind('redis.connection', function ($app) {\n return $app['redis']->connection();\n });\n }\n\n /**\n * Get the services provided by the provider.\n *\n * @return array\n */\n public function provides()\n {", "middle": ", 'client', 'phpredis'), $config);\n });\n\n ", "meta": {"filepath": "src/Illuminate/Redis/RedisServiceProvider.php", "language": "php", "file_size": 910, "cut_index": 547, "middle_length": 52}} {"prefix": "ate\\Redis\\Limiters\\ConcurrencyLimiterBuilder;\nuse Illuminate\\Redis\\Limiters\\DurationLimiterBuilder;\nuse Illuminate\\Support\\Traits\\Macroable;\nuse Throwable;\n\n/**\n * @mixin \\Redis\n */\nabstract class Connection\n{\n use Macroable {\n __call as macroCall;\n }\n\n /**\n * The Redis client.\n *\n * @var \\Redis\n */\n protected $client;\n\n /**\n * The Redis connection name.\n *\n * @var string|null\n */\n protected $name;\n\n /**\n * The event dispatcher instance.\n *", "suffix": "allback\n * @param string $method\n * @return void\n */\n abstract public function createSubscription($channels, Closure $callback, $method = 'subscribe');\n\n /**\n * Funnel a callback for a maximum number of simultaneous executions.\n ", "middle": "\n * @var \\Illuminate\\Contracts\\Events\\Dispatcher|null\n */\n protected $events;\n\n /**\n * Subscribe to a set of given channels for messages.\n *\n * @param array|string $channels\n * @param \\Closure $c", "meta": {"filepath": "src/Illuminate/Redis/Connections/Connection.php", "language": "php", "file_size": 6426, "cut_index": 716, "middle_length": 229}} {"prefix": "* @var bool|null\n */\n protected $supportsPacking;\n\n /**\n * Indicates if Redis supports LZF compression.\n *\n * @var bool|null\n */\n protected $supportsLzf;\n\n /**\n * Indicates if Redis supports Zstd compression.\n *\n * @var bool|null\n */\n protected $supportsZstd;\n\n /**\n * Prepares the given values to be used with the `eval` command, including serialization and compression.\n *\n * @param array $values\n * @return arraysupportsPacking()) {\n return array_map($this->client->_pack(...), $values);\n }\n\n if ($this->compressed()) {\n if ($this->supportsLzf() && $this->lzfCompressed()) {\n if (! function_exists('lzf", "middle": "tring,string>\n *\n * @throws \\RuntimeException\n * @throws \\UnexpectedValueException\n */\n public function pack(array $values): array\n {\n if (empty($values)) {\n return $values;\n }\n\n ", "meta": {"filepath": "src/Illuminate/Redis/Connections/PacksPhpRedisValues.php", "language": "php", "file_size": 6566, "cut_index": 716, "middle_length": 229}} {"prefix": " InvalidArgumentException;\n\nclass PhpRedisClusterConnection extends PhpRedisConnection\n{\n /**\n * The RedisCluster client.\n *\n * @var \\RedisCluster\n */\n protected $client;\n\n /**\n * The default node to use from the cluster.\n *\n * @var string|array\n */\n protected $defaultNode;\n\n /**\n * Scan all keys based on the given options.\n *\n * @param mixed $cursor\n * @param array $options\n * @return mixed\n *\n * @throws \\InvalidArgumentExceptio", "suffix": " $options['count'] ?? 10\n );\n\n if ($result === false) {\n $result = [];\n }\n\n return $cursor === 0 && empty($result) ? false : [$cursor, $result];\n }\n\n /**\n * Flush the selected Redis database on all master", "middle": "n\n */\n #[\\Override]\n public function scan($cursor, $options = [])\n {\n $result = $this->client->scan($cursor,\n $options['node'] ?? $this->defaultNode(),\n $options['match'] ?? '*',\n ", "meta": {"filepath": "src/Illuminate/Redis/Connections/PhpRedisClusterConnection.php", "language": "php", "file_size": 2115, "cut_index": 563, "middle_length": 229}} {"prefix": "callable\n */\n protected $connector;\n\n /**\n * The connection configuration array.\n *\n * @var array\n */\n protected $config;\n\n /**\n * Create a new PhpRedis connection.\n *\n * @param \\Redis $client\n * @param callable|null $connector\n * @param array $config\n */\n public function __construct($client, ?callable $connector = null, array $config = [])\n {\n $this->client = $client;\n $this->config = $config;\n $this->connector = $conn", "suffix": "return $result !== false ? $result : null;\n }\n\n /**\n * Get the values of all the given keys.\n *\n * @param array $keys\n * @return array\n */\n public function mget(array $keys)\n {\n return array_map(function ($value) {\n", "middle": "ector;\n }\n\n /**\n * Returns the value of the given key.\n *\n * @param string $key\n * @return string|null\n */\n public function get($key)\n {\n $result = $this->command('get', [$key]);\n\n ", "meta": {"filepath": "src/Illuminate/Redis/Connections/PhpRedisConnection.php", "language": "php", "file_size": 14303, "cut_index": 921, "middle_length": 229}} {"prefix": "\nnamespace Illuminate\\Redis\\Connections;\n\nuse Predis\\Command\\Redis\\FLUSHDB;\nuse Predis\\Command\\ServerFlushDatabase;\n\nclass PredisClusterConnection extends PredisConnection\n{\n /**\n * Get the keys that match the given pattern.\n *\n * @param string $pattern\n * @return array\n */\n public function keys(string $pattern)\n {\n $keys = [];\n\n foreach ($this->client as $node) {\n $keys[] = $node->keys($pattern);\n }\n\n return array_merge(...$keys);\n }\n", "suffix": "atabase::class\n : FLUSHDB::class;\n\n foreach ($this->client as $node) {\n $node->executeCommand(tap(new $command)->setArguments(func_get_args()));\n }\n }\n\n /**\n * Determine if the connection is a cluster connectio", "middle": "\n /**\n * Flush the selected Redis database on all cluster nodes.\n *\n * @return void\n */\n public function flushdb()\n {\n $command = class_exists(ServerFlushDatabase::class)\n ? ServerFlushD", "meta": {"filepath": "src/Illuminate/Redis/Connections/PredisClusterConnection.php", "language": "php", "file_size": 1125, "cut_index": 518, "middle_length": 229}} {"prefix": "te\\Redis\\Connections;\n\nuse Closure;\nuse Illuminate\\Contracts\\Redis\\Connection as ConnectionContract;\nuse Illuminate\\Support\\Collection;\nuse Predis\\Command\\Argument\\ArrayableArgument;\n\n/**\n * @mixin \\Predis\\Client\n */\nclass PredisConnection extends Connection implements ConnectionContract\n{\n /**\n * The Predis client.\n *\n * @var \\Predis\\Client\n */\n protected $client;\n\n /**\n * Create a new Predis connection.\n *\n * @param \\Predis\\Client $client\n */\n public function ", "suffix": "string $method\n * @return void\n */\n public function createSubscription($channels, Closure $callback, $method = 'subscribe')\n {\n $loop = $this->pubSubLoop();\n\n $loop->{$method}(...array_values((array) $channels));\n\n forea", "middle": "__construct($client)\n {\n $this->client = $client;\n }\n\n /**\n * Subscribe to a set of given channels for messages.\n *\n * @param array|string $channels\n * @param \\Closure $callback\n * @param ", "meta": {"filepath": "src/Illuminate/Redis/Connections/PredisConnection.php", "language": "php", "file_size": 1723, "cut_index": 537, "middle_length": 229}} {"prefix": "se Illuminate\\Redis\\Connections\\Connection;\nuse Illuminate\\Support\\Sleep;\nuse Illuminate\\Support\\Str;\nuse Throwable;\n\nclass ConcurrencyLimiter\n{\n /**\n * The Redis factory implementation.\n *\n * @var \\Illuminate\\Redis\\Connections\\Connection\n */\n protected $redis;\n\n /**\n * The name of the limiter.\n *\n * @var string\n */\n protected $name;\n\n /**\n * The allowed number of concurrent tasks.\n *\n * @var int\n */\n protected $maxLocks;\n\n /**\n * The ", "suffix": "\n /**\n * Create a new concurrency limiter instance.\n *\n * @param \\Illuminate\\Redis\\Connections\\Connection $redis\n * @param string $name\n * @param int $maxLocks\n * @param int $releaseAfter\n */\n public function __con", "middle": "number of seconds a slot should be maintained.\n *\n * @var int\n */\n protected $releaseAfter;\n\n /**\n * The cluster-safe key prefix for lock slots.\n *\n * @var string|null\n */\n protected $prefix;\n", "meta": {"filepath": "src/Illuminate/Redis/Limiters/ConcurrencyLimiter.php", "language": "php", "file_size": 4552, "cut_index": 614, "middle_length": 229}} {"prefix": "se Illuminate\\Support\\InteractsWithTime;\n\nclass ConcurrencyLimiterBuilder\n{\n use InteractsWithTime;\n\n /**\n * The Redis connection.\n *\n * @var \\Illuminate\\Redis\\Connections\\Connection\n */\n public $connection;\n\n /**\n * The name of the lock.\n *\n * @var string\n */\n public $name;\n\n /**\n * The maximum number of entities that can hold the lock at the same time.\n *\n * @var int\n */\n public $maxLocks;\n\n /**\n * The number of seconds to maintai", "suffix": "t = 3;\n\n /**\n * The number of milliseconds to wait between attempts to acquire the lock.\n *\n * @var int\n */\n public $sleep = 250;\n\n /**\n * Create a new builder instance.\n *\n * @param \\Illuminate\\Redis\\Connections\\Conne", "middle": "n the lock until it is automatically released.\n *\n * @var int\n */\n public $releaseAfter = 60;\n\n /**\n * The amount of time to block until a lock is available.\n *\n * @var int\n */\n public $timeou", "meta": {"filepath": "src/Illuminate/Redis/Limiters/ConcurrencyLimiterBuilder.php", "language": "php", "file_size": 3078, "cut_index": 614, "middle_length": 229}} {"prefix": "se Illuminate\\Support\\Sleep;\n\nclass DurationLimiter\n{\n /**\n * The Redis factory implementation.\n *\n * @var \\Illuminate\\Redis\\Connections\\Connection\n */\n private $redis;\n\n /**\n * The unique name of the lock.\n *\n * @var string\n */\n private $name;\n\n /**\n * The allowed number of concurrent tasks.\n *\n * @var int\n */\n private $maxLocks;\n\n /**\n * The number of seconds a slot should be maintained.\n *\n * @var int\n */\n private $de", "suffix": " /**\n * Create a new duration limiter instance.\n *\n * @param \\Illuminate\\Redis\\Connections\\Connection $redis\n * @param string $name\n * @param int $maxLocks\n * @param int $decay\n */\n public function __construct($redis,", "middle": "cay;\n\n /**\n * The timestamp of the end of the current duration.\n *\n * @var int\n */\n public $decaysAt;\n\n /**\n * The number of remaining slots.\n *\n * @var int\n */\n public $remaining;\n\n ", "meta": {"filepath": "src/Illuminate/Redis/Limiters/DurationLimiter.php", "language": "php", "file_size": 4696, "cut_index": 614, "middle_length": 229}} {"prefix": "luminate\\Contracts\\Redis\\LimiterTimeoutException;\nuse Illuminate\\Support\\InteractsWithTime;\n\nclass DurationLimiterBuilder\n{\n use InteractsWithTime;\n\n /**\n * The Redis connection.\n *\n * @var \\Illuminate\\Redis\\Connections\\Connection\n */\n public $connection;\n\n /**\n * The name of the lock.\n *\n * @var string\n */\n public $name;\n\n /**\n * The maximum number of locks that can be obtained per time window.\n *\n * @var int\n */\n public $maxLocks;\n\n /", "suffix": "ut = 3;\n\n /**\n * The number of milliseconds to wait between attempts to acquire the lock.\n *\n * @var int\n */\n public $sleep = 750;\n\n /**\n * Create a new builder instance.\n *\n * @param \\Illuminate\\Redis\\Connections\\Conn", "middle": "**\n * The amount of time the lock window is maintained.\n *\n * @var int\n */\n public $decay;\n\n /**\n * The amount of time to block until a lock is available.\n *\n * @var int\n */\n public $timeo", "meta": {"filepath": "src/Illuminate/Redis/Limiters/DurationLimiterBuilder.php", "language": "php", "file_size": 3011, "cut_index": 563, "middle_length": 229}} {"prefix": "ector implements Connector\n{\n /**\n * Create a new connection.\n *\n * @param array $config\n * @param array $options\n * @return \\Illuminate\\Redis\\Connections\\PhpRedisConnection\n */\n public function connect(array $config, array $options)\n {\n $formattedOptions = Arr::pull($config, 'options', []);\n\n if (isset($config['prefix'])) {\n $formattedOptions['prefix'] = $config['prefix'];\n }\n\n $connector = function () use ($config, $options, $form", "suffix": "\n /**\n * Create a new clustered PhpRedis connection.\n *\n * @param array $config\n * @param array $clusterOptions\n * @param array $options\n * @return \\Illuminate\\Redis\\Connections\\PhpRedisClusterConnection\n */\n public ", "middle": "attedOptions) {\n return $this->createClient(array_merge(\n $config, $options, $formattedOptions\n ));\n };\n\n return new PhpRedisConnection($connector(), $connector, $config);\n }\n", "meta": {"filepath": "src/Illuminate/Redis/Connectors/PhpRedisConnector.php", "language": "php", "file_size": 12612, "cut_index": 921, "middle_length": 229}} {"prefix": "Illuminate\\Contracts\\Redis\\Connector;\nuse Illuminate\\Redis\\Connections\\PredisClusterConnection;\nuse Illuminate\\Redis\\Connections\\PredisConnection;\nuse Illuminate\\Support\\Arr;\nuse Illuminate\\Support\\Str;\nuse InvalidArgumentException;\nuse Predis\\Client;\n\nclass PredisConnector implements Connector\n{\n /**\n * Create a new connection.\n *\n * @param array $config\n * @param array $options\n * @return \\Illuminate\\Redis\\Connections\\PredisConnection\n */\n public function connect(array $c", "suffix": "'prefix'] = $config['prefix'];\n }\n\n $config = $this->formatHost($config);\n\n return new PredisConnection(new Client($config, $formattedOptions));\n }\n\n /**\n * Create a new clustered Predis connection.\n *\n * @param arra", "middle": "onfig, array $options)\n {\n $formattedOptions = array_merge(\n ['timeout' => 10.0], $options, Arr::pull($config, 'options', [])\n );\n\n if (isset($config['prefix'])) {\n $formattedOptions[", "meta": {"filepath": "src/Illuminate/Redis/Connectors/PredisConnector.php", "language": "php", "file_size": 2654, "cut_index": 563, "middle_length": 229}} {"prefix": "\nnamespace Illuminate\\Redis\\Events;\n\nclass CommandExecuted\n{\n /**\n * The Redis command that was executed.\n *\n * @var string\n */\n public $command;\n\n /**\n * The array of command parameters.\n *\n * @var array\n */\n public $parameters;\n\n /**\n * The number of milliseconds it took to execute the command.\n *\n * @var float\n */\n public $time;\n\n /**\n * The Redis connection instance.\n *\n * @var \\Illuminate\\Redis\\Connections\\Connection\n ", "suffix": " array $parameters\n * @param float|null $time\n * @param \\Illuminate\\Redis\\Connections\\Connection $connection\n */\n public function __construct($command, $parameters, $time, $connection)\n {\n $this->time = $time;\n $this->", "middle": "*/\n public $connection;\n\n /**\n * The Redis connection name.\n *\n * @var string\n */\n public $connectionName;\n\n /**\n * Create a new event instance.\n *\n * @param string $command\n * @param", "meta": {"filepath": "src/Illuminate/Redis/Events/CommandExecuted.php", "language": "php", "file_size": 1169, "cut_index": 518, "middle_length": 229}} {"prefix": "\nnamespace Illuminate\\Redis\\Events;\n\nuse Throwable;\n\nclass CommandFailed\n{\n /**\n * The Redis command that failed.\n *\n * @var string\n */\n public $command;\n\n /**\n * The array of command parameters.\n *\n * @var array\n */\n public $parameters;\n\n /**\n * The exception that was thrown.\n *\n * @var \\Throwable\n */\n public $exception;\n\n /**\n * The Redis connection instance.\n *\n * @var \\Illuminate\\Redis\\Connections\\Connection\n */\n pub", "suffix": "parameters\n * @param \\Throwable $exception\n * @param \\Illuminate\\Redis\\Connections\\Connection $connection\n */\n public function __construct($command, $parameters, Throwable $exception, $connection)\n {\n $this->command = $command;", "middle": "lic $connection;\n\n /**\n * The Redis connection name.\n *\n * @var string\n */\n public $connectionName;\n\n /**\n * Create a new event instance.\n *\n * @param string $command\n * @param array $", "meta": {"filepath": "src/Illuminate/Redis/Events/CommandFailed.php", "language": "php", "file_size": 1189, "cut_index": 518, "middle_length": 229}} {"prefix": "een registered.\n *\n * @var bool\n */\n protected $registered = false;\n\n /**\n * The namespace for all real-time facades.\n *\n * @var string\n */\n protected static $facadeNamespace = 'Facades\\\\';\n\n /**\n * The singleton instance of the loader.\n *\n * @var \\Illuminate\\Foundation\\AliasLoader\n */\n protected static $instance;\n\n /**\n * Create a new AliasLoader instance.\n *\n * @param array $aliases\n */\n private function __construct($aliase", "suffix": "c function getInstance(array $aliases = [])\n {\n if (is_null(static::$instance)) {\n return static::$instance = new static($aliases);\n }\n\n $aliases = array_merge(static::$instance->getAliases(), $aliases);\n\n static::", "middle": "s)\n {\n $this->aliases = $aliases;\n }\n\n /**\n * Get or create the singleton alias loader instance.\n *\n * @param array $aliases\n * @return \\Illuminate\\Foundation\\AliasLoader\n */\n public stati", "meta": {"filepath": "src/Illuminate/Foundation/AliasLoader.php", "language": "php", "file_size": 5459, "cut_index": 716, "middle_length": 229}} {"prefix": " CachesRoutes, HttpKernelInterface\n{\n use Macroable;\n\n /**\n * The Laravel framework version.\n *\n * @var string\n */\n const VERSION = '13.12.0';\n\n /**\n * The base path for the Laravel installation.\n *\n * @var string\n */\n protected $basePath;\n\n /**\n * The array of registered callbacks.\n *\n * @var callable[]\n */\n protected $registeredCallbacks = [];\n\n /**\n * Indicates if the application has been bootstrapped before.\n *\n * @var b", "suffix": " *\n * @var callable[]\n */\n protected $bootingCallbacks = [];\n\n /**\n * The array of booted callbacks.\n *\n * @var callable[]\n */\n protected $bootedCallbacks = [];\n\n /**\n * The array of terminating callbacks.\n *\n ", "middle": "ool\n */\n protected $hasBeenBootstrapped = false;\n\n /**\n * Indicates if the application has \"booted\".\n *\n * @var bool\n */\n protected $booted = false;\n\n /**\n * The array of booting callbacks.\n ", "meta": {"filepath": "src/Illuminate/Foundation/Application.php", "language": "php", "file_size": 47222, "cut_index": 2151, "middle_length": 229}} {"prefix": "nate\\Contracts\\Cache\\Factory;\nuse Illuminate\\Contracts\\Cache\\Repository;\nuse Illuminate\\Contracts\\Foundation\\MaintenanceMode;\n\nclass CacheBasedMaintenanceMode implements MaintenanceMode\n{\n /**\n * The cache factory.\n *\n * @var \\Illuminate\\Contracts\\Cache\\Factory\n */\n protected $cache;\n\n /**\n * The cache store that should be utilized.\n *\n * @var string\n */\n protected $store;\n\n /**\n * The cache key to use when storing maintenance mode information.\n *\n ", "suffix": "ring $key\n */\n public function __construct(Factory $cache, string $store, string $key)\n {\n $this->cache = $cache;\n $this->store = $store;\n $this->key = $key;\n }\n\n /**\n * Take the application down for maintenance.\n ", "middle": "* @var string\n */\n protected $key;\n\n /**\n * Create a new cache based maintenance mode implementation.\n *\n * @param \\Illuminate\\Contracts\\Cache\\Factory $cache\n * @param string $store\n * @param st", "meta": {"filepath": "src/Illuminate/Foundation/CacheBasedMaintenanceMode.php", "language": "php", "file_size": 2093, "cut_index": 563, "middle_length": 229}} {"prefix": "e\\Foundation\\Bootstrap\\LoadConfiguration;\nuse Illuminate\\Foundation\\Cloud\\Events;\nuse Illuminate\\Foundation\\Cloud\\FailedJobProvider;\nuse Illuminate\\Foundation\\Cloud\\QueueConnector;\nuse Illuminate\\Queue\\Connectors\\SqsConnector;\nuse Monolog\\Handler\\SocketHandler;\nuse PDO;\n\nclass Cloud\n{\n /**\n * Handle a bootstrapper that is bootstrapping.\n */\n public static function bootstrapperBootstrapping(Application $app, string $bootstrapper): void\n {\n (match ($bootstrapper) {\n BootProv", "suffix": "*/\n public static function bootstrapperBootstrapped(Application $app, string $bootstrapper): void\n {\n (match ($bootstrapper) {\n LoadConfiguration::class => function () use ($app) {\n static::configureDisks($app);\n ", "middle": "iders::class => function () use ($app) {\n static::bootManagedQueues($app);\n },\n default => fn () => true,\n })();\n }\n\n /**\n * Handle a bootstrapper that has bootstrapped.\n ", "meta": {"filepath": "src/Illuminate/Foundation/Cloud.php", "language": "php", "file_size": 7246, "cut_index": 716, "middle_length": 229}} {"prefix": "ace;\nuse Composer\\Script\\Event;\nuse Illuminate\\Concurrency\\ProcessDriver;\nuse Illuminate\\Encryption\\EncryptionServiceProvider;\nuse Illuminate\\Foundation\\Bootstrap\\LoadConfiguration;\nuse Illuminate\\Foundation\\Bootstrap\\LoadEnvironmentVariables;\nuse Throwable;\n\nclass ComposerScripts\n{\n /**\n * Handle the post-install Composer event.\n *\n * @param \\Composer\\Script\\Event $event\n * @return void\n */\n public static function postInstall(Event $event)\n {\n require_once $event->getC", "suffix": " */\n public static function postUpdate(Event $event)\n {\n require_once $event->getComposer()->getConfig()->get('vendor-dir').'/autoload.php';\n\n static::clearCompiled();\n }\n\n /**\n * Handle the post-autoload-dump Composer event", "middle": "omposer()->getConfig()->get('vendor-dir').'/autoload.php';\n\n static::clearCompiled();\n }\n\n /**\n * Handle the post-update Composer event.\n *\n * @param \\Composer\\Script\\Event $event\n * @return void\n ", "meta": {"filepath": "src/Illuminate/Foundation/ComposerScripts.php", "language": "php", "file_size": 3558, "cut_index": 614, "middle_length": 229}} {"prefix": "te\\Foundation;\n\nuse Closure;\n\nclass EnvironmentDetector\n{\n /**\n * Detect the application's current environment.\n *\n * @param \\Closure $callback\n * @param array|null $consoleArgs\n * @return string\n */\n public function detect(Closure $callback, $consoleArgs = null)\n {\n if ($consoleArgs) {\n return $this->detectConsoleEnvironment($callback, $consoleArgs);\n }\n\n return $this->detectWebEnvironment($callback);\n }\n\n /**\n * Set the applica", "suffix": "t the application environment from command-line arguments.\n *\n * @param \\Closure $callback\n * @param array $args\n * @return string\n */\n protected function detectConsoleEnvironment(Closure $callback, array $args)\n {\n // ", "middle": "tion environment for a web request.\n *\n * @param \\Closure $callback\n * @return string\n */\n protected function detectWebEnvironment(Closure $callback)\n {\n return $callback();\n }\n\n /**\n * Se", "meta": {"filepath": "src/Illuminate/Foundation/EnvironmentDetector.php", "language": "php", "file_size": 1938, "cut_index": 537, "middle_length": 229}} {"prefix": "pace Illuminate\\Foundation;\n\nuse Illuminate\\Contracts\\Foundation\\MaintenanceMode as MaintenanceModeContract;\n\nclass FileBasedMaintenanceMode implements MaintenanceModeContract\n{\n /**\n * Take the application down for maintenance.\n *\n * @param array $payload\n * @return void\n */\n public function activate(array $payload): void\n {\n file_put_contents(\n $this->path(),\n json_encode($payload, JSON_PRETTY_PRINT)\n );\n }\n\n /**\n * Take the appl", "suffix": "ation is currently down for maintenance.\n *\n * @return bool\n */\n public function active(): bool\n {\n return file_exists($this->path());\n }\n\n /**\n * Get the data array which was provided when the application was placed into", "middle": "ication out of maintenance.\n *\n * @return void\n */\n public function deactivate(): void\n {\n if ($this->active()) {\n unlink($this->path());\n }\n }\n\n /**\n * Determine if the applic", "meta": {"filepath": "src/Illuminate/Foundation/FileBasedMaintenanceMode.php", "language": "php", "file_size": 1422, "cut_index": 524, "middle_length": 229}} {"prefix": " .~)>>\n .~))))>>>\n .~))>> ___\n .~))>>)))>> .-~))>>\n .~)))))>> .-~))>>)>\n .~)))>>))))>> .-~)>>)>\n ) .~))>>))))>> .-~)))))>>)>\n ( )@@*) //)>)))))) .-~))))>>)>\n ).@(@@ ", "suffix": " (\\_(\\-\\b |))>)) //)))>>)))))))>>)>\n (( @@@(.@(@ . _/`-` ~|b |>))) //)>>)))))))>>)>\n )* @@@ )@* (@) (@) /\\b|))) //))))))>>))))>>\n (( @. )@( @ . _/ / / \\b)) //))>>)))))>>>_._\n )@@ (@@*)@@. (6///6)- / ^ \\b)//))))))>>)))>> ", "middle": " //))>>))) .-~))>>)))))>>)>\n (( @.@). //))))) .-~)>>)))))>>)>\n )) )@@*.@@ ) //)>))) //))))))>>))))>>)>\n (( ((@@@.@@ |/))))) //)))))>>)))>>)>\n )) @@*. )@@ ) ", "meta": {"filepath": "src/Illuminate/Foundation/Inspiring.php", "language": "php", "file_size": 6832, "cut_index": 716, "middle_length": 229}} {"prefix": "\nnamespace Illuminate\\Foundation;\n\nuse Illuminate\\Support\\Manager;\n\nclass MaintenanceModeManager extends Manager\n{\n /**\n * Create an instance of the file based maintenance driver.\n *\n * @return \\Illuminate\\Foundation\\FileBasedMaintenanceMode\n */\n protected function createFileDriver(): FileBasedMaintenanceMode\n {\n return new FileBasedMaintenanceMode();\n }\n\n /**\n * Create an instance of the cache based maintenance driver.\n *\n * @return \\Illuminate\\Foundation\\C", "suffix": "eMode(\n $this->container->make('cache'),\n $this->config->get('app.maintenance.store') ?: $this->config->get('cache.default'),\n 'illuminate:foundation:down'\n );\n }\n\n /**\n * Get the default driver name.\n ", "middle": "acheBasedMaintenanceMode\n *\n * @throws \\Illuminate\\Contracts\\Container\\BindingResolutionException\n */\n protected function createCacheDriver(): CacheBasedMaintenanceMode\n {\n return new CacheBasedMaintenanc", "meta": {"filepath": "src/Illuminate/Foundation/MaintenanceModeManager.php", "language": "php", "file_size": 1165, "cut_index": 518, "middle_length": 229}} {"prefix": "nate\\Support\\HtmlString;\nuse Illuminate\\Support\\Str;\n\nclass Mix\n{\n /**\n * Get the path to a versioned Mix file.\n *\n * @param string $path\n * @param string $manifestDirectory\n * @return \\Illuminate\\Support\\HtmlString|string\n *\n * @throws \\Illuminate\\Foundation\\MixManifestNotFoundException|\\Illuminate\\Foundation\\MixFileNotFoundException\n */\n public function __invoke($path, $manifestDirectory = '')\n {\n static $manifests = [];\n\n if (! str_starts_with($p", "suffix": "ic_path($manifestDirectory.'/hot'))) {\n $url = rtrim(file_get_contents(public_path($manifestDirectory.'/hot')));\n\n $customUrl = app('config')->get('app.mix_hot_proxy_url');\n\n if (! empty($customUrl)) {\n retur", "middle": "ath, '/')) {\n $path = \"/{$path}\";\n }\n\n if ($manifestDirectory && ! str_starts_with($manifestDirectory, '/')) {\n $manifestDirectory = \"/{$manifestDirectory}\";\n }\n\n if (is_file(publ", "meta": {"filepath": "src/Illuminate/Foundation/Mix.php", "language": "php", "file_size": 2214, "cut_index": 563, "middle_length": 229}} {"prefix": "minate\\Support\\Collection;\nuse Illuminate\\Support\\Env;\n\nclass PackageManifest\n{\n /**\n * The filesystem instance.\n *\n * @var \\Illuminate\\Filesystem\\Filesystem\n */\n public $files;\n\n /**\n * The base path.\n *\n * @var string\n */\n public $basePath;\n\n /**\n * The vendor path.\n *\n * @var string\n */\n public $vendorPath;\n\n /**\n * The manifest path.\n *\n * @var string|null\n */\n public $manifestPath;\n\n /**\n * The loaded manifes", "suffix": "m string $manifestPath\n */\n public function __construct(Filesystem $files, $basePath, $manifestPath)\n {\n $this->files = $files;\n $this->basePath = $basePath;\n $this->manifestPath = $manifestPath;\n $this->vendorPath =", "middle": "t array.\n *\n * @var array\n */\n public $manifest;\n\n /**\n * Create a new package manifest instance.\n *\n * @param \\Illuminate\\Filesystem\\Filesystem $files\n * @param string $basePath\n * @para", "meta": {"filepath": "src/Illuminate/Foundation/PackageManifest.php", "language": "php", "file_size": 4462, "cut_index": 614, "middle_length": 229}} {"prefix": " * The application implementation.\n *\n * @var \\Illuminate\\Contracts\\Foundation\\Application\n */\n protected $app;\n\n /**\n * The filesystem instance.\n *\n * @var \\Illuminate\\Filesystem\\Filesystem\n */\n protected $files;\n\n /**\n * The path to the manifest file.\n *\n * @var string\n */\n protected $manifestPath;\n\n /**\n * Create a new service repository instance.\n *\n * @param \\Illuminate\\Contracts\\Foundation\\Application $app\n * @param \\Il", "suffix": " = $files;\n $this->manifestPath = $manifestPath;\n }\n\n /**\n * Register the application service providers.\n *\n * @param array $providers\n * @return void\n */\n public function load(array $providers)\n {\n $manifest", "middle": "luminate\\Filesystem\\Filesystem $files\n * @param string $manifestPath\n */\n public function __construct(ApplicationContract $app, Filesystem $files, $manifestPath)\n {\n $this->app = $app;\n $this->files", "meta": {"filepath": "src/Illuminate/Foundation/ProviderRepository.php", "language": "php", "file_size": 6366, "cut_index": 716, "middle_length": 229}} {"prefix": "loaded assets.\n *\n * @var array\n */\n protected $preloadedAssets = [];\n\n /**\n * The cached manifest files.\n *\n * @var array\n */\n protected static $manifests = [];\n\n /**\n * The ViteFonts instance.\n *\n * @var \\Illuminate\\Foundation\\ViteFonts|null\n */\n protected $fonts = null;\n\n /**\n * The name of the font manifest file.\n *\n * @var string\n */\n protected $fontsManifestFilename = 'fonts-manifest.json';\n\n /**\n * The prefetching", "suffix": "int\n */\n protected $prefetchConcurrently = 3;\n\n /**\n * The name of the event that should trigger prefetching. The event must be dispatched on the `window`.\n *\n * @var string\n */\n protected $prefetchEvent = 'load';\n\n /**\n ", "middle": " strategy to use.\n *\n * @var null|'waterfall'|'aggressive'\n */\n protected $prefetchStrategy = null;\n\n /**\n * The number of assets to load concurrently when using the \"waterfall\" strategy.\n *\n * @var ", "meta": {"filepath": "src/Illuminate/Foundation/Vite.php", "language": "php", "file_size": 35244, "cut_index": 2151, "middle_length": 229}} {"prefix": " /**\n * Read the font manifest for the given configuration.\n *\n * @param bool $isHot\n * @param string $buildDirectory\n * @param string $manifestFilename\n * @param string $hotFile\n * @return array|null\n *\n * @throws \\Illuminate\\Foundation\\ViteException\n */\n public function manifest(bool $isHot, string $buildDirectory, string $manifestFilename, string $hotFile)\n {\n $path = $isHot\n ? dirname($hotFile).'/fonts-manifest.dev.", "suffix": "tring, mixed>|null\n *\n * @throws \\Illuminate\\Foundation\\ViteException\n */\n protected function readManifest(string $path)\n {\n if (isset(static::$manifests[$path])) {\n return static::$manifests[$path];\n }\n\n i", "middle": "json'\n : public_path($buildDirectory.'/'.$manifestFilename);\n\n return $this->readManifest($path);\n }\n\n /**\n * Read and decode a manifest file.\n *\n * @param string $path\n * @return array\n \n\n {{ config('app.name', 'Laravel') }}\n\n \n \n \n\n \n \n\n \n\n\n
flatten(depth: 1)\n ->uniqueStrict('_uniqueKey')\n ->map(fn ($included) => Arr::except($included, ['_uniqueKey']))\n ->values()\n ->all(),\n ...($implementation = Json", "middle": "\n */\n #[\\Override]\n public function with($request)\n {\n return array_filter([\n 'included' => $this->collection\n ->map(fn ($resource) => $resource->resolveIncludedResourceObjects($reque", "meta": {"filepath": "src/Illuminate/Http/Resources/JsonApi/AnonymousResourceCollection.php", "language": "php", "file_size": 2564, "cut_index": 563, "middle_length": 229}} {"prefix": "te\\Http\\Resources\\JsonApi;\n\nuse Closure;\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse Illuminate\\Database\\Eloquent\\Model;\n\n/**\n * @internal\n */\nclass RelationResolver\n{\n /**\n * The relation resolver.\n *\n * @var \\Closure(mixed):(\\Illuminate\\Database\\Eloquent\\Collection|\\Illuminate\\Database\\Eloquent\\Model|null)\n */\n public Closure $relationResolver;\n\n /**\n * The relation resource class.\n *\n * @var class-string<\\Illuminate\\Http\\Resources\\JsonApi\\JsonApiResource>|null\n ", "suffix": "\\Model|null)|class-string<\\Illuminate\\Http\\Resources\\JsonApi\\JsonApiResource>|null $resolver\n */\n public function __construct(public string $relationName, Closure|string|null $resolver = null)\n {\n $this->relationResolver = match (true) {\n", "middle": " */\n public ?string $relationResourceClass = null;\n\n /**\n * Construct a new resource relationship resolver.\n *\n * @param \\Closure(mixed):(\\Illuminate\\Database\\Eloquent\\Collection|\\Illuminate\\Database\\Eloquent", "meta": {"filepath": "src/Illuminate/Http/Resources/JsonApi/RelationResolver.php", "language": "php", "file_size": 1750, "cut_index": 537, "middle_length": 229}} {"prefix": "use GuzzleHttp\\Promise\\PromiseInterface;\nuse Illuminate\\Support\\Traits\\ForwardsCalls;\n\n/**\n * A decorated Promise which allows for chaining callbacks.\n */\nclass FluentPromise implements PromiseInterface\n{\n use ForwardsCalls;\n\n /**\n * Create a new fluent promise instance.\n *\n * @param \\GuzzleHttp\\Promise\\PromiseInterface $guzzlePromise\n */\n public function __construct(protected PromiseInterface $guzzlePromise)\n {\n }\n\n #[\\Override]\n public function then(?callable $onFulf", "suffix": " {\n return $this->__call('otherwise', [$onRejected]);\n }\n\n #[\\Override]\n public function resolve($value): void\n {\n $this->guzzlePromise->resolve($value);\n }\n\n #[\\Override]\n public function reject($reason): void\n {\n ", "middle": "illed = null, ?callable $onRejected = null): PromiseInterface\n {\n return $this->__call('then', [$onFulfilled, $onRejected]);\n }\n\n #[\\Override]\n public function otherwise(callable $onRejected): PromiseInterface\n", "meta": {"filepath": "src/Illuminate/Http/Client/Promises/FluentPromise.php", "language": "php", "file_size": 2173, "cut_index": 563, "middle_length": 229}} {"prefix": "ne if the response code was 200 \"OK\" response.\n *\n * @return bool\n */\n public function ok()\n {\n return $this->status() === 200;\n }\n\n /**\n * Determine if the response code was 201 \"Created\" response.\n *\n * @return bool\n */\n public function created()\n {\n return $this->status() === 201;\n }\n\n /**\n * Determine if the response code was 202 \"Accepted\" response.\n *\n * @return bool\n */\n public function accepted()\n {\n retur", "suffix": "status = 204)\n {\n return $this->status() === $status && $this->body() === '';\n }\n\n /**\n * Determine if the response code was a 301 \"Moved Permanently\".\n *\n * @return bool\n */\n public function movedPermanently()\n {\n ", "middle": "n $this->status() === 202;\n }\n\n /**\n * Determine if the response code was the given status code and the body has no content.\n *\n * @param int $status\n * @return bool\n */\n public function noContent($", "meta": {"filepath": "src/Illuminate/Http/Client/Concerns/DeterminesStatusCode.php", "language": "php", "file_size": 3561, "cut_index": 614, "middle_length": 229}} {"prefix": "ublic function isJson()\n {\n return Str::contains($this->header('CONTENT_TYPE') ?? '', ['/json', '+json']);\n }\n\n /**\n * Determine if the current request probably expects a JSON response.\n *\n * @return bool\n */\n public function expectsJson()\n {\n return ($this->ajax() && ! $this->pjax() && $this->acceptsAnyContentType()) || $this->wantsJson();\n }\n\n /**\n * Determine if the current request is asking for JSON.\n *\n * @return bool\n */\n public fun", "suffix": "ent request is asking for Markdown.\n *\n * @return bool\n */\n public function wantsMarkdown()\n {\n $acceptable = $this->getAcceptableContentTypes();\n\n return isset($acceptable[0]) && str_starts_with(strtolower($acceptable[0]), ", "middle": "ction wantsJson()\n {\n $acceptable = $this->getAcceptableContentTypes();\n\n return isset($acceptable[0]) && Str::contains(strtolower($acceptable[0]), ['/json', '+json']);\n }\n\n /**\n * Determine if the curr", "meta": {"filepath": "src/Illuminate/Http/Concerns/InteractsWithContentTypes.php", "language": "php", "file_size": 5128, "cut_index": 716, "middle_length": 229}} {"prefix": "te\\Http\\Concerns;\n\nuse Illuminate\\Support\\Collection;\n\ntrait CanBePrecognitive\n{\n /**\n * Filter the given array of rules into an array of rules that are included in precognitive headers.\n *\n * @param array $rules\n * @return array\n */\n public function filterPrecognitiveRules($rules)\n {\n if (! $this->headers->has('Precognition-Validate-Only')) {\n return $rules;\n }\n\n $validateOnly = explode(',', $this->header('Precognition-Validate-Only'));\n\n ", "suffix": "hould be validated.\n *\n * @param string $attribute\n * @param array $validateOnly\n * @return bool\n */\n protected function shouldValidatePrecognitiveAttribute($attribute, $validateOnly)\n {\n foreach ($validateOnly as $patt", "middle": " return (new Collection($rules))\n ->filter(fn ($rule, $attribute) => $this->shouldValidatePrecognitiveAttribute($attribute, $validateOnly))\n ->all();\n }\n\n /**\n * Determine if the given attribute s", "meta": {"filepath": "src/Illuminate/Http/Concerns/CanBePrecognitive.php", "language": "php", "file_size": 1680, "cut_index": 537, "middle_length": 229}} {"prefix": "\nnamespace Illuminate\\Http\\Middleware;\n\nuse Illuminate\\Http\\Response;\nuse Illuminate\\Support\\Collection;\nuse Illuminate\\Support\\Facades\\Vite;\n\nclass AddLinkHeadersForPreloadedAssets\n{\n /**\n * Configure the middleware.\n *\n * @param int $limit\n * @return string\n */\n public static function using($limit)\n {\n return static::class.':'.$limit;\n }\n\n /**\n * Handle the incoming request.\n *\n * @param \\Illuminate\\Http\\Request $request\n * @param \\Closure $n", "suffix": " if ($response instanceof Response && Vite::preloadedAssets() !== []) {\n $response->header('Link', (new Collection(Vite::preloadedAssets()))\n ->when($limit, fn ($assets, $limit) => $assets->take($limit))\n ", "middle": "ext\n * @param int|null $limit\n * @return \\Illuminate\\Http\\Response\n */\n public function handle($request, $next, $limit = null)\n {\n return tap($next($request), function ($response) use ($limit) {\n ", "meta": {"filepath": "src/Illuminate/Http/Middleware/AddLinkHeadersForPreloadedAssets.php", "language": "php", "file_size": 1158, "cut_index": 518, "middle_length": 229}} {"prefix": "ate\\Contracts\\Container\\Container;\nuse Illuminate\\Http\\Request;\n\nclass HandleCors\n{\n /**\n * The container instance.\n *\n * @var \\Illuminate\\Contracts\\Container\\Container\n */\n protected $container;\n\n /**\n * The CORS service instance.\n *\n * @var \\Fruitcake\\Cors\\CorsService\n */\n protected $cors;\n\n /**\n * All of the registered skip callbacks.\n *\n * @var array\n */\n protected static $skipCallbacks = [];", "suffix": "ontainer, CorsService $cors)\n {\n $this->container = $container;\n $this->cors = $cors;\n }\n\n /**\n * Handle the incoming request.\n *\n * @param \\Illuminate\\Http\\Request $request\n * @param \\Closure $next\n * @return", "middle": "\n\n /**\n * Create a new middleware instance.\n *\n * @param \\Illuminate\\Contracts\\Container\\Container $container\n * @param \\Fruitcake\\Cors\\CorsService $cors\n */\n public function __construct(Container $c", "meta": {"filepath": "src/Illuminate/Http/Middleware/HandleCors.php", "language": "php", "file_size": 3448, "cut_index": 614, "middle_length": 229}} {"prefix": "losure;\nuse Illuminate\\Support\\Carbon;\nuse Illuminate\\Support\\Collection;\nuse Illuminate\\Support\\Str;\nuse Symfony\\Component\\HttpFoundation\\BinaryFileResponse;\nuse Symfony\\Component\\HttpFoundation\\StreamedResponse;\n\nclass SetCacheHeaders\n{\n /**\n * Specify the options for the middleware.\n *\n * @param array|string $options\n * @return string\n */\n public static function using($options)\n {\n if (is_string($options)) {\n return static::class.':'.$options;\n }\n\n ", "suffix": " $value : \"{$key}={$value}\";\n })\n ->filter()\n ->map(fn ($value) => Str::finish($value, ';'))\n ->pipe(fn ($options) => rtrim(static::class.':'.$options->implode(''), ';'));\n }\n\n /**\n * Add cache related ", "middle": " return (new Collection($options))\n ->map(function ($value, $key) {\n if (is_bool($value)) {\n return $value ? $key : null;\n }\n\n return is_int($key) ?", "meta": {"filepath": "src/Illuminate/Http/Middleware/SetCacheHeaders.php", "language": "php", "file_size": 2891, "cut_index": 563, "middle_length": 229}} {"prefix": "\nnamespace Illuminate\\Http\\Middleware;\n\nuse Closure;\nuse Illuminate\\Http\\Exceptions\\PostTooLargeException;\n\nclass ValidatePostSize\n{\n /**\n * Handle an incoming request.\n *\n * @param \\Illuminate\\Http\\Request $request\n * @param \\Closure $next\n * @return mixed\n *\n * @throws \\Illuminate\\Http\\Exceptions\\PostTooLargeException\n */\n public function handle($request, Closure $next)\n {\n $max = $this->getPostMaxSize();\n\n if ($max > 0 && $request->server('CONTEN", "suffix": "n int\n */\n protected function getPostMaxSize()\n {\n if (is_numeric($postMaxSize = ini_get('post_max_size'))) {\n return (int) $postMaxSize;\n }\n\n $metric = strtoupper(substr($postMaxSize, -1));\n\n $postMaxSize =", "middle": "T_LENGTH') > $max) {\n throw new PostTooLargeException('The POST data is too large.');\n }\n\n return $next($request);\n }\n\n /**\n * Determine the server 'post_max_size' as bytes.\n *\n * @retur", "meta": {"filepath": "src/Illuminate/Http/Middleware/ValidatePostSize.php", "language": "php", "file_size": 1243, "cut_index": 518, "middle_length": 229}} {"prefix": "pace Illuminate\\Http\\Testing;\n\nuse Illuminate\\Support\\Arr;\nuse Symfony\\Component\\Mime\\MimeTypes;\n\nclass MimeType\n{\n /**\n * The MIME types instance.\n *\n * @var \\Symfony\\Component\\Mime\\MimeTypes|null\n */\n private static $mime;\n\n /**\n * Get the MIME types instance.\n *\n * @return \\Symfony\\Component\\Mime\\MimeTypesInterface\n */\n public static function getMimeTypes()\n {\n if (self::$mime === null) {\n self::$mime = new MimeTypes;\n }\n\n ret", "suffix": "tension = pathinfo($filename, PATHINFO_EXTENSION);\n\n return self::get($extension);\n }\n\n /**\n * Get the MIME type for a given extension or return all MIME types.\n *\n * @param string $extension\n * @return string\n */\n pub", "middle": "urn self::$mime;\n }\n\n /**\n * Get the MIME type for a file based on the file's extension.\n *\n * @param string $filename\n * @return string\n */\n public static function from($filename)\n {\n $ex", "meta": {"filepath": "src/Illuminate/Http/Testing/MimeType.php", "language": "php", "file_size": 1434, "cut_index": 524, "middle_length": 229}} {"prefix": "luminate\\Http\\Resources\\Json\\JsonResource;\nuse Illuminate\\Pagination\\AbstractCursorPaginator;\nuse Illuminate\\Pagination\\AbstractPaginator;\nuse Illuminate\\Support\\Collection;\nuse Illuminate\\Support\\Str;\nuse LogicException;\nuse ReflectionClass;\nuse Traversable;\n\ntrait CollectsResources\n{\n /**\n * The cached Collects attribute values.\n *\n * @var array\n */\n protected static $cachedCollectsAttributes = [];\n\n /**\n * Map the given collection resource in", "suffix": "e;\n }\n\n if (is_array($resource)) {\n $resource = new Collection($resource);\n }\n\n $collects = $this->collects();\n\n $this->collection = $collects && ! $resource->first() instanceof $collects\n ? $resourc", "middle": "to its individual resources.\n *\n * @param mixed $resource\n * @return mixed\n */\n protected function collectResource($resource)\n {\n if ($resource instanceof MissingValue) {\n return $resourc", "meta": {"filepath": "src/Illuminate/Http/Resources/CollectsResources.php", "language": "php", "file_size": 3377, "cut_index": 614, "middle_length": 229}} {"prefix": "ter the given data, removing any optional values.\n *\n * @param array $data\n * @return array\n */\n protected function filter($data)\n {\n $index = -1;\n\n foreach ($data as $key => $value) {\n $index++;\n\n if (is_array($value)) {\n $data[$key] = $this->filter($value);\n\n continue;\n }\n\n if (is_numeric($key) && $value instanceof MergeValue) {\n return $this->mergeData(\n $data,", "suffix": "$key] = null;\n }\n }\n\n return $this->removeMissingValues($data);\n }\n\n /**\n * Merge the given data in at the given index.\n *\n * @param array $data\n * @param int $index\n * @param array $merge\n * @pa", "middle": " $index, $this->filter($value->data),\n array_values($value->data) === $value->data\n );\n }\n\n if ($value instanceof self && is_null($value->resource)) {\n $data[", "meta": {"filepath": "src/Illuminate/Http/Resources/ConditionallyLoadsAttributes.php", "language": "php", "file_size": 13121, "cut_index": 921, "middle_length": 229}} {"prefix": "ate\\Contracts\\Support\\Responsable;\nuse Illuminate\\Database\\Eloquent\\JsonEncodingException;\nuse Illuminate\\Http\\JsonResponse;\nuse Illuminate\\Http\\Request;\nuse Illuminate\\Http\\Resources\\Attributes\\PreserveKeys;\nuse Illuminate\\Http\\Resources\\ConditionallyLoadsAttributes;\nuse Illuminate\\Http\\Resources\\DelegatesToResource;\nuse JsonException;\nuse JsonSerializable;\nuse ReflectionClass;\n\nclass JsonResource implements ArrayAccess, JsonSerializable, Responsable, UrlRoutable\n{\n use ConditionallyLoadsAttributes, Del", "suffix": " */\n public $with = [];\n\n /**\n * The additional metadata that should be added to the resource response.\n *\n * Added during response construction by the developer.\n *\n * @var array\n */\n public $additional = [];\n\n /**\n ", "middle": "egatesToResource;\n\n /**\n * The resource instance.\n *\n * @var mixed\n */\n public $resource;\n\n /**\n * The additional data that should be added to the top-level resource array.\n *\n * @var array\n ", "meta": {"filepath": "src/Illuminate/Http/Resources/Json/JsonResource.php", "language": "php", "file_size": 8323, "cut_index": 716, "middle_length": 229}} {"prefix": "luminate\\Database\\Eloquent\\Model;\nuse Illuminate\\Support\\Collection;\n\nclass ResourceResponse implements Responsable\n{\n /**\n * The underlying resource.\n *\n * @var mixed\n */\n public $resource;\n\n /**\n * Create a new resource response.\n *\n * @param mixed $resource\n */\n public function __construct($resource)\n {\n $this->resource = $resource;\n }\n\n /**\n * Create an HTTP response that represents the object.\n *\n * @param \\Illuminate\\Http\\Reque", "suffix": " $this->resource->with($request),\n $this->resource->additional\n ),\n $this->calculateStatus(),\n [],\n $this->resource->jsonOptions()\n ), function ($response) use ($request) {\n ", "middle": "st $request\n * @return \\Illuminate\\Http\\JsonResponse\n */\n public function toResponse($request)\n {\n return tap(response()->json(\n $this->wrap(\n $this->resource->resolve($request),\n ", "meta": {"filepath": "src/Illuminate/Http/Resources/Json/ResourceResponse.php", "language": "php", "file_size": 3383, "cut_index": 614, "middle_length": 229}} {"prefix": "ate\\Support\\Arr;\n\nclass JsonApiResource extends JsonResource\n{\n use Concerns\\ResolvesJsonApiElements,\n Concerns\\ResolvesJsonApiRequest;\n\n /**\n * The \"data\" wrapper that should be applied.\n *\n * @var string|null\n */\n public static $wrap = 'data';\n\n /**\n * The resource's \"version\" for JSON:API.\n *\n * @var array{version?: string, ext?: array, profile?: array, meta?: array}\n */\n public static $jsonApiInformation = [];\n\n /**\n * The resource's \"links\" f", "suffix": " * @return void\n */\n public static function configure(?string $version = null, array $ext = [], array $profile = [], array $meta = [])\n {\n static::$jsonApiInformation = array_filter([\n 'version' => $version,\n 'ext' =>", "middle": "or JSON:API.\n */\n protected array $jsonApiLinks = [];\n\n /**\n * The resource's \"meta\" for JSON:API.\n */\n protected array $jsonApiMeta = [];\n\n /**\n * Set the JSON:API version for the request.\n *\n ", "meta": {"filepath": "src/Illuminate/Http/Resources/JsonApi/JsonApiResource.php", "language": "php", "file_size": 6219, "cut_index": 716, "middle_length": 229}} {"prefix": "e;\nuse RuntimeException;\n\nclass LazyPromise implements PromiseInterface\n{\n /**\n * The callbacks to execute after the Guzzle Promise has been built.\n *\n * @var list\n */\n protected array $pending = [];\n\n /**\n * The promise built by the creator.\n *\n * @var \\GuzzleHttp\\Promise\\PromiseInterface\n */\n protected PromiseInterface $guzzlePromise;\n\n /**\n * Create a new lazy promise instance.\n *\n * @param (\\Closure(): \\GuzzleHttp\\Promise\\PromiseInter", "suffix": "* @return \\GuzzleHttp\\Promise\\PromiseInterface\n *\n * @throws \\RuntimeException If the promise has already been built\n */\n public function buildPromise(): PromiseInterface\n {\n if (! $this->promiseNeedsBuilt()) {\n throw ne", "middle": "face) $promiseBuilder The callback to build a new PromiseInterface.\n */\n public function __construct(protected Closure $promiseBuilder)\n {\n }\n\n /**\n * Build the promise from the promise builder.\n *\n ", "meta": {"filepath": "src/Illuminate/Http/Client/Promises/LazyPromise.php", "language": "php", "file_size": 3235, "cut_index": 614, "middle_length": 229}} {"prefix": "te\\Http\\Concerns;\n\nuse Illuminate\\Database\\Eloquent\\Model;\n\ntrait InteractsWithFlashData\n{\n /**\n * Retrieve an old input item.\n *\n * @param string|null $key\n * @param \\Illuminate\\Database\\Eloquent\\Model|string|array|null $default\n * @return string|array|null\n */\n public function old($key = null, $default = null)\n {\n $default = $default instanceof Model ? $default->getAttribute($key) : $default;\n\n return $this->hasSession() ? $this->session()->getOldInput($k", "suffix": " }\n\n /**\n * Flash only some of the input to the session.\n *\n * @param mixed $keys\n * @return void\n */\n public function flashOnly($keys)\n {\n $this->session()->flashInput(\n $this->only(is_array($keys) ? $keys", "middle": "ey, $default) : $default;\n }\n\n /**\n * Flash the input for the current request to the session.\n *\n * @return void\n */\n public function flash()\n {\n $this->session()->flashInput($this->input());\n ", "meta": {"filepath": "src/Illuminate/Http/Concerns/InteractsWithFlashData.php", "language": "php", "file_size": 1532, "cut_index": 537, "middle_length": 229}} {"prefix": "te\\Http\\Middleware;\n\nuse Closure;\n\nclass PrefersJsonResponses\n{\n /**\n * Handle an incoming request.\n *\n * @param \\Illuminate\\Http\\Request $request\n * @param \\Closure $next\n * @return mixed\n */\n public function handle($request, Closure $next)\n {\n $accept = $request->headers->get('Accept');\n\n if ($this->acceptHeaderIsBroad($accept)) {\n if ($accept !== null) {\n $request->headers->set('X-Original-Accept', $accept);\n }\n\n ", "suffix": "eader is broad when it's missing or every media-type listed is wildcard (\"*\\/*\" or \"application/*\").\n *\n * @param string|null $accept\n * @return bool\n */\n protected function acceptHeaderIsBroad($accept)\n {\n if ($accept === nu", "middle": " $request->headers->set('Accept', 'application/json');\n }\n\n return $next($request);\n }\n\n /**\n * Determine if the given \"Accept\" header value is broad enough to be treated as JSON.\n *\n * The h", "meta": {"filepath": "src/Illuminate/Http/Middleware/PrefersJsonResponses.php", "language": "php", "file_size": 1562, "cut_index": 537, "middle_length": 229}} {"prefix": "string|null\n */\n protected $proxies;\n\n /**\n * The trusted proxies headers for the application.\n *\n * @var int\n */\n protected $headers = Request::HEADER_X_FORWARDED_FOR |\n Request::HEADER_X_FORWARDED_HOST |\n Request::HEADER_X_FORWARDED_PORT |\n Request::HEADER_X_FORWARDED_PROTO |\n Request::HEADER_X_FORWARDED_PREFIX |\n Request::HEADER_X_FORWARDED_AWS_ELB;\n\n /**\n * The proxies that have been configured to always be trusted.\n *\n * @va", "suffix": "ysTrustHeaders;\n\n /**\n * Handle an incoming request.\n *\n * @param \\Illuminate\\Http\\Request $request\n * @param \\Closure $next\n * @return mixed\n *\n * @throws \\Symfony\\Component\\HttpKernel\\Exception\\HttpException\n */\n ", "middle": "r array|string|null\n */\n protected static $alwaysTrustProxies;\n\n /**\n * The proxies headers that have been configured to always be trusted.\n *\n * @var int|null\n */\n protected static $alwa", "meta": {"filepath": "src/Illuminate/Http/Middleware/TrustProxies.php", "language": "php", "file_size": 5872, "cut_index": 716, "middle_length": 229}} {"prefix": "e Symfony\\Component\\HttpFoundation\\Response;\nuse Throwable;\n\nclass HttpResponseException extends RuntimeException\n{\n /**\n * The underlying response instance.\n *\n * @var \\Symfony\\Component\\HttpFoundation\\Response\n */\n protected $response;\n\n /**\n * Create a new HTTP response exception instance.\n *\n * @param \\Symfony\\Component\\HttpFoundation\\Response $response\n * @param \\Throwable|null $previous\n */\n public function __construct(Response $response, ?Throwable ", "suffix": "$previous?->getMessage() ?? '', $previous?->getCode() ?? 0, $previous);\n\n $this->response = $response;\n }\n\n /**\n * Get the underlying response instance.\n *\n * @return \\Symfony\\Component\\HttpFoundation\\Response\n */\n public fu", "middle": "$previous = null)\n {\n parent::__construct(", "meta": {"filepath": "src/Illuminate/Http/Exceptions/HttpResponseException.php", "language": "php", "file_size": 957, "cut_index": 582, "middle_length": 52}} {"prefix": "Illuminate\\Http\\Resources\\Json;\n\nclass AnonymousResourceCollection extends ResourceCollection\n{\n /**\n * The name of the resource being collected.\n *\n * @var string\n */\n public $collects;\n\n /**\n * Indicates if the collection keys should be preserved.\n *\n * @var bool\n */\n public $preserveKeys = false;\n\n /**\n * Create a new anonymous resource collection.\n *\n * @param mixed $resource\n * @param string $collects\n */\n public function __const", "suffix": "ects = $collects;\n\n parent::__construct($resource);\n }\n\n /**\n * Indicate that the collection keys should be preserved.\n */\n public function preserveKeys(bool $value = true): static\n {\n $this->preserveKeys = $value;\n\n ", "middle": "ruct($resource, $collects)\n {\n $this->coll", "meta": {"filepath": "src/Illuminate/Http/Resources/Json/AnonymousResourceCollection.php", "language": "php", "file_size": 861, "cut_index": 529, "middle_length": 52}} {"prefix": "ces\\Json\\JsonResource;\nuse Illuminate\\Http\\Resources\\JsonApi\\Exceptions\\ResourceIdentificationException;\nuse Illuminate\\Http\\Resources\\JsonApi\\JsonApiRequest;\nuse Illuminate\\Http\\Resources\\JsonApi\\JsonApiResource;\nuse Illuminate\\Http\\Resources\\JsonApi\\RelationResolver;\nuse Illuminate\\Http\\Resources\\MissingValue;\nuse Illuminate\\Support\\Arr;\nuse Illuminate\\Support\\Collection;\nuse Illuminate\\Support\\LazyCollection;\nuse Illuminate\\Support\\Str;\nuse JsonSerializable;\nuse WeakMap;\n\ntrait ResolvesJsonApiElements\n{\n", "suffix": "ager loaded relationship.\n */\n protected bool $includesPreviouslyLoadedRelationships = false;\n\n /**\n * Cached loaded relationships map.\n *\n * @var arrayretrieveItem('server', $key, $default);\n }\n\n /**\n * Determine if a header is set ", "suffix": " *\n * @param string|null $key\n * @param string|array|null $default\n * @return string|array|null\n */\n public function header($key = null, $default = null)\n {\n return $this->retrieveItem('headers', $key, $default);\n }\n\n ", "middle": "on the request.\n *\n * @param string $key\n * @return bool\n */\n public function hasHeader($key)\n {\n return ! is_null($this->header($key));\n }\n\n /**\n * Retrieve a header from the request.\n ", "meta": {"filepath": "src/Illuminate/Http/Concerns/InteractsWithInput.php", "language": "php", "file_size": 7577, "cut_index": 716, "middle_length": 229}} {"prefix": "cException;\n\nclass FileFactory\n{\n /**\n * Create a new fake file.\n *\n * @param string $name\n * @param string|int $kilobytes\n * @param string|null $mimeType\n * @return \\Illuminate\\Http\\Testing\\File\n */\n public function create($name, $kilobytes = 0, $mimeType = null)\n {\n if (is_string($kilobytes)) {\n return $this->createWithContent($name, $kilobytes);\n }\n\n return tap(new File($name, tmpfile()), function ($file) use ($kilobytes, $mimeTyp", "suffix": "string $content\n * @return \\Illuminate\\Http\\Testing\\File\n */\n public function createWithContent($name, $content)\n {\n $tmpfile = tmpfile();\n\n fwrite($tmpfile, $content);\n\n return tap(new File($name, $tmpfile), function ($", "middle": "e) {\n $file->sizeToReport = $kilobytes * 1024;\n $file->mimeTypeToReport = $mimeType;\n });\n }\n\n /**\n * Create a new fake file with content.\n *\n * @param string $name\n * @param ", "meta": {"filepath": "src/Illuminate/Http/Testing/FileFactory.php", "language": "php", "file_size": 2704, "cut_index": 563, "middle_length": 229}} {"prefix": "s;\nuse Illuminate\\Support\\Traits\\Macroable;\n\ntrait DelegatesToResource\n{\n use ForwardsCalls, Macroable {\n __call as macroCall;\n }\n\n /**\n * Get the value of the resource's route key.\n *\n * @return mixed\n */\n public function getRouteKey()\n {\n return $this->resource->getRouteKey();\n }\n\n /**\n * Get the route key for the resource.\n *\n * @return string\n */\n public function getRouteKeyName()\n {\n return $this->resource->getRouteKeyName(", "suffix": "nding($value, $field = null)\n {\n throw new Exception('Resources may not be implicitly resolved from route bindings.');\n }\n\n /**\n * Retrieve the model for a bound value.\n *\n * @param string $childType\n * @param mixed $val", "middle": ");\n }\n\n /**\n * Retrieve the model for a bound value.\n *\n * @param mixed $value\n * @param string|null $field\n * @return void\n *\n * @throws \\Exception\n */\n public function resolveRouteBi", "meta": {"filepath": "src/Illuminate/Http/Resources/DelegatesToResource.php", "language": "php", "file_size": 3373, "cut_index": 614, "middle_length": 229}} {"prefix": "uminate\\Http\\Request;\n\nclass TrustHosts\n{\n /**\n * The application instance.\n *\n * @var \\Illuminate\\Contracts\\Foundation\\Application\n */\n protected $app;\n\n /**\n * The trusted hosts that have been configured to always be trusted.\n *\n * @var array|(callable(): array)|null\n */\n protected static $alwaysTrust;\n\n /**\n * Indicates whether subdomains of the application URL should be trusted.\n *\n * @var bool|null\n */\n protecte", "suffix": " $app;\n }\n\n /**\n * Get the host patterns that should be trusted.\n *\n * @return array\n */\n public function hosts()\n {\n if (is_null(static::$alwaysTrust)) {\n return [$this->allSubdomainsOfApplicationUrl()];\n ", "middle": "d static $subdomains;\n\n /**\n * Create a new middleware instance.\n *\n * @param \\Illuminate\\Contracts\\Foundation\\Application $app\n */\n public function __construct(Application $app)\n {\n $this->app =", "meta": {"filepath": "src/Illuminate/Http/Middleware/TrustHosts.php", "language": "php", "file_size": 3098, "cut_index": 614, "middle_length": 229}} {"prefix": "\n\nuse Illuminate\\Http\\Request;\nuse Illuminate\\Support\\Arr;\nuse Illuminate\\Support\\Collection;\n\nclass JsonApiRequest extends Request\n{\n /**\n * Cached sparse fieldset.\n */\n protected ?array $cachedSparseFields = null;\n\n /**\n * Cached sparse included.\n */\n protected ?array $cachedSparseIncluded = null;\n\n /**\n * Get the request's included fields.\n */\n public function sparseFields(string $key): array\n {\n if (is_null($this->cachedSparseFields)) {\n $th", "suffix": "parseFields[$key] ?? [];\n }\n\n /**\n * Determine if a sparse fieldset was provided for the given resource type.\n */\n public function hasSparseFieldset(string $key): bool\n {\n if (is_null($this->cachedSparseFields)) {\n $th", "middle": "is->cachedSparseFields = (new Collection($this->array('fields')))\n ->transform(fn ($fieldsets) => empty($fieldsets) ? [] : explode(',', $fieldsets))\n ->all();\n }\n\n return $this->cachedS", "meta": {"filepath": "src/Illuminate/Http/Resources/JsonApi/JsonApiRequest.php", "language": "php", "file_size": 2649, "cut_index": 563, "middle_length": 229}} {"prefix": "\"12\" viewBox=\"0 0 12 12\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" {{ $attributes }}>\n \n \n \n \n \n \n \n \n \ncomposer = $composer;\n }\n\n /**\n * Execute the console command.\n *\n", "middle": "atic $data = [];\n\n /**\n * The registered callables that add custom data to the command output.\n *\n * @var array\n */\n protected static $customDataResolvers = [];\n\n /**\n * Create a new command instance.", "meta": {"filepath": "src/Illuminate/Foundation/Console/AboutCommand.php", "language": "php", "file_size": 12896, "cut_index": 921, "middle_length": 229}} {"prefix": "stem\\Filesystem;\nuse Illuminate\\Support\\Collection;\nuse Illuminate\\Support\\Facades\\Process;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\n\nuse function Illuminate\\Support\\artisan_binary;\nuse function Illuminate\\Support\\php_binary;\n\n#[AsCommand(name: 'install:api')]\nclass ApiInstallCommand extends Command\n{\n use InteractsWithComposerPackages;\n\n /**\n * The name and signature of the console command.\n *\n * @var string\n */\n protected $signature = 'install:api\n {--", "suffix": "stead of Laravel Sanctum}\n {--without-migration-prompt : Do not prompt to run pending migrations}';\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected $description = 'Create an API routes fil", "middle": "composer=global : Absolute path to the Composer binary which should be used to install packages}\n {--force : Overwrite any existing API routes file}\n {--passport : Install Laravel Passport in", "meta": {"filepath": "src/Illuminate/Foundation/Console/ApiInstallCommand.php", "language": "php", "file_size": 4971, "cut_index": 614, "middle_length": 229}} {"prefix": "tion Laravel\\Prompts\\password;\nuse function Laravel\\Prompts\\select;\nuse function Laravel\\Prompts\\text;\n\n#[AsCommand(name: 'install:broadcasting')]\nclass BroadcastingInstallCommand extends Command\n{\n use InteractsWithComposerPackages;\n\n /**\n * The name and signature of the console command.\n *\n * @var string\n */\n protected $signature = 'install:broadcasting\n {--composer=global : Absolute path to the Composer binary which should be used to install packages}\n ", "suffix": "ster}\n {--pusher : Install Pusher as the default broadcaster}\n {--ably : Install Ably as the default broadcaster}\n {--without-node : Do not prompt to install Node dependencies}';\n\n /**\n * The ", "middle": " {--force : Overwrite any existing broadcasting routes file}\n {--without-reverb : Do not prompt to install Laravel Reverb}\n {--reverb : Install Laravel Reverb as the default broadca", "meta": {"filepath": "src/Illuminate/Foundation/Console/BroadcastingInstallCommand.php", "language": "php", "file_size": 16413, "cut_index": 921, "middle_length": 229}} {"prefix": "te\\Foundation\\Console;\n\nuse Illuminate\\Console\\GeneratorCommand;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\nuse Symfony\\Component\\Console\\Input\\InputOption;\n\n#[AsCommand(name: 'make:cast')]\nclass CastMakeCommand extends GeneratorCommand\n{\n /**\n * The console command name.\n *\n * @var string\n */\n protected $name = 'make:cast';\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected $description = 'Create a new custom Eloquent cast class';\n", "suffix": "etStub()\n {\n return $this->option('inbound')\n ? $this->resolveStubPath('/stubs/cast.inbound.stub')\n : $this->resolveStubPath('/stubs/cast.stub');\n }\n\n /**\n * Resolve the fully-qualified path to the stub.\n *\n ", "middle": "\n /**\n * The type of class being generated.\n *\n * @var string\n */\n protected $type = 'Cast';\n\n /**\n * Get the stub file for the generator.\n *\n * @return string\n */\n protected function g", "meta": {"filepath": "src/Illuminate/Foundation/Console/CastMakeCommand.php", "language": "php", "file_size": 1879, "cut_index": 537, "middle_length": 229}} {"prefix": "minate\\Contracts\\Broadcasting\\Broadcaster;\nuse Illuminate\\Support\\Collection;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\nuse Symfony\\Component\\Console\\Terminal;\n\n#[AsCommand(name: 'channel:list')]\nclass ChannelListCommand extends Command\n{\n /**\n * The console command name.\n *\n * @var string\n */\n protected $name = 'channel:list';\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected $description = 'List all registered private broadcast ", "suffix": "\\Contracts\\Broadcasting\\Broadcaster $broadcaster\n * @return void\n */\n public function handle(Broadcaster $broadcaster)\n {\n $channels = $broadcaster->getChannels();\n\n if (! $this->laravel->providerIsLoaded('App\\Providers\\Broadca", "middle": "channels';\n\n /**\n * The terminal width resolver callback.\n *\n * @var \\Closure|null\n */\n protected static $terminalWidthResolver;\n\n /**\n * Execute the console command.\n *\n * @param \\Illuminate", "meta": {"filepath": "src/Illuminate/Foundation/Console/ChannelListCommand.php", "language": "php", "file_size": 4396, "cut_index": 614, "middle_length": 229}} {"prefix": "te\\Foundation\\Console;\n\nuse Illuminate\\Console\\GeneratorCommand;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\nuse Symfony\\Component\\Console\\Input\\InputOption;\n\n#[AsCommand(name: 'make:channel')]\nclass ChannelMakeCommand extends GeneratorCommand\n{\n /**\n * The console command name.\n *\n * @var string\n */\n protected $name = 'make:channel';\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected $description = 'Create a new channel class';\n\n ", "suffix": " */\n protected function buildClass($name)\n {\n return str_replace(\n ['DummyUser', '{{ userModel }}'],\n class_basename($this->userProviderModel()),\n parent::buildClass($name)\n );\n }\n\n /**\n * Get ", "middle": " /**\n * The type of class being generated.\n *\n * @var string\n */\n protected $type = 'Channel';\n\n /**\n * Build the class with the given name.\n *\n * @param string $name\n * @return string\n ", "meta": {"filepath": "src/Illuminate/Foundation/Console/ChannelMakeCommand.php", "language": "php", "file_size": 1706, "cut_index": 537, "middle_length": 229}} {"prefix": "te\\Foundation\\Console;\n\nuse Illuminate\\Console\\GeneratorCommand;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\nuse Symfony\\Component\\Console\\Input\\InputOption;\n\n#[AsCommand(name: 'make:class')]\nclass ClassMakeCommand extends GeneratorCommand\n{\n /**\n * The console command name.\n *\n * @var string\n */\n protected $name = 'make:class';\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected $description = 'Create a new class';\n\n /**\n * Th", "suffix": " return $this->option('invokable')\n ? $this->resolveStubPath('/stubs/class.invokable.stub')\n : $this->resolveStubPath('/stubs/class.stub');\n }\n\n /**\n * Resolve the fully-qualified path to the stub.\n *\n * @param ", "middle": "e type of class being generated.\n *\n * @var string\n */\n protected $type = 'Class';\n\n /**\n * Get the stub file for the generator.\n *\n * @return string\n */\n protected function getStub()\n {\n ", "meta": {"filepath": "src/Illuminate/Foundation/Console/ClassMakeCommand.php", "language": "php", "file_size": 1638, "cut_index": 537, "middle_length": 229}} {"prefix": "e\\Command;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\n\n#[AsCommand(name: 'clear-compiled')]\nclass ClearCompiledCommand extends Command\n{\n /**\n * The console command name.\n *\n * @var string\n */\n protected $name = 'clear-compiled';\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected $description = 'Remove the compiled class file';\n\n /**\n * Execute the console command.\n *\n * @return void\n */\n public function handle", "suffix": "laravel->getCachedServicesPath())) {\n @unlink($servicesPath);\n }\n\n if (is_file($packagesPath = $this->laravel->getCachedPackagesPath())) {\n @unlink($packagesPath);\n }\n\n $this->components->info('Compiled ser", "middle": "()\n {\n if (is_file($servicesPath = $this->", "meta": {"filepath": "src/Illuminate/Foundation/Console/ClearCompiledCommand.php", "language": "php", "file_size": 948, "cut_index": 582, "middle_length": 52}} {"prefix": ";\nuse Symfony\\Component\\Console\\Output\\ConsoleOutput;\nuse Symfony\\Component\\VarDumper\\Caster\\ReflectionCaster;\nuse Symfony\\Component\\VarDumper\\Cloner\\Data;\nuse Symfony\\Component\\VarDumper\\Cloner\\VarCloner;\nuse Symfony\\Component\\VarDumper\\Dumper\\CliDumper as BaseCliDumper;\nuse Symfony\\Component\\VarDumper\\VarDumper;\n\nclass CliDumper extends BaseCliDumper\n{\n use ResolvesDumpSource;\n\n /**\n * The base path of the application.\n *\n * @var string\n */\n protected $basePath;\n\n /**\n * Th", "suffix": "ompiledViewPath;\n\n /**\n * If the dumper is currently dumping.\n *\n * @var bool\n */\n protected $dumping = false;\n\n /**\n * Create a new CLI dumper instance.\n *\n * @param \\Symfony\\Component\\Console\\Output\\OutputInterface ", "middle": "e output instance.\n *\n * @var \\Symfony\\Component\\Console\\Output\\OutputInterface\n */\n protected $output;\n\n /**\n * The compiled view path for the application.\n *\n * @var string\n */\n protected $c", "meta": {"filepath": "src/Illuminate/Foundation/Console/CliDumper.php", "language": "php", "file_size": 3340, "cut_index": 614, "middle_length": 229}} {"prefix": "minate\\Console\\ManuallyFailedException;\nuse Illuminate\\Support\\Facades\\Schedule;\nuse Illuminate\\Support\\Traits\\ForwardsCalls;\nuse ReflectionFunction;\nuse Symfony\\Component\\Console\\Input\\InputInterface;\nuse Symfony\\Component\\Console\\Output\\OutputInterface;\n\n/**\n * @mixin \\Illuminate\\Console\\Scheduling\\Event\n */\nclass ClosureCommand extends Command\n{\n use ForwardsCalls;\n\n /**\n * The command callback.\n *\n * @var \\Closure\n */\n protected $callback;\n\n /**\n * The console command des", "suffix": "_construct($signature, Closure $callback)\n {\n $this->callback = $callback;\n $this->signature = $signature;\n\n parent::__construct();\n }\n\n /**\n * Execute the console command.\n *\n * @param \\Symfony\\Component\\Console\\", "middle": "cription.\n *\n * @var string\n */\n protected $description = '';\n\n /**\n * Create a new command instance.\n *\n * @param string $signature\n * @param \\Closure $callback\n */\n public function _", "meta": {"filepath": "src/Illuminate/Foundation/Console/ClosureCommand.php", "language": "php", "file_size": 3092, "cut_index": 614, "middle_length": 229}} {"prefix": "use Illuminate\\Console\\GeneratorCommand;\nuse Illuminate\\Foundation\\Inspiring;\nuse Illuminate\\Support\\Collection;\nuse Illuminate\\Support\\Str;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\nuse Symfony\\Component\\Console\\Input\\InputOption;\n\n#[AsCommand(name: 'make:component')]\nclass ComponentMakeCommand extends GeneratorCommand\n{\n use CreatesMatchingTest;\n\n /**\n * The console command name.\n *\n * @var string\n */\n protected $name = 'make:component';\n\n /**\n * The console comman", "suffix": "ent';\n\n /**\n * Execute the console command.\n *\n * @return void\n */\n public function handle()\n {\n if ($this->option('view')) {\n return $this->writeView();\n }\n\n if (parent::handle() === false && ! $thi", "middle": "d description.\n *\n * @var string\n */\n protected $description = 'Create a new view component class';\n\n /**\n * The type of class being generated.\n *\n * @var string\n */\n protected $type = 'Compon", "meta": {"filepath": "src/Illuminate/Foundation/Console/ComponentMakeCommand.php", "language": "php", "file_size": 4742, "cut_index": 614, "middle_length": 229}} {"prefix": "e Illuminate\\Console\\Command;\nuse Illuminate\\Contracts\\Console\\Kernel as ConsoleKernelContract;\nuse Illuminate\\Filesystem\\Filesystem;\nuse Illuminate\\Support\\Arr;\nuse LogicException;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\nuse Throwable;\n\n#[AsCommand(name: 'config:cache')]\nclass ConfigCacheCommand extends Command\n{\n /**\n * The console command name.\n *\n * @var string\n */\n protected $name = 'config:cache';\n\n /**\n * The console command description.\n *\n * @var stri", "suffix": " * Create a new config cache command instance.\n *\n * @param \\Illuminate\\Filesystem\\Filesystem $files\n */\n public function __construct(Filesystem $files)\n {\n parent::__construct();\n\n $this->files = $files;\n }\n\n /*", "middle": "ng\n */\n protected $description = 'Create a cache file for faster configuration loading';\n\n /**\n * The filesystem instance.\n *\n * @var \\Illuminate\\Filesystem\\Filesystem\n */\n protected $files;\n\n /**\n", "meta": {"filepath": "src/Illuminate/Foundation/Console/ConfigCacheCommand.php", "language": "php", "file_size": 2545, "cut_index": 563, "middle_length": 229}} {"prefix": "\nnamespace Illuminate\\Foundation\\Console;\n\nuse Illuminate\\Console\\Command;\nuse Illuminate\\Filesystem\\Filesystem;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\n\n#[AsCommand(name: 'config:clear')]\nclass ConfigClearCommand extends Command\n{\n /**\n * The console command name.\n *\n * @var string\n */\n protected $name = 'config:clear';\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected $description = 'Remove the configuration cache file';\n\n ", "suffix": "ystem $files\n */\n public function __construct(Filesystem $files)\n {\n parent::__construct();\n\n $this->files = $files;\n }\n\n /**\n * Execute the console command.\n *\n * @return void\n */\n public function handle()", "middle": "/**\n * The filesystem instance.\n *\n * @var \\Illuminate\\Filesystem\\Filesystem\n */\n protected $files;\n\n /**\n * Create a new config clear command instance.\n *\n * @param \\Illuminate\\Filesystem\\Files", "meta": {"filepath": "src/Illuminate/Foundation/Console/ConfigClearCommand.php", "language": "php", "file_size": 1166, "cut_index": 518, "middle_length": 229}} {"prefix": "te\\Foundation\\Console;\n\nuse Illuminate\\Console\\GeneratorCommand;\nuse Illuminate\\Support\\Str;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\nuse Symfony\\Component\\Console\\Input\\InputOption;\n\nuse function Illuminate\\Filesystem\\join_paths;\n\n#[AsCommand(name: 'make:config', aliases: ['config:make'])]\nclass ConfigMakeCommand extends GeneratorCommand\n{\n /**\n * The name and signature of the console command.\n *\n * @var string\n */\n protected $name = 'make:config';\n\n /**\n * The consol", "suffix": "onfig';\n\n /**\n * The console command name aliases.\n *\n * @var array\n */\n protected $aliases = ['config:make'];\n\n /**\n * Get the destination file path.\n *\n * @param string $name\n */\n protected funct", "middle": "e command description.\n *\n * @var string\n */\n protected $description = 'Create a new configuration file';\n\n /**\n * The type of file being generated.\n *\n * @var string\n */\n protected $type = 'C", "meta": {"filepath": "src/Illuminate/Foundation/Console/ConfigMakeCommand.php", "language": "php", "file_size": 2007, "cut_index": 537, "middle_length": 229}} {"prefix": "t\\Collection;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\nuse Symfony\\Component\\Finder\\Finder;\n\nuse function Laravel\\Prompts\\select;\n\n#[AsCommand(name: 'config:publish')]\nclass ConfigPublishCommand extends Command\n{\n /**\n * The name and signature of the console command.\n *\n * @var string\n */\n protected $signature = 'config:publish\n {name? : The name of the configuration file to publish}\n {--all : Publish all configuration files}\n ", "suffix": " /**\n * Execute the console command.\n *\n * @return int\n */\n public function handle()\n {\n $config = $this->getBaseConfigurationFiles();\n\n if (is_null($this->argument('name')) && $this->option('all')) {\n fore", "middle": " {--force : Overwrite any existing configuration files}';\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected $description = 'Publish configuration files to your application';\n\n", "meta": {"filepath": "src/Illuminate/Foundation/Console/ConfigPublishCommand.php", "language": "php", "file_size": 3142, "cut_index": 614, "middle_length": 229}} {"prefix": "e Illuminate\\Console\\Command;\nuse Illuminate\\Support\\Arr;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\n\n#[AsCommand(name: 'config:show')]\nclass ConfigShowCommand extends Command\n{\n /**\n * The console command signature.\n *\n * @var string\n */\n protected $signature = 'config:show {config : The configuration file or key to show}';\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected $description = 'Display all of the values for a given conf", "suffix": " $this->fail(\"Configuration file or key {$config} does not exist.\");\n }\n\n $this->newLine();\n $this->render($config);\n $this->newLine();\n\n return Command::SUCCESS;\n }\n\n /**\n * Render the ", "middle": "iguration file or key';\n\n /**\n * Execute the console command.\n *\n * @return int\n */\n public function handle()\n {\n $config = $this->argument('config');\n\n if (! config()->has($config)) {\n ", "meta": {"filepath": "src/Illuminate/Foundation/Console/ConfigShowCommand.php", "language": "php", "file_size": 2960, "cut_index": 563, "middle_length": 229}} {"prefix": "e Illuminate\\Console\\Concerns\\CreatesMatchingTest;\nuse Illuminate\\Console\\GeneratorCommand;\nuse Illuminate\\Support\\Stringable;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\nuse Symfony\\Component\\Console\\Input\\InputArgument;\nuse Symfony\\Component\\Console\\Input\\InputOption;\n\n#[AsCommand(name: 'make:command')]\nclass ConsoleMakeCommand extends GeneratorCommand\n{\n use CreatesMatchingTest;\n\n /**\n * The console command name.\n *\n * @var string\n */\n protected $name = 'make:command';\n\n ", "suffix": " protected $type = 'Console command';\n\n /**\n * Replace the class name for the given stub.\n *\n * @param string $stub\n * @param string $name\n * @return string\n */\n protected function replaceClass($stub, $name)\n {\n ", "middle": " /**\n * The console command description.\n *\n * @var string\n */\n protected $description = 'Create a new Artisan command';\n\n /**\n * The type of class being generated.\n *\n * @var string\n */\n ", "meta": {"filepath": "src/Illuminate/Foundation/Console/ConsoleMakeCommand.php", "language": "php", "file_size": 2528, "cut_index": 563, "middle_length": 229}} {"prefix": "tion\\ProcessFailedException;\nuse Symfony\\Component\\Process\\ExecutableFinder;\nuse Symfony\\Component\\Process\\Process;\nuse Throwable;\n\nuse function Laravel\\Prompts\\suggest;\n\n#[AsCommand(name: 'docs')]\nclass DocsCommand extends Command\n{\n /**\n * The name and signature of the console command.\n *\n * @var string\n */\n protected $signature = 'docs {page? : The documentation page to open} {section? : The section of the page to open}';\n\n /**\n * The console command description.\n *\n ", "suffix": " search against the documentation, you may call: php artisan docs -- search query here';\n\n /**\n * The HTTP client instance.\n *\n * @var \\Illuminate\\Http\\Client\\Factory\n */\n protected $http;\n\n ", "middle": "* @var string\n */\n protected $description = 'Access the Laravel documentation';\n\n /**\n * The console command help text.\n *\n * @var string\n */\n protected $help = 'If you would like to perform a content", "meta": {"filepath": "src/Illuminate/Foundation/Console/DocsCommand.php", "language": "php", "file_size": 13722, "cut_index": 921, "middle_length": 229}} {"prefix": "le\\Command;\nuse Illuminate\\Foundation\\Events\\MaintenanceModeEnabled;\nuse Illuminate\\Foundation\\Exceptions\\RegisterErrorViewPaths;\nuse Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance;\nuse Illuminate\\Support\\Carbon;\nuse Illuminate\\Support\\Str;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\nuse Throwable;\n\n#[AsCommand(name: 'down')]\nclass DownCommand extends Command\n{\n /**\n * The console command signature.\n *\n * @var string\n */\n protected $signature = 'down {--r", "suffix": "r of seconds or the datetime after which the request may be retried}\n {--refresh= : The number of seconds after which the browser may refresh}\n {--secret= : The secret phrase that may be used ", "middle": "edirect= : The path that users should be redirected to}\n {--render= : The view that should be prerendered for display during maintenance mode}\n {--retry= : The numbe", "meta": {"filepath": "src/Illuminate/Foundation/Console/DownCommand.php", "language": "php", "file_size": 5693, "cut_index": 716, "middle_length": 229}} {"prefix": "Component\\Console\\Attribute\\AsCommand;\nuse Symfony\\Component\\Console\\Input\\InputInterface;\nuse Symfony\\Component\\Console\\Input\\InputOption;\nuse Symfony\\Component\\Console\\Output\\OutputInterface;\n\nuse function Laravel\\Prompts\\select;\n\n#[AsCommand(name: 'make:enum')]\nclass EnumMakeCommand extends GeneratorCommand\n{\n /**\n * The console command name.\n *\n * @var string\n */\n protected $name = 'make:enum';\n\n /**\n * The console command description.\n *\n * @var string\n */\n p", "suffix": "eturn string\n */\n protected function getStub()\n {\n if ($this->option('string') || $this->option('int')) {\n return $this->resolveStubPath('/stubs/enum.backed.stub');\n }\n\n return $this->resolveStubPath('/stubs/enum.s", "middle": "rotected $description = 'Create a new enum';\n\n /**\n * The type of class being generated.\n *\n * @var string\n */\n protected $type = 'Enum';\n\n /**\n * Get the stub file for the generator.\n *\n * @r", "meta": {"filepath": "src/Illuminate/Foundation/Console/EnumMakeCommand.php", "language": "php", "file_size": 3618, "cut_index": 614, "middle_length": 229}} {"prefix": "minate\\Support\\Env;\nuse Illuminate\\Support\\Str;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\n\nuse function Laravel\\Prompts\\password;\n\n#[AsCommand(name: 'env:decrypt')]\nclass EnvironmentDecryptCommand extends Command\n{\n /**\n * The name and signature of the console command.\n *\n * @var string\n */\n protected $signature = 'env:decrypt\n {--key= : The encryption key}\n {--cipher= : The encryption cipher}\n {--env= : The environment ", "suffix": "**\n * The console command description.\n *\n * @var string\n */\n protected $description = 'Decrypt an environment file';\n\n /**\n * The filesystem instance.\n *\n * @var \\Illuminate\\Filesystem\\Filesystem\n */\n protected $fi", "middle": "to be decrypted}\n {--force : Overwrite the existing environment file}\n {--path= : Path to write the decrypted file}\n {--filename= : Filename of the decrypted file}';\n\n /", "meta": {"filepath": "src/Illuminate/Foundation/Console/EnvironmentDecryptCommand.php", "language": "php", "file_size": 5172, "cut_index": 716, "middle_length": 229}} {"prefix": "e\\Console\\Command;\nuse Illuminate\\Encryption\\Encrypter;\nuse Illuminate\\Filesystem\\Filesystem;\nuse Illuminate\\Support\\Str;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\n\nuse function Laravel\\Prompts\\password;\nuse function Laravel\\Prompts\\select;\n\n#[AsCommand(name: 'env:encrypt')]\nclass EnvironmentEncryptCommand extends Command\n{\n /**\n * The name and signature of the console command.\n *\n * @var string\n */\n protected $signature = 'env:encrypt\n {--key= : The encrypt", "suffix": "le names}\n {--prune : Delete the original environment file}\n {--force : Overwrite the existing encrypted environment file}';\n\n /**\n * The console command description.\n *\n * @var string\n */\n protec", "middle": "ion key}\n {--cipher= : The encryption cipher}\n {--env= : The environment to be encrypted}\n {--readable : Encrypt each variable individually with readable, plain-text variab", "meta": {"filepath": "src/Illuminate/Foundation/Console/EnvironmentEncryptCommand.php", "language": "php", "file_size": 4872, "cut_index": 614, "middle_length": 229}} {"prefix": "pace Illuminate\\Foundation\\Console;\n\nuse Illuminate\\Console\\Command;\nuse Illuminate\\Foundation\\Support\\Providers\\EventServiceProvider;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\n\n#[AsCommand(name: 'event:cache')]\nclass EventCacheCommand extends Command\n{\n /**\n * The name and signature of the console command.\n *\n * @var string\n */\n protected $signature = 'event:cache';\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected $description =", "suffix": "ile_put_contents(\n $this->laravel->getCachedEventsPath(),\n 'getEvents(), true).';'\n );\n\n $this->components->info('Events cached successfully.');\n }\n\n /**\n * Get all of the event", "middle": " \"Discover and cache the application's events and listeners\";\n\n /**\n * Execute the console command.\n *\n * @return void\n */\n public function handle()\n {\n $this->callSilent('event:clear');\n\n f", "meta": {"filepath": "src/Illuminate/Foundation/Console/EventCacheCommand.php", "language": "php", "file_size": 1498, "cut_index": 524, "middle_length": 229}} {"prefix": "\nnamespace Illuminate\\Foundation\\Console;\n\nuse Illuminate\\Console\\Command;\nuse Illuminate\\Filesystem\\Filesystem;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\n\n#[AsCommand(name: 'event:clear')]\nclass EventClearCommand extends Command\n{\n /**\n * The console command name.\n *\n * @var string\n */\n protected $name = 'event:clear';\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected $description = 'Clear all cached events and listeners';\n\n /", "suffix": "stem $files\n */\n public function __construct(Filesystem $files)\n {\n parent::__construct();\n\n $this->files = $files;\n }\n\n /**\n * Execute the console command.\n *\n * @return void\n *\n * @throws \\RuntimeExcepti", "middle": "**\n * The filesystem instance.\n *\n * @var \\Illuminate\\Filesystem\\Filesystem\n */\n protected $files;\n\n /**\n * Create a new config clear command instance.\n *\n * @param \\Illuminate\\Filesystem\\Filesy", "meta": {"filepath": "src/Illuminate/Foundation/Console/EventClearCommand.php", "language": "php", "file_size": 1199, "cut_index": 518, "middle_length": 229}} {"prefix": "e Illuminate\\Console\\Command;\nuse Illuminate\\Foundation\\Support\\Providers\\EventServiceProvider;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\n\n#[AsCommand(name: 'event:generate')]\nclass EventGenerateCommand extends Command\n{\n /**\n * The console command name.\n *\n * @var string\n */\n protected $name = 'event:generate';\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected $description = 'Generate the missing events and listeners based on reg", "suffix": "rn void\n */\n public function handle()\n {\n $providers = $this->laravel->getProviders(EventServiceProvider::class);\n\n foreach ($providers as $provider) {\n foreach ($provider->listens() as $event => $listeners) {\n ", "middle": "istration';\n\n /**\n * Indicates whether the command should be shown in the Artisan command list.\n *\n * @var bool\n */\n protected $hidden = true;\n\n /**\n * Execute the console command.\n *\n * @retu", "meta": {"filepath": "src/Illuminate/Foundation/Console/EventGenerateCommand.php", "language": "php", "file_size": 2122, "cut_index": 563, "middle_length": 229}} {"prefix": "ate\\Support\\Collection;\nuse ReflectionFunction;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\n\n#[AsCommand(name: 'event:list')]\nclass EventListCommand extends Command\n{\n /**\n * The name and signature of the console command.\n *\n * @var string\n */\n protected $signature = 'event:list\n {--event= : Filter the events by name}\n {--json : Output the events and listeners as JSON}';\n\n /**\n * The console command description.\n *", "suffix": "sResolver;\n\n /**\n * Execute the console command.\n *\n * @return void\n */\n public function handle()\n {\n $events = $this->getEvents()->sortKeys();\n\n if ($events->isEmpty()) {\n if ($this->option('json')) {\n ", "middle": "\n * @var string\n */\n protected $description = \"List the application's events and listeners\";\n\n /**\n * The events dispatcher resolver callback.\n *\n * @var \\Closure|null\n */\n protected static $event", "meta": {"filepath": "src/Illuminate/Foundation/Console/EventListCommand.php", "language": "php", "file_size": 7149, "cut_index": 716, "middle_length": 229}} {"prefix": "te\\Foundation\\Console;\n\nuse Illuminate\\Console\\GeneratorCommand;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\nuse Symfony\\Component\\Console\\Input\\InputOption;\n\n#[AsCommand(name: 'make:event')]\nclass EventMakeCommand extends GeneratorCommand\n{\n /**\n * The console command name.\n *\n * @var string\n */\n protected $name = 'make:event';\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected $description = 'Create a new event class';\n\n /**\n ", "suffix": " protected function alreadyExists($rawName)\n {\n return class_exists($rawName) ||\n $this->files->exists($this->getPath($this->qualifyClass($rawName)));\n }\n\n /**\n * Get the stub file for the generator.\n *\n * @return ", "middle": " * The type of class being generated.\n *\n * @var string\n */\n protected $type = 'Event';\n\n /**\n * Determine if the class already exists.\n *\n * @param string $rawName\n * @return bool\n */\n ", "meta": {"filepath": "src/Illuminate/Foundation/Console/EventMakeCommand.php", "language": "php", "file_size": 1981, "cut_index": 537, "middle_length": 229}} {"prefix": "e Illuminate\\Console\\GeneratorCommand;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\nuse Symfony\\Component\\Console\\Input\\InputInterface;\nuse Symfony\\Component\\Console\\Input\\InputOption;\nuse Symfony\\Component\\Console\\Output\\OutputInterface;\n\nuse function Laravel\\Prompts\\confirm;\n\n#[AsCommand(name: 'make:exception')]\nclass ExceptionMakeCommand extends GeneratorCommand\n{\n /**\n * The console command name.\n *\n * @var string\n */\n protected $name = 'make:exception';\n\n /**\n * The c", "suffix": "$type = 'Exception';\n\n /**\n * Get the stub file for the generator.\n *\n * @return string\n */\n protected function getStub()\n {\n if ($this->option('render')) {\n return $this->option('report')\n ? __DIR_", "middle": "onsole command description.\n *\n * @var string\n */\n protected $description = 'Create a new custom exception class';\n\n /**\n * The type of class being generated.\n *\n * @var string\n */\n protected ", "meta": {"filepath": "src/Illuminate/Foundation/Console/ExceptionMakeCommand.php", "language": "php", "file_size": 2979, "cut_index": 563, "middle_length": 229}} {"prefix": "hp\n\nnamespace Illuminate\\Foundation\\Console;\n\nuse Symfony\\Component\\Process\\Process;\n\nuse function Illuminate\\Support\\php_binary;\n\ntrait InteractsWithComposerPackages\n{\n /**\n * Installs the given Composer Packages into the application.\n *\n * @param string $composer\n * @param array $packages\n * @return bool\n */\n protected function requireComposerPackages(string $composer, array $packages)\n {\n if ($composer !== 'global') {\n $command = [$this->phpBinary(),", "suffix": "_MEMORY_LIMIT' => '-1']))\n ->setTimeout(null)\n ->run(function ($type, $output) {\n $this->output->write($output);\n });\n }\n\n /**\n * Get the path to the appropriate PHP binary.\n *\n * @return st", "middle": " $composer, 'require'];\n }\n\n $command = array_merge(\n $command ?? ['composer', 'require'],\n $packages,\n );\n\n return ! (new Process($command, $this->laravel->basePath(), ['COMPOSER", "meta": {"filepath": "src/Illuminate/Foundation/Console/InteractsWithComposerPackages.php", "language": "php", "file_size": 1091, "cut_index": 515, "middle_length": 229}} {"prefix": "te\\Foundation\\Console;\n\nuse Illuminate\\Console\\GeneratorCommand;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\nuse Symfony\\Component\\Console\\Input\\InputOption;\n\n#[AsCommand(name: 'make:interface')]\nclass InterfaceMakeCommand extends GeneratorCommand\n{\n /**\n * The console command name.\n *\n * @var string\n */\n protected $name = 'make:interface';\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected $description = 'Create a new interface';\n\n ", "suffix": "n getStub()\n {\n return __DIR__.'/stubs/interface.stub';\n }\n\n /**\n * Get the default namespace for the class.\n *\n * @param string $rootNamespace\n * @return string\n */\n protected function getDefaultNamespace($rootName", "middle": " /**\n * The type of class being generated.\n *\n * @var string\n */\n protected $type = 'Interface';\n\n /**\n * Get the stub file for the generator.\n *\n * @return string\n */\n protected functio", "meta": {"filepath": "src/Illuminate/Foundation/Console/InterfaceMakeCommand.php", "language": "php", "file_size": 1552, "cut_index": 537, "middle_length": 229}} {"prefix": "e Illuminate\\Console\\Concerns\\CreatesMatchingTest;\nuse Illuminate\\Console\\GeneratorCommand;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\nuse Symfony\\Component\\Console\\Input\\InputOption;\n\n#[AsCommand(name: 'make:job')]\nclass JobMakeCommand extends GeneratorCommand\n{\n use CreatesMatchingTest;\n\n /**\n * The console command name.\n *\n * @var string\n */\n protected $name = 'make:job';\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected $des", "suffix": "ing\n */\n protected function getStub()\n {\n if ($this->option('batched')) {\n return $this->resolveStubPath('/stubs/job.batched.queued.stub');\n }\n\n return $this->option('sync')\n ? $this->resolveStubPath('/s", "middle": "cription = 'Create a new job class';\n\n /**\n * The type of class being generated.\n *\n * @var string\n */\n protected $type = 'Job';\n\n /**\n * Get the stub file for the generator.\n *\n * @return str", "meta": {"filepath": "src/Illuminate/Foundation/Console/JobMakeCommand.php", "language": "php", "file_size": 2172, "cut_index": 563, "middle_length": 229}} {"prefix": "te\\Foundation\\Console;\n\nuse Illuminate\\Console\\Concerns\\CreatesMatchingTest;\nuse Illuminate\\Console\\GeneratorCommand;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\nuse Symfony\\Component\\Console\\Input\\InputOption;\n\n#[AsCommand(name: 'make:job-middleware')]\nclass JobMiddlewareMakeCommand extends GeneratorCommand\n{\n use CreatesMatchingTest;\n\n /**\n * The console command name.\n *\n * @var string\n */\n protected $name = 'make:job-middleware';\n\n /**\n * The console command descrip", "suffix": " /**\n * Get the stub file for the generator.\n *\n * @return string\n */\n protected function getStub()\n {\n return $this->resolveStubPath('/stubs/job.middleware.stub');\n }\n\n /**\n * Resolve the fully-qualified path to th", "middle": "tion.\n *\n * @var string\n */\n protected $description = 'Create a new job middleware class';\n\n /**\n * The type of class being generated.\n *\n * @var string\n */\n protected $type = 'Middleware';\n\n ", "meta": {"filepath": "src/Illuminate/Foundation/Console/JobMiddlewareMakeCommand.php", "language": "php", "file_size": 1825, "cut_index": 537, "middle_length": 229}} {"prefix": "\" d=\"m0 0v-0.49449h1.7215v-4.3497l-1.6849-0.00916v-0.40291c1.3278 0 1.6849-0.22893 1.8131-1.1538h0.43954v5.9155h1.7399v0.49449h-4.0292z\"/>\n\n\n\n\n\n { this.copied = false }, 3000);\n } catch (err) {\n console.error('Failed to copy the markdown: ', err);\n }\n }\n }\"\n>\n
\n \n
\n \n \n ", "suffix": "M6 10.6876C8.58883 10.6876 10.6875 8.58896 10.6875 6.00012C10.6875 3.41129 8.58883 1.31262 6 1.31262C3.41117 1.31262 1.3125 3.41129 1.3125 6.00012C1.3125 8.58896 3.41117 10.6876 6 10.6876Z\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"roun", "middle": "\n connector->connect($config['connection']);\n\n $queue = new Queue(\n $underlying,\n $this->app[Eve", "middle": " ?string $reservedMemory = null;\n\n /**\n * Create a new instance.\n */\n public function __construct(\n protected ConnectorInterface $connector,\n protected Application $app,\n ) {\n //\n }\n\n /", "meta": {"filepath": "src/Illuminate/Foundation/Cloud/QueueConnector.php", "language": "php", "file_size": 3972, "cut_index": 614, "middle_length": 229}} {"prefix": "iv class=\"flex flex-col pt-8 sm:pt-16 overflow-x-auto\">\n
\n

{{ $exception->class() }}

\n frames()->first()\" class=\"-mt-3 text-xs\" />\n

\n {{ $exception->message() }}\n

\n
\n\n
\n LARAVEL\n {{ app()->version() }}\n ", "middle": "sm:mb-16\">\n
\n
\n \n mergeAdditionalProviders($app);\n }\n\n $app->registerConfiguredProviders();\n }\n\n /**\n * Merge the additional configured providers into the configuration.\n *\n * @param \\Illuminate\\Foundation\\Application $", "middle": "oundation\\Application $app\n * @return void\n */\n public function bootstrap(Application $app)\n {\n if (! $app->bound('config_loaded_from_cache') ||\n $app->make('config_loaded_from_cache') === false) ", "meta": {"filepath": "src/Illuminate/Foundation/Bootstrap/RegisterProviders.php", "language": "php", "file_size": 2572, "cut_index": 563, "middle_length": 229}} {"prefix": "s=\"flex items-center gap-2.5 p-2\">\n
\n \n
\n

Previous {{ \\Illuminate\\Support\\Str::plural('exception', $exception->previousExceptions()->count()) }}

\n count() > 1)\n
\n @if ($index > 0)\n
\n\n
\n @foreach ($exception->previousExceptions() as $index => $previous)\n
\n {{-- Timeline column --}}\n @if ($exception->", "meta": {"filepath": "src/Illuminate/Foundation/resources/exceptions/renderer/components/previous-exceptions.blade.php", "language": "php", "file_size": 5154, "cut_index": 716, "middle_length": 229}} {"prefix": "}} - {!! $exception->title() !!}\n\n{!! $exception->message() !!}\n\nPHP {{ PHP_VERSION }}\nLaravel {{ app()->version() }}\n{{ $exception->request()->httpHost() }}\n\n## Stack Trace\n\n@foreach($exception->frames() as $index => $frame)\n{{ $index }} - {{ $frame->file() }}:{{ $frame->line() }}\n@endforeach\n\n@if ($exception->previousExceptions()->isNotEmpty())\n## Previous {{ \\Illuminate\\Support\\Str::plural('exception', $exception->previousExceptions()->count()) }}\n@foreach ($exception->previousExceptions() as $index => $", "suffix": "# Request\n\n{{ $exception->request()->method() }} {{ \\Illuminate\\Support\\Str::start($exception->request()->path(), '/') }}\n\n## Headers\n\n@forelse ($exception->requestHeaders() as $key => $value)\n* **{{ $key }}**: {!! $value !!}\n@empty\nNo header data availabl", "middle": "previous)\n\n### {{ $index + 1 }}. {{ $previous->class() }}\n\n{!! $previous->message() !!}\n\n@foreach($previous->frames() as $index => $frame)\n{{ $index }} - {{ $frame->file() }}:{{ $frame->line() }}\n@endforeach\n@endforeach\n@endif\n\n#", "meta": {"filepath": "src/Illuminate/Foundation/resources/exceptions/renderer/markdown.blade.php", "language": "php", "file_size": 1623, "cut_index": 537, "middle_length": 229}} {"prefix": "te\\Foundation\\Console;\n\nuse Illuminate\\Console\\GeneratorCommand;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\nuse Symfony\\Component\\Console\\Input\\InputOption;\n\n#[AsCommand(name: 'make:request')]\nclass RequestMakeCommand extends GeneratorCommand\n{\n /**\n * The console command name.\n *\n * @var string\n */\n protected $name = 'make:request';\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected $description = 'Create a new form request class';", "suffix": "on getStub()\n {\n return $this->resolveStubPath('/stubs/request.stub');\n }\n\n /**\n * Resolve the fully-qualified path to the stub.\n *\n * @param string $stub\n * @return string\n */\n protected function resolveStubPath($s", "middle": "\n\n /**\n * The type of class being generated.\n *\n * @var string\n */\n protected $type = 'Request';\n\n /**\n * Get the stub file for the generator.\n *\n * @return string\n */\n protected functi", "meta": {"filepath": "src/Illuminate/Foundation/Console/RequestMakeCommand.php", "language": "php", "file_size": 1703, "cut_index": 537, "middle_length": 229}} {"prefix": "e Illuminate\\Console\\GeneratorCommand;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\nuse Symfony\\Component\\Console\\Input\\InputOption;\n\n#[AsCommand(name: 'make:resource')]\nclass ResourceMakeCommand extends GeneratorCommand\n{\n /**\n * The console command name.\n *\n * @var string\n */\n protected $name = 'make:resource';\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected $description = 'Create a new resource';\n\n /**\n * The type of clas", "suffix": "on()) {\n $this->type = 'Resource collection';\n }\n\n parent::handle();\n }\n\n /**\n * Get the stub file for the generator.\n *\n * @return string\n */\n protected function getStub()\n {\n return match (true)", "middle": "s being generated.\n *\n * @var string\n */\n protected $type = 'Resource';\n\n /**\n * Execute the console command.\n *\n * @return void\n */\n public function handle()\n {\n if ($this->collecti", "meta": {"filepath": "src/Illuminate/Foundation/Console/ResourceMakeCommand.php", "language": "php", "file_size": 2633, "cut_index": 563, "middle_length": 229}} {"prefix": "acades\\File;\nuse Illuminate\\Support\\Str;\nuse Illuminate\\Support\\Stringable;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\nuse Symfony\\Component\\Console\\Input\\InputOption;\n\n#[AsCommand(name: 'make:view')]\nclass ViewMakeCommand extends GeneratorCommand\n{\n use CreatesMatchingTest;\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected $description = 'Create a new view';\n\n /**\n * The name and signature of the console command.\n *\n * @var string\n ", "suffix": "string $name\n * @return string\n *\n * @throws \\Illuminate\\Contracts\\Filesystem\\FileNotFoundException\n */\n protected function buildClass($name)\n {\n $contents = parent::buildClass($name);\n\n return str_replace(\n ", "middle": " */\n protected $name = 'make:view';\n\n /**\n * The type of file being generated.\n *\n * @var string\n */\n protected $type = 'View';\n\n /**\n * Build the class with the given name.\n *\n * @param ", "meta": {"filepath": "src/Illuminate/Foundation/Console/ViewMakeCommand.php", "language": "php", "file_size": 6281, "cut_index": 716, "middle_length": 229}} {"prefix": "lth;\nuse Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance;\nuse Illuminate\\Foundation\\Support\\Providers\\EventServiceProvider as AppEventServiceProvider;\nuse Illuminate\\Foundation\\Support\\Providers\\RouteServiceProvider as AppRouteServiceProvider;\nuse Illuminate\\Http\\Middleware\\PrefersJsonResponses;\nuse Illuminate\\Http\\Request;\nuse Illuminate\\Support\\Collection;\nuse Illuminate\\Support\\Facades\\Broadcast;\nuse Illuminate\\Support\\Facades\\Event;\nuse Illuminate\\Support\\Facades\\Route;\nuse Illumi", "suffix": " /**\n * Any additional routing callbacks that should be invoked while registering routes.\n *\n * @var array\n */\n protected array $additionalRoutingCallbacks = [];\n\n /**\n * The Folio / page middleware that have been defined by the", "middle": "nate\\Support\\Facades\\View;\nuse Laravel\\Folio\\Folio;\n\nclass ApplicationBuilder\n{\n /**\n * The service provider that are marked for registration.\n *\n * @var array\n */\n protected array $pendingProviders = [];\n\n ", "meta": {"filepath": "src/Illuminate/Foundation/Configuration/ApplicationBuilder.php", "language": "php", "file_size": 16149, "cut_index": 921, "middle_length": 229}} {"prefix": "\n{\n /**\n * Create a new exception handling configuration instance.\n *\n * @param \\Illuminate\\Foundation\\Exceptions\\Handler $handler\n */\n public function __construct(public Handler $handler)\n {\n }\n\n /**\n * Register a reportable callback.\n *\n * @param callable $using\n * @return \\Illuminate\\Foundation\\Exceptions\\ReportableHandler\n */\n public function report(callable $using)\n {\n return $this->handler->reportable($using);\n }\n\n /**\n * Re", "suffix": "s->handler->reportable($reportUsing);\n }\n\n /**\n * Register a renderable callback.\n *\n * @param callable $using\n * @return $this\n */\n public function render(callable $using)\n {\n $this->handler->renderable($using);\n\n ", "middle": "gister a reportable callback.\n *\n * @param callable $reportUsing\n * @return \\Illuminate\\Foundation\\Exceptions\\ReportableHandler\n */\n public function reportable(callable $reportUsing)\n {\n return $thi", "meta": {"filepath": "src/Illuminate/Foundation/Configuration/Exceptions.php", "language": "php", "file_size": 5529, "cut_index": 716, "middle_length": 229}} {"prefix": " * The user defined global middleware stack.\n *\n * @var array\n */\n protected $global = [];\n\n /**\n * The middleware that should be prepended to the global middleware stack.\n *\n * @var array\n */\n protected $prepends = [];\n\n /**\n * The middleware that should be appended to the global middleware stack.\n *\n * @var array\n */\n protected $appends = [];\n\n /**\n * The middleware that should be removed from the global middleware stack.\n *\n * @var", "suffix": "ed middleware groups.\n *\n * @var array\n */\n protected $groups = [];\n\n /**\n * The middleware that should be prepended to the specified groups.\n *\n * @var array\n */\n protected $groupPrepends = [];\n\n /**\n * The midd", "middle": " array\n */\n protected $removals = [];\n\n /**\n * The middleware that should be replaced in the global middleware stack.\n *\n * @var array\n */\n protected $replacements = [];\n\n /**\n * The user defin", "meta": {"filepath": "src/Illuminate/Foundation/Configuration/Middleware.php", "language": "php", "file_size": 22610, "cut_index": 1331, "middle_length": 229}} {"prefix": "\n */\n protected $policies = [];\n\n /**\n * Register the application's policies.\n *\n * @return void\n */\n public function register()\n {\n $this->booting(function () {\n $t", "suffix": "cy) {\n Gate::policy($model, $policy);\n }\n }\n\n /**\n * Get the policies defined on the provider.\n *\n * @return array\n */\n public function policies()\n {\n return $this->policies;\n", "middle": "his->registerPolicies();\n });\n }\n\n /**\n * Register the application's policies.\n *\n * @return void\n */\n public function registerPolicies()\n {\n foreach ($this->policies() as $model => $poli", "meta": {"filepath": "src/Illuminate/Foundation/Support/Providers/AuthServiceProvider.php", "language": "php", "file_size": 1005, "cut_index": 512, "middle_length": 229}} {"prefix": "Events;\nuse Illuminate\\Support\\Arr;\nuse Illuminate\\Support\\Facades\\Event;\nuse Illuminate\\Support\\LazyCollection;\nuse Illuminate\\Support\\ServiceProvider;\n\nclass EventServiceProvider extends ServiceProvider\n{\n /**\n * The event handler mappings for the application.\n *\n * @var array>\n */\n protected $listen = [];\n\n /**\n * The subscribers to register.\n *\n * @var array\n */\n protected $subscribe = [];\n\n /**\n * The model observers to regis", "suffix": "$shouldDiscoverEvents = true;\n\n /**\n * The configured event discovery paths.\n *\n * @var iterable|null\n */\n protected static $eventDiscoveryPaths;\n\n /**\n * Register the application's event listeners.\n *\n * @", "middle": "ter.\n *\n * @var array>\n */\n protected $observers = [];\n\n /**\n * Indicates if events should be discovered.\n *\n * @var bool\n */\n protected static ", "meta": {"filepath": "src/Illuminate/Foundation/Support/Providers/EventServiceProvider.php", "language": "php", "file_size": 5693, "cut_index": 716, "middle_length": 229}} {"prefix": "ng\\UrlGenerator;\nuse Illuminate\\Routing\\Router;\nuse Illuminate\\Support\\ServiceProvider;\nuse Illuminate\\Support\\Traits\\ForwardsCalls;\n\n/**\n * @mixin \\Illuminate\\Routing\\Router\n */\nclass RouteServiceProvider extends ServiceProvider\n{\n use ForwardsCalls;\n\n /**\n * The controller namespace for the application.\n *\n * @var string|null\n */\n protected $namespace;\n\n /**\n * The callback that should be used to load the application's routes.\n *\n * @var \\Closure|null\n */\n pr", "suffix": "k that should be used to load the application's cached routes.\n *\n * @var \\Closure|null\n */\n protected static $alwaysLoadCachedRoutesUsing;\n\n /**\n * Register any application services.\n *\n * @return void\n */\n public func", "middle": "otected $loadRoutesUsing;\n\n /**\n * The global callback that should be used to load the application's routes.\n *\n * @var \\Closure|null\n */\n protected static $alwaysLoadRoutesUsing;\n\n /**\n * The callbac", "meta": {"filepath": "src/Illuminate/Foundation/Support/Providers/RouteServiceProvider.php", "language": "php", "file_size": 4420, "cut_index": 614, "middle_length": 229}} {"prefix": "Scheduling\\ScheduleTestCommand;\nuse Illuminate\\Console\\Scheduling\\ScheduleWorkCommand;\nuse Illuminate\\Console\\Signals;\nuse Illuminate\\Contracts\\Support\\DeferrableProvider;\nuse Illuminate\\Database\\Console\\DbCommand;\nuse Illuminate\\Database\\Console\\DumpCommand;\nuse Illuminate\\Database\\Console\\Factories\\FactoryMakeCommand;\nuse Illuminate\\Database\\Console\\MonitorCommand as DatabaseMonitorCommand;\nuse Illuminate\\Database\\Console\\PruneCommand;\nuse Illuminate\\Database\\Console\\Seeds\\SeedCommand;\nuse Illuminate\\Data", "suffix": "nsole\\WipeCommand;\nuse Illuminate\\Foundation\\Console\\AboutCommand;\nuse Illuminate\\Foundation\\Console\\ApiInstallCommand;\nuse Illuminate\\Foundation\\Console\\BroadcastingInstallCommand;\nuse Illuminate\\Foundation\\Console\\CastMakeCommand;\nuse Illuminate\\Foundati", "middle": "base\\Console\\Seeds\\SeederMakeCommand;\nuse Illuminate\\Database\\Console\\ShowCommand;\nuse Illuminate\\Database\\Console\\ShowModelCommand;\nuse Illuminate\\Database\\Console\\TableCommand as DatabaseTableCommand;\nuse Illuminate\\Database\\Co", "meta": {"filepath": "src/Illuminate/Foundation/Providers/ArtisanServiceProvider.php", "language": "php", "file_size": 28809, "cut_index": 1331, "middle_length": 229}} {"prefix": "racts\\Validation\\ValidatesWhenResolved;\nuse Illuminate\\Foundation\\Http\\FormRequest;\nuse Illuminate\\Routing\\Redirector;\nuse Illuminate\\Support\\ServiceProvider;\n\nclass FormRequestServiceProvider extends ServiceProvider\n{\n /**\n * Register the service provider.\n *\n * @return void\n */\n public function register()\n {\n //\n }\n\n /**\n * Bootstrap the application services.\n *\n * @return void\n */\n public function boot()\n {\n $this->app->afterResolving(Val", "suffix": " $resolved->validateResolved();\n });\n\n $this->app->resolving(FormRequest::class, function ($request, $app) {\n $request = FormRequest::createFrom($app['request'], $request);\n\n $request->setContainer($app)->setRed", "middle": "idatesWhenResolved::class, function ($resolved) {\n ", "meta": {"filepath": "src/Illuminate/Foundation/Providers/FormRequestServiceProvider.php", "language": "php", "file_size": 950, "cut_index": 582, "middle_length": 52}} {"prefix": "Contracts\\Foundation\\MaintenanceMode as MaintenanceModeContract;\nuse Illuminate\\Contracts\\View\\Factory;\nuse Illuminate\\Database\\ConnectionInterface;\nuse Illuminate\\Database\\Grammar;\nuse Illuminate\\Foundation\\Console\\CliDumper;\nuse Illuminate\\Foundation\\Exceptions\\Renderer\\Listener;\nuse Illuminate\\Foundation\\Exceptions\\Renderer\\Mappers\\BladeMapper;\nuse Illuminate\\Foundation\\Exceptions\\Renderer\\Renderer;\nuse Illuminate\\Foundation\\Http\\HtmlDumper;\nuse Illuminate\\Foundation\\MaintenanceModeManager;\nuse Illuminat", "suffix": "uminate\\Support\\AggregateServiceProvider;\nuse Illuminate\\Support\\Defer\\DeferredCallbackCollection;\nuse Illuminate\\Support\\Facades\\URL;\nuse Illuminate\\Support\\Uri;\nuse Illuminate\\Testing\\LoggedExceptionCollection;\nuse Illuminate\\Testing\\ParallelTestingServi", "middle": "e\\Foundation\\Precognition;\nuse Illuminate\\Foundation\\Vite;\nuse Illuminate\\Http\\Client\\Factory as HttpFactory;\nuse Illuminate\\Http\\Request;\nuse Illuminate\\Log\\Events\\MessageLogged;\nuse Illuminate\\Queue\\Events\\JobAttempted;\nuse Ill", "meta": {"filepath": "src/Illuminate/Foundation/Providers/FoundationServiceProvider.php", "language": "php", "file_size": 9783, "cut_index": 921, "middle_length": 229}} {"prefix": "\n */\n protected $editorHrefs = [\n 'antigravity' => 'antigravity://file/{file}:{line}',\n 'atom' => 'atom://core/open/file?filename={file}&line={line}',\n 'cursor' => 'cursor://file/{file}:{line}',\n 'emacs' => 'emacs://open?url=file://{file}&line={line}',\n 'fleet' => 'fleet://open?file={file}&line={line}',\n 'idea' => 'idea://open?file={file}&line={line}',\n 'kiro' => 'kiro://file/{file}:{line}',\n 'macvim' => 'mvim://open/?url=file://", "suffix": "orm' => 'phpstorm://open?file={file}&line={line}',\n 'sublime' => 'subl://open?url=file://{file}&line={line}',\n 'textmate' => 'txmt://open?url=file://{file}&line={line}',\n 'trae' => 'trae://file/{file}:{line}',\n 'vscode' => 'vsco", "middle": "{file}&line={line}',\n 'neovim' => 'nvim://open?url=file://{file}&line={line}',\n 'netbeans' => 'netbeans://open/?f={file}:{line}',\n 'nova' => 'nova://core/open/file?filename={file}&line={line}',\n 'phpst", "meta": {"filepath": "src/Illuminate/Foundation/Concerns/ResolvesDumpSource.php", "language": "php", "file_size": 5985, "cut_index": 716, "middle_length": 229}} {"prefix": "pace Illuminate\\Foundation\\Testing;\n\nuse Illuminate\\Contracts\\Console\\Kernel;\nuse Illuminate\\Foundation\\Testing\\Traits\\CanConfigureMigrationCommands;\n\ntrait DatabaseMigrations\n{\n use CanConfigureMigrationCommands;\n\n /**\n * Define hooks to migrate the database before and after each test.\n *\n * @return void\n */\n public function runDatabaseMigrations()\n {\n $this->beforeRefreshingDatabase();\n $this->refreshTestDatabase();\n $this->afterRefreshingDatabase();\n\n ", "suffix": " *\n * @return void\n */\n protected function refreshTestDatabase()\n {\n $this->artisan('migrate:fresh', $this->migrateFreshUsing());\n\n $this->app[Kernel::class]->setArtisan(null);\n }\n\n /**\n * Perform any work that should ", "middle": " $this->beforeApplicationDestroyed(function () {\n $this->artisan('migrate:rollback');\n\n RefreshDatabaseState::$migrated = false;\n });\n }\n\n /**\n * Refresh a conventional test database.\n ", "meta": {"filepath": "src/Illuminate/Foundation/Testing/DatabaseMigrations.php", "language": "php", "file_size": 1388, "cut_index": 524, "middle_length": 229}} {"prefix": "te\\Foundation\\Testing;\n\ntrait DatabaseTransactions\n{\n /**\n * Handle database transactions on the specified connections.\n *\n * @return void\n */\n public function beginDatabaseTransaction()\n {\n $database = $this->app->make('db');\n\n $connections = $this->connectionsToTransact();\n\n $this->app->instance('db.transactions', $transactionsManager = new DatabaseTransactionsManager($connections));\n\n foreach ($connections as $name) {\n $connection = $databas", "suffix": "eginTransaction();\n $connection->setEventDispatcher($dispatcher);\n }\n\n $this->beforeApplicationDestroyed(function () use ($database) {\n foreach ($this->connectionsToTransact() as $name) {\n $connection = $d", "middle": "e->connection($name);\n $connection->setTransactionManager($transactionsManager);\n $dispatcher = $connection->getEventDispatcher();\n\n $connection->unsetEventDispatcher();\n $connection->b", "meta": {"filepath": "src/Illuminate/Foundation/Testing/DatabaseTransactions.php", "language": "php", "file_size": 1644, "cut_index": 537, "middle_length": 229}} {"prefix": "te\\Foundation\\Testing;\n\nuse Illuminate\\Database\\DatabaseTransactionsManager as BaseManager;\n\nclass DatabaseTransactionsManager extends BaseManager\n{\n /**\n * The names of the connections transacting during tests.\n */\n protected array $connectionsTransacting;\n\n /**\n * Create a new database transaction manager instance.\n *\n * @param array $connectionsTransacting\n */\n public function __construct(array $connectionsTransacting)\n {\n parent::__construct();\n\n $t", "suffix": " // If there are no transactions, we'll run the callbacks right away. Also, we'll run it\n // right away when we're in test mode and we only have the wrapping transaction. For\n // every other case, we'll queue up the callback to run aft", "middle": "his->connectionsTransacting = $connectionsTransacting;\n }\n\n /**\n * Register a transaction callback.\n *\n * @param callable $callback\n * @return void\n */\n public function addCallback($callback)\n {\n", "meta": {"filepath": "src/Illuminate/Foundation/Testing/DatabaseTransactionsManager.php", "language": "php", "file_size": 1853, "cut_index": 537, "middle_length": 229}} {"prefix": "s;\nuse Illuminate\\Support\\Arr;\nuse Illuminate\\Support\\Collection;\n\ntrait DatabaseTruncation\n{\n use CanConfigureMigrationCommands;\n\n /**\n * The cached names of the database tables for each connection.\n *\n * @var array\n */\n protected static array $allTables;\n\n /**\n * Truncate the database tables for all configured connections.\n *\n * @return void\n */\n protected function truncateDatabaseTables(): void\n {\n $this->beforeTruncatingDatabase();\n\n // Mig", "suffix": " RefreshDatabaseState::$migrated = true;\n\n return;\n }\n\n // Always clear any test data on subsequent runs...\n $this->truncateTablesForAllConnections();\n\n if ($seeder = $this->seeder()) {\n // Use a spec", "middle": "rate and seed the database on first run...\n if (! RefreshDatabaseState::$migrated) {\n $this->artisan('migrate:fresh', $this->migrateFreshUsing());\n\n $this->app[Kernel::class]->setArtisan(null);\n\n ", "meta": {"filepath": "src/Illuminate/Foundation/Testing/DatabaseTruncation.php", "language": "php", "file_size": 6255, "cut_index": 716, "middle_length": 229}} {"prefix": "\nnamespace Illuminate\\Foundation\\Testing;\n\ntrait LazilyRefreshDatabase\n{\n use RefreshDatabase {\n refreshDatabase as baseRefreshDatabase;\n }\n\n /**\n * Define hooks to migrate the database before and after each test.\n *\n * @return void\n */\n public function refreshDatabase()\n {\n $database = $this->app->make('db');\n\n $callback = function () {\n if (RefreshDatabaseState::$lazilyRefreshed) {\n return;\n }\n\n RefreshData", "suffix": " $this->baseRefreshDatabase();\n\n if (property_exists($this, 'mockConsoleOutput')) {\n $this->mockConsoleOutput = $shouldMockOutput;\n }\n };\n\n $database->beforeStartingTransaction($callback);\n ", "middle": "baseState::$lazilyRefreshed = true;\n\n if (property_exists($this, 'mockConsoleOutput')) {\n $shouldMockOutput = $this->mockConsoleOutput;\n\n $this->mockConsoleOutput = false;\n }\n\n ", "meta": {"filepath": "src/Illuminate/Foundation/Testing/LazilyRefreshDatabase.php", "language": "php", "file_size": 1181, "cut_index": 518, "middle_length": 229}} {"prefix": "ureMigrationCommands;\n\n /**\n * Define hooks to migrate the database before and after each test.\n *\n * @return void\n */\n public function refreshDatabase()\n {\n $this->beforeRefreshingDatabase();\n\n if ($this->usingInMemoryDatabases()) {\n $this->restoreInMemoryDatabase();\n }\n\n $this->refreshTestDatabase();\n\n $this->afterRefreshingDatabase();\n }\n\n /**\n * Determine if any of the connections transacting is using in-memory databases.\n ", "suffix": "e;\n }\n }\n\n return false;\n }\n\n /**\n * Determine if a given database connection is an in-memory database.\n *\n * @return bool\n */\n protected function usingInMemoryDatabase(?string $name = null)\n {\n i", "middle": " *\n * @return bool\n */\n protected function usingInMemoryDatabases()\n {\n foreach ($this->connectionsToTransact() as $name) {\n if ($this->usingInMemoryDatabase($name)) {\n return tru", "meta": {"filepath": "src/Illuminate/Foundation/Testing/RefreshDatabase.php", "language": "php", "file_size": 5310, "cut_index": 716, "middle_length": 229}} {"prefix": "te\\Foundation\\Application;\nuse Illuminate\\Foundation\\Testing\\Attributes\\UnitTest;\nuse PHPUnit\\Framework\\TestCase as BaseTestCase;\nuse ReflectionMethod;\nuse Throwable;\n\nabstract class TestCase extends BaseTestCase\n{\n use Concerns\\InteractsWithContainer,\n Concerns\\MakesHttpRequests,\n Concerns\\InteractsWithAuthentication,\n Concerns\\InteractsWithConsole,\n Concerns\\InteractsWithDatabase,\n Concerns\\InteractsWithDeprecationHandling,\n Concerns\\InteractsWithExceptionHandl", "suffix": "recursively.\n *\n * @var array\n */\n protected array $traitsUsedByTest;\n\n /**\n * Memoized result of the withoutBootingFramework check.\n *\n * @var bool|null\n */\n protected ?bool $withoutBootingFramework ", "middle": "ing,\n Concerns\\InteractsWithSession,\n Concerns\\InteractsWithTime,\n Concerns\\InteractsWithTestCaseLifecycle,\n Concerns\\InteractsWithViews;\n\n /**\n * The list of trait that this test uses, fetched ", "meta": {"filepath": "src/Illuminate/Foundation/Testing/TestCase.php", "language": "php", "file_size": 3418, "cut_index": 614, "middle_length": 229}} {"prefix": "hp\n\nnamespace Illuminate\\Foundation\\Testing;\n\nuse Illuminate\\Foundation\\Application;\nuse Illuminate\\Foundation\\Bootstrap\\LoadConfiguration;\n\ntrait WithCachedConfig\n{\n /**\n * After resolving the configuration once, we can cache it for the remaining tests.\n */\n protected function setUpWithCachedConfig(): void\n {\n if ((CachedState::$cachedConfig ?? null) === null) {\n CachedState::$cachedConfig = $this->app->make('config')->all();\n }\n\n $this->markConfigCached($th", "suffix": "\n {\n LoadConfiguration::alwaysUse(null);\n }\n\n /**\n * Inform the container that the configuration is cached.\n */\n protected function markConfigCached(Application $app): void\n {\n $app->instance('config_loaded_from_cache',", "middle": "is->app);\n }\n\n /**\n * Reset the cached configuration.\n *\n * This is helpful if some of the tests in the suite apply this trait while others do not.\n */\n protected function tearDownWithCachedConfig(): void", "meta": {"filepath": "src/Illuminate/Foundation/Testing/WithCachedConfig.php", "language": "php", "file_size": 1099, "cut_index": 515, "middle_length": 229}} {"prefix": "pace Illuminate\\Foundation\\Testing;\n\nuse Illuminate\\Foundation\\Application;\nuse Illuminate\\Foundation\\Support\\Providers\\RouteServiceProvider;\n\ntrait WithCachedRoutes\n{\n /**\n * After creating the routes once, we can cache them for the remaining tests.\n *\n * @return void\n */\n protected function setUpWithCachedRoutes(): void\n {\n if ((CachedState::$cachedRoutes ?? null) === null) {\n $routes = $this->app['router']->getRoutes();\n\n $routes->refreshNameLookups()", "suffix": "ot defaulting to loading cached routes.\n *\n * This is helpful if some of the tests in the suite apply this trait while others do not.\n *\n * @return void\n */\n protected function tearDownWithCachedRoutes(): void\n {\n RouteServ", "middle": ";\n $routes->refreshActionLookups();\n\n CachedState::$cachedRoutes = $routes->compile();\n }\n\n $this->markRoutesCached($this->app);\n }\n\n /**\n * Reset the route service provider so it's n", "meta": {"filepath": "src/Illuminate/Foundation/Testing/WithCachedRoutes.php", "language": "php", "file_size": 1408, "cut_index": 524, "middle_length": 229}} {"prefix": "\nnamespace Illuminate\\Foundation\\Testing;\n\nuse Faker\\Factory;\nuse Faker\\Generator;\n\ntrait WithFaker\n{\n /**\n * The Faker instance.\n *\n * @var \\Faker\\Generator\n */\n protected $faker;\n\n /**\n * Setup up the Faker instance.\n *\n * @return void\n */\n protected function setUpFaker()\n {\n $this->faker = $this->makeFaker();\n }\n\n /**\n * Get the default Faker instance for a given locale.\n *\n * @param string|null $locale\n * @return \\Faker\\Genera", "suffix": "string|null $locale\n * @return \\Faker\\Generator\n */\n protected function makeFaker($locale = null)\n {\n if (isset($this->app)) {\n $locale ??= $this->app->make('config')->get('app.faker_locale', Factory::DEFAULT_LOCALE);\n\n ", "middle": "tor\n */\n protected function faker($locale = null)\n {\n return is_null($locale) ? $this->faker : $this->makeFaker($locale);\n }\n\n /**\n * Create a Faker instance for the given locale.\n *\n * @param ", "meta": {"filepath": "src/Illuminate/Foundation/Testing/WithFaker.php", "language": "php", "file_size": 1237, "cut_index": 518, "middle_length": 229}} {"prefix": " * Create a new wormhole instance.\n *\n * @param int $value\n */\n public function __construct($value)\n {\n $this->value = $value;\n }\n\n /**\n * @template TReturn of mixed\n *\n * Travel forward the given number of microseconds.\n *\n * @param (callable(): TReturn)|null $callback\n * @return ($callback is null ? void : TReturn)\n */\n public function microsecond($callback = null)\n {\n return $this->microseconds($callback);\n }\n\n /**\n *", "suffix": "n microseconds($callback = null)\n {\n Carbon::setTestNow(Carbon::now()->addMicroseconds($this->value));\n\n return $this->handleCallback($callback);\n }\n\n /**\n * @template TReturn of mixed\n *\n * Travel forward the given numbe", "middle": " @template TReturn of mixed\n *\n * Travel forward the given number of microseconds.\n *\n * @param (callable(): TReturn)|null $callback\n * @return ($callback is null ? void : TReturn)\n */\n public functio", "meta": {"filepath": "src/Illuminate/Foundation/Testing/Wormhole.php", "language": "php", "file_size": 7458, "cut_index": 716, "middle_length": 229}} {"prefix": "ts;\n\nuse Illuminate\\Foundation\\Testing\\Attributes\\Seed;\nuse Illuminate\\Foundation\\Testing\\Attributes\\Seeder;\nuse ReflectionClass;\n\ntrait CanConfigureMigrationCommands\n{\n /**\n * The parameters that should be used when running \"migrate:fresh\".\n *\n * @return array\n */\n protected function migrateFreshUsing()\n {\n $seeder = $this->seeder();\n\n return array_merge(\n [\n '--drop-views' => $this->shouldDropViews(),\n '--drop-types' => $this-", "suffix": "* @return bool\n */\n protected function shouldDropViews()\n {\n return property_exists($this, 'dropViews') ? $this->dropViews : false;\n }\n\n /**\n * Determine if types should be dropped when refreshing the database.\n *\n * @ret", "middle": ">shouldDropTypes(),\n ],\n $seeder ? ['--seeder' => $seeder] : ['--seed' => $this->shouldSeed()]\n );\n }\n\n /**\n * Determine if views should be dropped when refreshing the database.\n *\n ", "meta": {"filepath": "src/Illuminate/Foundation/Testing/Traits/CanConfigureMigrationCommands.php", "language": "php", "file_size": 2193, "cut_index": 563, "middle_length": 229}} {"prefix": "e as UserContract;\n\ntrait InteractsWithAuthentication\n{\n /**\n * Set the currently logged in user for the application.\n *\n * @param \\Illuminate\\Contracts\\Auth\\Authenticatable $user\n * @param string|null $guard\n * @return $this\n */\n public function actingAs(UserContract $user, $guard = null)\n {\n return $this->be($user, $guard);\n }\n\n /**\n * Clear the currently logged in user for the application.\n *\n * @param string|null $guard\n * @return $this", "suffix": "ly logged in user for the application.\n *\n * @param \\Illuminate\\Contracts\\Auth\\Authenticatable $user\n * @param string|null $guard\n * @return $this\n */\n public function be(UserContract $user, $guard = null)\n {\n if (isset", "middle": "\n */\n public function actingAsGuest($guard = null)\n {\n $this->app['auth']->guard($guard)->forgetUser();\n\n $this->app['auth']->shouldUse($guard);\n\n return $this;\n }\n\n /**\n * Set the current", "meta": {"filepath": "src/Illuminate/Foundation/Testing/Concerns/InteractsWithAuthentication.php", "language": "php", "file_size": 4346, "cut_index": 614, "middle_length": 229}} {"prefix": "erns;\n\nuse Illuminate\\Console\\OutputStyle;\nuse Illuminate\\Contracts\\Console\\Kernel;\nuse Illuminate\\Testing\\PendingCommand;\n\ntrait InteractsWithConsole\n{\n /**\n * Indicates if the console output should be mocked.\n *\n * @var bool\n */\n public $mockConsoleOutput = true;\n\n /**\n * Indicates if the command is expected to output anything.\n *\n * @var bool|null\n */\n public $expectsOutput;\n\n /**\n * All of the expected output lines.\n *\n * @var array\n */\n ", "suffix": "pected to be displayed.\n *\n * @var array\n */\n public $unexpectedOutput = [];\n\n /**\n * All of the text that is not expected to be present in the output.\n *\n * @var array\n */\n public $unexpectedOutputSubstrings = [];\n\n ", "middle": "public $expectedOutput = [];\n\n /**\n * All of the expected text to be present in the output.\n *\n * @var array\n */\n public $expectedOutputSubstrings = [];\n\n /**\n * All of the output lines that aren't ex", "meta": {"filepath": "src/Illuminate/Foundation/Testing/Concerns/InteractsWithConsole.php", "language": "php", "file_size": 2134, "cut_index": 563, "middle_length": 229}} {"prefix": "e\\Support\\Facades\\Vite as ViteFacade;\nuse Illuminate\\Support\\HtmlString;\nuse Mockery;\n\ntrait InteractsWithContainer\n{\n /**\n * The original Vite handler.\n *\n * @var \\Illuminate\\Foundation\\Vite|null\n */\n protected $originalVite;\n\n /**\n * The original Laravel Mix handler.\n *\n * @var \\Illuminate\\Foundation\\Mix|null\n */\n protected $originalMix;\n\n /**\n * The original deferred callbacks collection.\n *\n * @var \\Illuminate\\Support\\Defer\\DeferredCallbackColle", "suffix": "ram TSwap $instance\n * @return TSwap\n */\n protected function swap($abstract, $instance)\n {\n return $this->instance($abstract, $instance);\n }\n\n /**\n * Register an instance of an object in the container.\n *\n * @templa", "middle": "ction|null\n */\n protected $originalDeferredCallbacksCollection;\n\n /**\n * Register an instance of an object in the container.\n *\n * @template TSwap of object\n *\n * @param string $abstract\n * @pa", "meta": {"filepath": "src/Illuminate/Foundation/Testing/Concerns/InteractsWithContainer.php", "language": "php", "file_size": 7160, "cut_index": 716, "middle_length": 229}} {"prefix": "se;\nuse Illuminate\\Testing\\Constraints\\SoftDeletedInDatabase;\nuse PHPUnit\\Framework\\Constraint\\LogicalNot as ReverseConstraint;\n\ntrait InteractsWithDatabase\n{\n /**\n * Assert that a given where condition exists in the database.\n *\n * @param iterable<\\Illuminate\\Database\\Eloquent\\Model>|\\Illuminate\\Database\\Eloquent\\Model|class-string<\\Illuminate\\Database\\Eloquent\\Model>|string $table\n * @param array $data\n * @param string|null $connection\n * @return $this\n ", "suffix": "nnection);\n }\n\n return $this;\n }\n\n if ($data !== [] && array_is_list($data) && array_all($data, fn ($row) => is_array($row))) {\n foreach ($data as $row) {\n $this->assertDatabaseHas($table, $row,", "middle": "*/\n protected function assertDatabaseHas($table, array $data = [], $connection = null)\n {\n if (is_iterable($table)) {\n foreach ($table as $item) {\n $this->assertDatabaseHas($item, $data, $co", "meta": {"filepath": "src/Illuminate/Foundation/Testing/Concerns/InteractsWithDatabase.php", "language": "php", "file_size": 12852, "cut_index": 921, "middle_length": 229}} {"prefix": "\nnamespace Illuminate\\Foundation\\Testing\\Concerns;\n\nuse ErrorException;\n\ntrait InteractsWithDeprecationHandling\n{\n /**\n * The original deprecation handler.\n *\n * @var callable|null\n */\n protected $originalDeprecationHandler;\n\n /**\n * Restore deprecation handling.\n *\n * @return $this\n */\n protected function withDeprecationHandling()\n {\n if ($this->originalDeprecationHandler) {\n set_error_handler(tap($this->originalDeprecationHandler, fn () => $", "suffix": "function withoutDeprecationHandling()\n {\n if ($this->originalDeprecationHandler == null) {\n $this->originalDeprecationHandler = set_error_handler(function ($level, $message, $file = '', $line = 0) {\n if (in_array($level,", "middle": "this->originalDeprecationHandler = null));\n }\n\n return $this;\n }\n\n /**\n * Disable deprecation handling for the test.\n *\n * @return $this\n *\n * @throws \\ErrorException\n */\n protected ", "meta": {"filepath": "src/Illuminate/Foundation/Testing/Concerns/InteractsWithDeprecationHandling.php", "language": "php", "file_size": 1230, "cut_index": 518, "middle_length": 229}} {"prefix": "aits\\ReflectsClosures;\nuse Illuminate\\Testing\\Assert;\nuse Illuminate\\Validation\\ValidationException;\nuse Symfony\\Component\\Console\\Application as ConsoleApplication;\nuse Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException;\nuse Throwable;\n\ntrait InteractsWithExceptionHandling\n{\n use ReflectsClosures;\n\n /**\n * The original exception handler.\n *\n * @var \\Illuminate\\Contracts\\Debug\\ExceptionHandler|null\n */\n protected $originalExceptionHandler;\n\n /**\n * Restore exception", "suffix": "$currentExceptionHandler instanceof ExceptionHandlerFake\n ? $currentExceptionHandler->setHandler($this->originalExceptionHandler)\n : $this->app->instance(ExceptionHandler::class, $this->originalExceptionHandler);\n }\n\n ", "middle": " handling.\n *\n * @return $this\n */\n protected function withExceptionHandling()\n {\n if ($this->originalExceptionHandler) {\n $currentExceptionHandler = app(ExceptionHandler::class);\n\n ", "meta": {"filepath": "src/Illuminate/Foundation/Testing/Concerns/InteractsWithExceptionHandling.php", "language": "php", "file_size": 7596, "cut_index": 716, "middle_length": 229}} {"prefix": "s\\Factory as Redis;\nuse Illuminate\\Foundation\\Application;\nuse Illuminate\\Redis\\RedisManager;\nuse Illuminate\\Support\\Env;\n\ntrait InteractsWithRedis\n{\n /**\n * Indicate connection failed if redis is not available.\n *\n * @var bool\n */\n private static $connectionFailedOnceWithDefaultsSkip = false;\n\n /**\n * Redis manager instance.\n *\n * @var array\n */\n private $redis;\n\n /**\n * Setup redis connection.\n *\n * @return ", "suffix": " }\n\n if (static::$connectionFailedOnceWithDefaultsSkip) {\n $this->markTestSkipped('Trying default host/port failed, please set environment variable REDIS_HOST & REDIS_PORT to enable '.__CLASS__);\n }\n\n $app = $this->app ?? ne", "middle": "void\n */\n public function setUpRedis()\n {\n if (! extension_loaded('redis')) {\n $this->markTestSkipped('The redis extension is not installed. Please install the extension to enable '.__CLASS__);\n ", "meta": {"filepath": "src/Illuminate/Foundation/Testing/Concerns/InteractsWithRedis.php", "language": "php", "file_size": 4378, "cut_index": 614, "middle_length": 229}} {"prefix": "\nnamespace Illuminate\\Foundation\\Testing\\Concerns;\n\ntrait InteractsWithSession\n{\n /**\n * Set the session to the given array.\n *\n * @param array $data\n * @return $this\n */\n public function withSession(array $data)\n {\n $this->session($data);\n\n return $this;\n }\n\n /**\n * Set the session to the given array.\n *\n * @param array $data\n * @return $this\n */\n public function session(array $data)\n {\n $this->startSession();\n\n fo", "suffix": "ed function startSession()\n {\n if (! $this->app['session']->isStarted()) {\n $this->app['session']->start();\n }\n\n return $this;\n }\n\n /**\n * Flush all of the current session data.\n *\n * @return $this\n ", "middle": "reach ($data as $key => $value) {\n $this->app['session']->put($key, $value);\n }\n\n return $this;\n }\n\n /**\n * Start the session for the application.\n *\n * @return $this\n */\n protect", "meta": {"filepath": "src/Illuminate/Foundation/Testing/Concerns/InteractsWithSession.php", "language": "php", "file_size": 1150, "cut_index": 518, "middle_length": 229}} {"prefix": "RegisterProviders;\nuse Illuminate\\Foundation\\Console\\AboutCommand;\nuse Illuminate\\Foundation\\Http\\FormRequest;\nuse Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull;\nuse Illuminate\\Foundation\\Http\\Middleware\\PreventRequestForgery;\nuse Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance;\nuse Illuminate\\Foundation\\Http\\Middleware\\TrimStrings;\nuse Illuminate\\Foundation\\Testing\\Attributes\\SetUp;\nuse Illuminate\\Foundation\\Testing\\Attributes\\TearDown;\nuse Illuminate\\Foundation\\Tes", "suffix": ";\nuse Illuminate\\Foundation\\Testing\\WithoutMiddleware;\nuse Illuminate\\Http\\Client\\Response;\nuse Illuminate\\Http\\Middleware\\HandleCors;\nuse Illuminate\\Http\\Middleware\\TrustHosts;\nuse Illuminate\\Http\\Middleware\\TrustProxies;\nuse Illuminate\\Http\\Resources\\Jso", "middle": "ting\\DatabaseMigrations;\nuse Illuminate\\Foundation\\Testing\\DatabaseTransactions;\nuse Illuminate\\Foundation\\Testing\\DatabaseTruncation;\nuse Illuminate\\Foundation\\Testing\\RefreshDatabase;\nuse Illuminate\\Foundation\\Testing\\WithFaker", "meta": {"filepath": "src/Illuminate/Foundation/Testing/Concerns/InteractsWithTestCaseLifecycle.php", "language": "php", "file_size": 9713, "cut_index": 921, "middle_length": 229}} {"prefix": "e Illuminate\\Console\\Command;\nuse Illuminate\\Contracts\\Console\\Kernel as ConsoleKernelContract;\nuse Illuminate\\Filesystem\\Filesystem;\nuse Illuminate\\Routing\\RouteCollection;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\n\n#[AsCommand(name: 'route:cache')]\nclass RouteCacheCommand extends Command\n{\n /**\n * The console command name.\n *\n * @var string\n */\n protected $name = 'route:cache';\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected $", "suffix": "te command instance.\n *\n * @param \\Illuminate\\Filesystem\\Filesystem $files\n */\n public function __construct(Filesystem $files)\n {\n parent::__construct();\n\n $this->files = $files;\n }\n\n /**\n * Execute the console c", "middle": "description = 'Create a route cache file for faster route registration';\n\n /**\n * The filesystem instance.\n *\n * @var \\Illuminate\\Filesystem\\Filesystem\n */\n protected $files;\n\n /**\n * Create a new rou", "meta": {"filepath": "src/Illuminate/Foundation/Console/RouteCacheCommand.php", "language": "php", "file_size": 2772, "cut_index": 563, "middle_length": 229}} {"prefix": "e Illuminate\\Console\\GeneratorCommand;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\nuse Symfony\\Component\\Console\\Input\\InputOption;\n\n#[AsCommand(name: 'make:rule')]\nclass RuleMakeCommand extends GeneratorCommand\n{\n /**\n * The console command name.\n *\n * @var string\n */\n protected $name = 'make:rule';\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected $description = 'Create a new validation rule';\n\n /**\n * The type of class bei", "suffix": "cts\\Filesystem\\FileNotFoundException\n */\n protected function buildClass($name)\n {\n return str_replace(\n '{{ ruleType }}',\n $this->option('implicit') ? 'ImplicitRule' : 'Rule',\n parent::buildClass($name)\n ", "middle": "ng generated.\n *\n * @var string\n */\n protected $type = 'Rule';\n\n /**\n * Build the class with the given name.\n *\n * @param string $name\n * @return string\n *\n * @throws \\Illuminate\\Contra", "meta": {"filepath": "src/Illuminate/Foundation/Console/RuleMakeCommand.php", "language": "php", "file_size": 2052, "cut_index": 563, "middle_length": 229}} {"prefix": "ymfony\\Component\\Console\\Output\\OutputInterface;\nuse Symfony\\Component\\Process\\Process;\n\nuse function Illuminate\\Support\\php_binary;\nuse function Termwind\\terminal;\n\n#[AsCommand(name: 'serve')]\nclass ServeCommand extends Command\n{\n use InteractsWithTime;\n\n /**\n * The console command name.\n *\n * @var string\n */\n protected $name = 'serve';\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected $description = 'Serve the application on the PHP d", "suffix": " protected $portOffset = 0;\n\n /**\n * The list of lines that are pending to be output.\n *\n * @var string\n */\n protected $outputBuffer = '';\n\n /**\n * The list of requests being handled and their start time.\n *\n * @var a", "middle": "evelopment server';\n\n /**\n * The number of PHP CLI server workers.\n *\n * @var int<2, max>|false\n */\n protected $phpServerWorkers = 1;\n\n /**\n * The current port offset.\n *\n * @var int\n */\n ", "meta": {"filepath": "src/Illuminate/Foundation/Console/ServeCommand.php", "language": "php", "file_size": 13560, "cut_index": 921, "middle_length": 229}} {"prefix": "\nnamespace Illuminate\\Foundation\\Console;\n\nuse Illuminate\\Console\\Command;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\n\n#[AsCommand(name: 'storage:unlink')]\nclass StorageUnlinkCommand extends Command\n{\n /**\n * The console command signature.\n *\n * @var string\n */\n protected $signature = 'storage:unlink';\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected $description = 'Delete existing symbolic links configured for the application';\n\n", "suffix": " continue;\n }\n\n $this->laravel->make('files')->delete($link);\n\n $this->components->info(\"The [$link] link has been deleted.\");\n }\n }\n\n /**\n * Get the symbolic links that are configured for th", "middle": " /**\n * Execute the console command.\n *\n * @return void\n */\n public function handle()\n {\n foreach ($this->links() as $link => $target) {\n if (! file_exists($link) || ! is_link($link)) {\n", "meta": {"filepath": "src/Illuminate/Foundation/Console/StorageUnlinkCommand.php", "language": "php", "file_size": 1234, "cut_index": 518, "middle_length": 229}} {"prefix": "te\\Support\\Str;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\nuse Symfony\\Component\\Console\\Input\\InputInterface;\nuse Symfony\\Component\\Console\\Input\\InputOption;\nuse Symfony\\Component\\Console\\Output\\OutputInterface;\n\nuse function Laravel\\Prompts\\select;\n\n#[AsCommand(name: 'make:test')]\nclass TestMakeCommand extends GeneratorCommand\n{\n /**\n * The console command name.\n *\n * @var string\n */\n protected $name = 'make:test';\n\n /**\n * The console command description.\n *\n ", "suffix": "or the generator.\n *\n * @return string\n */\n protected function getStub()\n {\n $suffix = $this->option('unit') ? '.unit.stub' : '.stub';\n\n return $this->usingPest()\n ? $this->resolveStubPath('/stubs/pest'.$suffix)\n ", "middle": " * @var string\n */\n protected $description = 'Create a new test class';\n\n /**\n * The type of class being generated.\n *\n * @var string\n */\n protected $type = 'Test';\n\n /**\n * Get the stub file f", "meta": {"filepath": "src/Illuminate/Foundation/Console/TestMakeCommand.php", "language": "php", "file_size": 3972, "cut_index": 614, "middle_length": 229}} {"prefix": "pace Illuminate\\Foundation\\Console;\n\nuse Exception;\nuse Illuminate\\Console\\Command;\nuse Illuminate\\Foundation\\Events\\MaintenanceModeDisabled;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\n\n#[AsCommand(name: 'up')]\nclass UpCommand extends Command\n{\n /**\n * The console command name.\n *\n * @var string\n */\n protected $name = 'up';\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected $description = 'Bring the application out of maintenance mo", "suffix": "ts->info('Application is already up.');\n\n return 0;\n }\n\n $this->laravel->maintenanceMode()->deactivate();\n\n if (is_file(storage_path('framework/maintenance.php'))) {\n unlink(storage_path('frame", "middle": "de';\n\n /**\n * Execute the console command.\n *\n * @return int\n */\n public function handle()\n {\n try {\n if (! $this->laravel->maintenanceMode()->active()) {\n $this->componen", "meta": {"filepath": "src/Illuminate/Foundation/Console/UpCommand.php", "language": "php", "file_size": 1472, "cut_index": 524, "middle_length": 229}} {"prefix": "r;\nuse League\\Flysystem\\MountManager;\nuse League\\Flysystem\\UnixVisibility\\PortableVisibilityConverter;\nuse League\\Flysystem\\Visibility;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\n\nuse function Laravel\\Prompts\\search;\nuse function Laravel\\Prompts\\select;\n\n#[AsCommand(name: 'vendor:publish')]\nclass VendorPublishCommand extends Command\n{\n /**\n * The filesystem instance.\n *\n * @var \\Illuminate\\Filesystem\\Filesystem\n */\n protected $files;\n\n /**\n * The provider to publish.\n ", "suffix": "\\Illuminate\\Support\\Carbon|null\n */\n protected $publishedAt;\n\n /**\n * The console command signature.\n *\n * @var string\n */\n protected $signature = 'vendor:publish\n {--existing : Publish and overwrite only the", "middle": " *\n * @var string|null\n */\n protected $provider = null;\n\n /**\n * The tags to publish.\n *\n * @var array\n */\n protected $tags = [];\n\n /**\n * The time the command started.\n *\n * @var ", "meta": {"filepath": "src/Illuminate/Foundation/Console/VendorPublishCommand.php", "language": "php", "file_size": 11059, "cut_index": 921, "middle_length": 229}} {"prefix": "omponent\\Console\\ConsoleEvents;\nuse Symfony\\Component\\Console\\Event\\ConsoleCommandEvent;\nuse Symfony\\Component\\Console\\Event\\ConsoleTerminateEvent;\nuse Symfony\\Component\\EventDispatcher\\EventDispatcher;\nuse Symfony\\Component\\Finder\\Finder;\nuse Throwable;\nuse WeakMap;\n\nclass Kernel implements KernelContract\n{\n use InteractsWithTime;\n\n /**\n * The application implementation.\n *\n * @var \\Illuminate\\Contracts\\Foundation\\Application\n */\n protected $app;\n\n /**\n * The event dispatche", "suffix": "ispatcherInterface|null\n */\n protected $symfonyDispatcher;\n\n /**\n * The Artisan application instance.\n *\n * @var \\Illuminate\\Console\\Application|null\n */\n protected $artisan;\n\n /**\n * The Artisan commands provided by the", "middle": "r implementation.\n *\n * @var \\Illuminate\\Contracts\\Events\\Dispatcher\n */\n protected $events;\n\n /**\n * The Symfony event dispatcher implementation.\n *\n * @var \\Symfony\\Contracts\\EventDispatcher\\EventD", "meta": {"filepath": "src/Illuminate/Foundation/Console/Kernel.php", "language": "php", "file_size": 17635, "cut_index": 1331, "middle_length": 229}} {"prefix": "te\\Foundation\\Console;\n\nuse Illuminate\\Console\\Command;\nuse Illuminate\\Filesystem\\Filesystem;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\n\n#[AsCommand(name: 'lang:publish')]\nclass LangPublishCommand extends Command\n{\n /**\n * The name and signature of the console command.\n *\n * @var string\n */\n protected $signature = 'lang:publish\n {--existing : Publish and overwrite only the files that have already been published}\n {--force : Overwrite any e", "suffix": "le command.\n *\n * @return void\n */\n public function handle()\n {\n if (! is_dir($langPath = $this->laravel->basePath('lang/en'))) {\n (new Filesystem)->makeDirectory($langPath, recursive: true);\n }\n\n $stubs = ", "middle": "xisting files}';\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected $description = 'Publish all language files that are available for customization';\n\n /**\n * Execute the conso", "meta": {"filepath": "src/Illuminate/Foundation/Console/LangPublishCommand.php", "language": "php", "file_size": 1867, "cut_index": 537, "middle_length": 229}} {"prefix": "ollection;\nuse Illuminate\\Support\\Str;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\nuse Symfony\\Component\\Console\\Input\\InputInterface;\nuse Symfony\\Component\\Console\\Input\\InputOption;\nuse Symfony\\Component\\Console\\Output\\OutputInterface;\n\nuse function Laravel\\Prompts\\select;\n\n#[AsCommand(name: 'make:mail')]\nclass MailMakeCommand extends GeneratorCommand\n{\n use CreatesMatchingTest;\n\n /**\n * The console command name.\n *\n * @var string\n */\n protected $name = 'make:mail';\n\n /*", "suffix": "ed $type = 'Mailable';\n\n /**\n * Execute the console command.\n *\n * @return void\n */\n public function handle()\n {\n if (parent::handle() === false && ! $this->option('force')) {\n return;\n }\n\n if ($this", "middle": "*\n * The console command description.\n *\n * @var string\n */\n protected $description = 'Create a new email class';\n\n /**\n * The type of class being generated.\n *\n * @var string\n */\n protect", "meta": {"filepath": "src/Illuminate/Foundation/Console/MailMakeCommand.php", "language": "php", "file_size": 6332, "cut_index": 716, "middle_length": 229}} {"prefix": "use Illuminate\\Console\\GeneratorCommand;\nuse Illuminate\\Support\\Collection;\nuse Illuminate\\Support\\Str;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\nuse Symfony\\Component\\Console\\Input\\InputInterface;\nuse Symfony\\Component\\Console\\Input\\InputOption;\nuse Symfony\\Component\\Console\\Output\\OutputInterface;\n\nuse function Laravel\\Prompts\\confirm;\nuse function Laravel\\Prompts\\text;\n\n#[AsCommand(name: 'make:notification')]\nclass NotificationMakeCommand extends GeneratorCommand\n{\n use CreatesMatchingTest;\n\n", "suffix": " 'Create a new notification class';\n\n /**\n * The type of class being generated.\n *\n * @var string\n */\n protected $type = 'Notification';\n\n /**\n * Execute the console command.\n *\n * @return void\n */\n public functi", "middle": " /**\n * The console command name.\n *\n * @var string\n */\n protected $name = 'make:notification';\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected $description =", "meta": {"filepath": "src/Illuminate/Foundation/Console/NotificationMakeCommand.php", "language": "php", "file_size": 4682, "cut_index": 614, "middle_length": 229}} {"prefix": "e Illuminate\\Console\\Command;\nuse Illuminate\\Support\\Collection;\nuse Illuminate\\Support\\ServiceProvider;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\nuse Symfony\\Component\\Console\\Input\\InputOption;\n\n#[AsCommand(name: 'optimize:clear')]\nclass OptimizeClearCommand extends Command\n{\n /**\n * The console command name.\n *\n * @var string\n */\n protected $name = 'optimize:clear';\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected $description", "suffix": " $exceptions = Collection::wrap(explode(',', $this->option('except') ?? ''))\n ->map(fn ($except) => trim($except))\n ->filter()\n ->unique()\n ->flip();\n\n $tasks = Collection::wrap($this->getOptimizeClearT", "middle": " = 'Remove the cached bootstrap files';\n\n /**\n * Execute the console command.\n *\n * @return void\n */\n public function handle()\n {\n $this->components->info('Clearing cached bootstrap files.');\n\n ", "meta": {"filepath": "src/Illuminate/Foundation/Console/OptimizeClearCommand.php", "language": "php", "file_size": 2106, "cut_index": 563, "middle_length": 229}} {"prefix": "hp\n\nnamespace Illuminate\\Foundation\\Console;\n\nuse Illuminate\\Console\\Command;\nuse Illuminate\\Foundation\\PackageManifest;\nuse Illuminate\\Support\\Collection;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\n\n#[AsCommand(name: 'package:discover')]\nclass PackageDiscoverCommand extends Command\n{\n /**\n * The console command signature.\n *\n * @var string\n */\n protected $signature = 'package:discover';\n\n /**\n * The console command description.\n *\n * @var string\n */\n prot", "suffix": "le(PackageManifest $manifest)\n {\n $this->components->info('Discovering packages');\n\n $manifest->build();\n\n (new Collection($manifest->manifest))\n ->keys()\n ->each(fn ($description) => $this->components->task($d", "middle": "ected $description = 'Rebuild the cached package manifest';\n\n /**\n * Execute the console command.\n *\n * @param \\Illuminate\\Foundation\\PackageManifest $manifest\n * @return void\n */\n public function hand", "meta": {"filepath": "src/Illuminate/Foundation/Console/PackageDiscoverCommand.php", "language": "php", "file_size": 1076, "cut_index": 515, "middle_length": 229}} {"prefix": "e Illuminate\\Console\\GeneratorCommand;\nuse Illuminate\\Support\\ServiceProvider;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\nuse Symfony\\Component\\Console\\Input\\InputOption;\n\n#[AsCommand(name: 'make:provider')]\nclass ProviderMakeCommand extends GeneratorCommand\n{\n /**\n * The console command name.\n *\n * @var string\n */\n protected $name = 'make:provider';\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected $description = 'Create a new ser", "suffix": " * @throws \\Illuminate\\Contracts\\Filesystem\\FileNotFoundException\n */\n public function handle()\n {\n $result = parent::handle();\n\n if ($result === false) {\n return $result;\n }\n\n ServiceProvider::addProviderTo", "middle": "vice provider class';\n\n /**\n * The type of class being generated.\n *\n * @var string\n */\n protected $type = 'Provider';\n\n /**\n * Execute the console command.\n *\n * @return bool|null\n *\n ", "meta": {"filepath": "src/Illuminate/Foundation/Console/ProviderMakeCommand.php", "language": "php", "file_size": 2263, "cut_index": 563, "middle_length": 229}} {"prefix": "call(...array_values($this->data));\n }\n\n /**\n * Get the display name for the queued job.\n *\n * @return string\n */\n public function displayName()\n {\n return array_values($this->da", "middle": " function __construct($data)\n {\n $this->data = $data;\n }\n\n /**\n * Handle the job.\n *\n * @param \\Illuminate\\Contracts\\Console\\Kernel $kernel\n * @return void\n */\n public function handle(Kern", "meta": {"filepath": "src/Illuminate/Foundation/Console/QueuedCommand.php", "language": "php", "file_size": 1013, "cut_index": 512, "middle_length": 229}} {"prefix": "\nnamespace Illuminate\\Foundation\\Console;\n\nuse Illuminate\\Console\\Command;\nuse Illuminate\\Filesystem\\Filesystem;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\n\n#[AsCommand(name: 'route:clear')]\nclass RouteClearCommand extends Command\n{\n /**\n * The console command name.\n *\n * @var string\n */\n protected $name = 'route:clear';\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected $description = 'Remove the route cache file';\n\n /**\n * ", "suffix": "s\n */\n public function __construct(Filesystem $files)\n {\n parent::__construct();\n\n $this->files = $files;\n }\n\n /**\n * Execute the console command.\n *\n * @return void\n */\n public function handle()\n {\n ", "middle": "The filesystem instance.\n *\n * @var \\Illuminate\\Filesystem\\Filesystem\n */\n protected $files;\n\n /**\n * Create a new route clear command instance.\n *\n * @param \\Illuminate\\Filesystem\\Filesystem $file", "meta": {"filepath": "src/Illuminate/Foundation/Console/RouteClearCommand.php", "language": "php", "file_size": 1146, "cut_index": 518, "middle_length": 229}} {"prefix": "n;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\nuse Symfony\\Component\\Console\\Input\\InputOption;\nuse Symfony\\Component\\Console\\Terminal;\n\n#[AsCommand(name: 'route:list')]\nclass RouteListCommand extends Command\n{\n /**\n * The console command name.\n *\n * @var string\n */\n protected $name = 'route:list';\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected $description = 'List all registered routes';\n\n /**\n * The router instance.\n ", "suffix": ", 'Middleware', 'Path'];\n\n /**\n * The terminal width resolver callback.\n *\n * @var \\Closure|null\n */\n protected static $terminalWidthResolver;\n\n /**\n * The verb colors for the command.\n *\n * @var array\n */\n prote", "middle": " *\n * @var \\Illuminate\\Routing\\Router\n */\n protected $router;\n\n /**\n * The table headers for the command.\n *\n * @var string[]\n */\n protected $headers = ['Domain', 'Method', 'URI', 'Name', 'Action'", "meta": {"filepath": "src/Illuminate/Foundation/Console/RouteListCommand.php", "language": "php", "file_size": 17079, "cut_index": 921, "middle_length": 229}} {"prefix": "e Illuminate\\Console\\Command;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\n\n#[AsCommand(name: 'storage:link')]\nclass StorageLinkCommand extends Command\n{\n /**\n * The console command signature.\n *\n * @var string\n */\n protected $signature = 'storage:link\n {--relative : Create the symbolic link using relative paths}\n {--force : Recreate existing symbolic links}';\n\n /**\n * The console command description.\n *\n * @var string\n */\n prot", "suffix": "('relative');\n\n foreach ($this->links() as $link => $target) {\n if (file_exists($link) && ! $this->isRemovableSymlink($link, $this->option('force'))) {\n $this->components->error(\"The [$link] link already exists.\");\n ", "middle": "ected $description = 'Create the symbolic links configured for the application';\n\n /**\n * Execute the console command.\n *\n * @return void\n */\n public function handle()\n {\n $relative = $this->option", "meta": {"filepath": "src/Illuminate/Foundation/Console/StorageLinkCommand.php", "language": "php", "file_size": 2106, "cut_index": 563, "middle_length": 229}} {"prefix": "bute\\AsCommand;\n\n#[AsCommand(name: 'stub:publish')]\nclass StubPublishCommand extends Command\n{\n /**\n * The name and signature of the console command.\n *\n * @var string\n */\n protected $signature = 'stub:publish\n {--existing : Publish and overwrite only the files that have already been published}\n {--force : Overwrite any existing files}';\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected $description = ", "suffix": "th('stubs'))) {\n (new Filesystem)->makeDirectory($stubsPath);\n }\n\n $stubs = [\n __DIR__.'/stubs/cast.inbound.stub' => 'cast.inbound.stub',\n __DIR__.'/stubs/cast.stub' => 'cast.stub',\n __DIR__.'/stubs", "middle": "'Publish all stubs that are available for customization';\n\n /**\n * Execute the console command.\n *\n * @return void\n */\n public function handle()\n {\n if (! is_dir($stubsPath = $this->laravel->basePa", "meta": {"filepath": "src/Illuminate/Foundation/Console/StubPublishCommand.php", "language": "php", "file_size": 6023, "cut_index": 716, "middle_length": 229}} {"prefix": "te\\Foundation\\Console;\n\nuse Illuminate\\Console\\Command;\nuse Illuminate\\Filesystem\\Filesystem;\nuse RuntimeException;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\n\n#[AsCommand(name: 'view:clear')]\nclass ViewClearCommand extends Command\n{\n /**\n * The console command name.\n *\n * @var string\n */\n protected $name = 'view:clear';\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected $description = 'Clear all compiled view files';\n\n /**\n ", "suffix": "iles\n */\n public function __construct(Filesystem $files)\n {\n parent::__construct();\n\n $this->files = $files;\n }\n\n /**\n * Execute the console command.\n *\n * @return void\n *\n * @throws \\RuntimeException\n ", "middle": "* The filesystem instance.\n *\n * @var \\Illuminate\\Filesystem\\Filesystem\n */\n protected $files;\n\n /**\n * Create a new config clear command instance.\n *\n * @param \\Illuminate\\Filesystem\\Filesystem $f", "meta": {"filepath": "src/Illuminate/Foundation/Console/ViewClearCommand.php", "language": "php", "file_size": 1680, "cut_index": 537, "middle_length": 229}} {"prefix": "use Illuminate\\Console\\GeneratorCommand;\nuse Illuminate\\Support\\Str;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\nuse Symfony\\Component\\Console\\Input\\InputInterface;\nuse Symfony\\Component\\Console\\Input\\InputOption;\nuse Symfony\\Component\\Console\\Output\\OutputInterface;\n\nuse function Laravel\\Prompts\\suggest;\n\n#[AsCommand(name: 'make:listener')]\nclass ListenerMakeCommand extends GeneratorCommand\n{\n use CreatesMatchingTest;\n\n /**\n * The console command name.\n *\n * @var string\n */\n ", "suffix": "rated.\n *\n * @var string\n */\n protected $type = 'Listener';\n\n /**\n * Build the class with the given name.\n *\n * @param string $name\n * @return string\n */\n protected function buildClass($name)\n {\n $event ", "middle": " protected $name = 'make:listener';\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected $description = 'Create a new event listener class';\n\n /**\n * The type of class being gene", "meta": {"filepath": "src/Illuminate/Foundation/Console/ListenerMakeCommand.php", "language": "php", "file_size": 4203, "cut_index": 614, "middle_length": 229}} {"prefix": "rgumentException;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\nuse Symfony\\Component\\Console\\Input\\InputInterface;\nuse Symfony\\Component\\Console\\Input\\InputOption;\nuse Symfony\\Component\\Console\\Output\\OutputInterface;\n\nuse function Laravel\\Prompts\\suggest;\n\n#[AsCommand(name: 'make:observer')]\nclass ObserverMakeCommand extends GeneratorCommand\n{\n /**\n * The console command name.\n *\n * @var string\n */\n protected $name = 'make:observer';\n\n /**\n * The console command descripti", "suffix": " * Build the class with the given name.\n *\n * @param string $name\n * @return string\n */\n protected function buildClass($name)\n {\n $stub = parent::buildClass($name);\n\n $model = $this->option('model');\n\n return $", "middle": "on.\n *\n * @var string\n */\n protected $description = 'Create a new observer class';\n\n /**\n * The type of class being generated.\n *\n * @var string\n */\n protected $type = 'Observer';\n\n /**\n ", "meta": {"filepath": "src/Illuminate/Foundation/Console/ObserverMakeCommand.php", "language": "php", "file_size": 4519, "cut_index": 614, "middle_length": 229}} {"prefix": "ponent\\Console\\Input\\InputInterface;\nuse Symfony\\Component\\Console\\Input\\InputOption;\nuse Symfony\\Component\\Console\\Output\\OutputInterface;\n\nuse function Laravel\\Prompts\\suggest;\n\n#[AsCommand(name: 'make:policy')]\nclass PolicyMakeCommand extends GeneratorCommand\n{\n /**\n * The console command name.\n *\n * @var string\n */\n protected $name = 'make:policy';\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected $description = 'Create a new policy cl", "suffix": "ring\n */\n protected function buildClass($name)\n {\n $stub = $this->replaceUserNamespace(\n parent::buildClass($name)\n );\n\n $model = $this->option('model');\n\n return $model ? $this->replaceModel($stub, $model) ", "middle": "ass';\n\n /**\n * The type of class being generated.\n *\n * @var string\n */\n protected $type = 'Policy';\n\n /**\n * Build the class with the given name.\n *\n * @param string $name\n * @return st", "meta": {"filepath": "src/Illuminate/Foundation/Console/PolicyMakeCommand.php", "language": "php", "file_size": 6115, "cut_index": 716, "middle_length": 229}} {"prefix": "te\\Foundation\\Console;\n\nuse Illuminate\\Console\\Command;\nuse Illuminate\\Support\\Collection;\nuse Illuminate\\Support\\ServiceProvider;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\nuse Symfony\\Component\\Console\\Input\\InputOption;\n\n#[AsCommand(name: 'reload')]\nclass ReloadCommand extends Command\n{\n /**\n * The console command name.\n *\n * @var string\n */\n protected $name = 'reload';\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected $descript", "suffix": "llection::wrap(explode(',', $this->option('except') ?? ''))\n ->map(fn ($except) => trim($except))\n ->filter()\n ->unique()\n ->flip();\n\n $tasks = Collection::wrap($this->getReloadTasks())\n ->rejec", "middle": "ion = 'Reload running services';\n\n /**\n * Execute the console command.\n *\n * @return void\n */\n public function handle()\n {\n $this->components->info('Reloading services.');\n\n $exceptions = Co", "meta": {"filepath": "src/Illuminate/Foundation/Console/ReloadCommand.php", "language": "php", "file_size": 1861, "cut_index": 537, "middle_length": 229}} {"prefix": "te\\Foundation\\Console;\n\nuse Illuminate\\Console\\GeneratorCommand;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\nuse Symfony\\Component\\Console\\Input\\InputOption;\n\n#[AsCommand(name: 'make:scope')]\nclass ScopeMakeCommand extends GeneratorCommand\n{\n /**\n * The console command name.\n *\n * @var string\n */\n protected $name = 'make:scope';\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected $description = 'Create a new scope class';\n\n /**\n ", "suffix": " {\n return $this->resolveStubPath('/stubs/scope.stub');\n }\n\n /**\n * Resolve the fully-qualified path to the stub.\n *\n * @param string $stub\n * @return string\n */\n protected function resolveStubPath($stub)\n {\n ", "middle": " * The type of class being generated.\n *\n * @var string\n */\n protected $type = 'Scope';\n\n /**\n * Get the stub file for the generator.\n *\n * @return string\n */\n protected function getStub()\n ", "meta": {"filepath": "src/Illuminate/Foundation/Console/ScopeMakeCommand.php", "language": "php", "file_size": 1742, "cut_index": 537, "middle_length": 229}} {"prefix": "t\\Collection;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\nuse Symfony\\Component\\Console\\Output\\OutputInterface;\nuse Symfony\\Component\\Finder\\Finder;\nuse Symfony\\Component\\Finder\\SplFileInfo;\n\n#[AsCommand(name: 'view:cache')]\nclass ViewCacheCommand extends Command\n{\n /**\n * The name and signature of the console command.\n *\n * @var string\n */\n protected $signature = 'view:cache';\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected $desc", "suffix": "his->paths()->each(function ($path) {\n $prefix = $this->output->isVeryVerbose() ? 'DIR ' : '';\n\n $this->components->task($prefix.$path, null, OutputInterface::VERBOSITY_VERBOSE);\n\n $this->compileV", "middle": "ription = \"Compile all of the application's Blade templates\";\n\n /**\n * Execute the console command.\n *\n * @return void\n */\n public function handle()\n {\n $this->callSilent('view:clear');\n\n $t", "meta": {"filepath": "src/Illuminate/Foundation/Console/ViewCacheCommand.php", "language": "php", "file_size": 3134, "cut_index": 614, "middle_length": 229}} {"prefix": "e;\n\nuse function Laravel\\Prompts\\confirm;\nuse function Laravel\\Prompts\\multiselect;\n\n#[AsCommand(name: 'make:model')]\nclass ModelMakeCommand extends GeneratorCommand\n{\n use CreatesMatchingTest;\n\n /**\n * The console command name.\n *\n * @var string\n */\n protected $name = 'make:model';\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected $description = 'Create a new Eloquent model class';\n\n /**\n * The type of class being generated.\n ", "suffix": "ption('force')) {\n if (! $this->alreadyExists($this->getNameInput())) {\n return false;\n }\n\n if (! confirm('Do you want to generate additional components for the model?')) {\n return false;\n ", "middle": " *\n * @var string\n */\n protected $type = 'Model';\n\n /**\n * Execute the console command.\n *\n * @return void\n */\n public function handle()\n {\n if (parent::handle() === false && ! $this->o", "meta": {"filepath": "src/Illuminate/Foundation/Console/ModelMakeCommand.php", "language": "php", "file_size": 10064, "cut_index": 921, "middle_length": 229}} {"prefix": "te\\Foundation\\Console;\n\nuse Illuminate\\Console\\GeneratorCommand;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\nuse Symfony\\Component\\Console\\Input\\InputOption;\n\n#[AsCommand(name: 'make:trait')]\nclass TraitMakeCommand extends GeneratorCommand\n{\n /**\n * The console command name.\n *\n * @var string\n */\n protected $name = 'make:trait';\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected $description = 'Create a new trait';\n\n /**\n * Th", "suffix": " return $this->resolveStubPath('/stubs/trait.stub');\n }\n\n /**\n * Resolve the fully-qualified path to the stub.\n *\n * @param string $stub\n * @return string\n */\n protected function resolveStubPath($stub)\n {\n retu", "middle": "e type of class being generated.\n *\n * @var string\n */\n protected $type = 'Trait';\n\n /**\n * Get the stub file for the generator.\n *\n * @return string\n */\n protected function getStub()\n {\n ", "meta": {"filepath": "src/Illuminate/Foundation/Console/TraitMakeCommand.php", "language": "php", "file_size": 1852, "cut_index": 537, "middle_length": 229}} {"prefix": "e Illuminate\\Console\\Command;\nuse Illuminate\\Support\\Collection;\nuse Illuminate\\Support\\ServiceProvider;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\nuse Symfony\\Component\\Console\\Input\\InputOption;\n\n#[AsCommand(name: 'optimize')]\nclass OptimizeCommand extends Command\n{\n /**\n * The console command name.\n *\n * @var string\n */\n protected $name = 'optimize';\n\n /**\n * The console command description.\n *\n * @var string\n */\n protected $description = 'Cache framewo", "suffix": "work bootstrap, configuration, and metadata.');\n\n $exceptions = Collection::wrap(explode(',', $this->option('except') ?? ''))\n ->map(fn ($except) => trim($except))\n ->filter()\n ->unique()\n ->flip();\n\n ", "middle": "rk bootstrap, configuration, and metadata to increase performance';\n\n /**\n * Execute the console command.\n *\n * @return void\n */\n public function handle()\n {\n $this->components->info('Caching frame", "meta": {"filepath": "src/Illuminate/Foundation/Console/OptimizeCommand.php", "language": "php", "file_size": 2085, "cut_index": 563, "middle_length": 229}} {"prefix": "e\\ConfirmableTrait;\nuse Illuminate\\Console\\Prohibitable;\nuse Illuminate\\Encryption\\Encrypter;\nuse Symfony\\Component\\Console\\Attribute\\AsCommand;\n\n#[AsCommand(name: 'key:generate')]\nclass KeyGenerateCommand extends Command\n{\n use ConfirmableTrait, Prohibitable;\n\n /**\n * The name and signature of the console command.\n *\n * @var string\n */\n protected $signature = 'key:generate\n {--show : Display the key instead of modifying files}\n {--force : Force", "suffix": " *\n * @return void\n */\n public function handle()\n {\n if ($this->isProhibited()) {\n return;\n }\n\n $key = $this->generateRandomKey();\n\n if ($this->option('show')) {\n return $this->line('callback, $e);\n\n if ($result === false) {\n return false;\n }\n\n return ! $this->shouldStop;\n }\n\n /**\n * Determine if the callback handles the given exception.\n *\n", "middle": "unction __construct(callable $callback)\n {\n $this->callback = $callback;\n }\n\n /**\n * Invoke the handler.\n *\n * @param \\Throwable $e\n * @return bool\n */\n public function __invoke(Throwable ", "meta": {"filepath": "src/Illuminate/Foundation/Exceptions/ReportableHandler.php", "language": "php", "file_size": 1547, "cut_index": 537, "middle_length": 229}} {"prefix": "pace Illuminate\\Foundation\\Events;\n\ntrait Dispatchable\n{\n /**\n * Dispatch the event with the given arguments.\n *\n * @param mixed ...$arguments\n * @return mixed\n */\n public static function dispatch(...$arguments)\n {\n return event(new static(...$arguments));\n }\n\n /**\n * Dispatch the event with the given arguments if the given truth test passes.\n *\n * @param bool $boolean\n * @param mixed ...$arguments\n * @return mixed\n */\n public static", "suffix": "est passes.\n *\n * @param bool $boolean\n * @param mixed ...$arguments\n * @return mixed\n */\n public static function dispatchUnless($boolean, ...$arguments)\n {\n if (! $boolean) {\n return event(new static(...$arg", "middle": " function dispatchIf($boolean, ...$arguments)\n {\n if ($boolean) {\n return event(new static(...$arguments));\n }\n }\n\n /**\n * Dispatch the event with the given arguments unless the given truth t", "meta": {"filepath": "src/Illuminate/Foundation/Events/Dispatchable.php", "language": "php", "file_size": 1324, "cut_index": 524, "middle_length": 229}} {"prefix": "PHPUnit\\Framework\\Assert as PHPUnit;\n\nclass Factory\n{\n use Macroable {\n __call as macroCall;\n }\n\n /**\n * Indicates if the process factory has faked process handlers.\n *\n * @var bool\n */\n protected $recording = false;\n\n /**\n * All of the recorded processes.\n *\n * @var array\n */\n protected $recorded = [];\n\n /**\n * The registered fake handler callbacks.\n *\n * @var array\n */\n protected $fakeHandlers = [];\n\n /**\n * Indicates th", "suffix": "aram array|string $output\n * @param array|string $errorOutput\n * @param int $exitCode\n * @return \\Illuminate\\Process\\FakeProcessResult\n */\n public function result(array|string $output = '', array|string $errorOutput = '', int $exit", "middle": "at an exception should be thrown if any process is not faked.\n *\n * @var bool\n */\n protected $preventStrayProcesses = false;\n\n /**\n * Create a new fake process response for testing purposes.\n *\n * @p", "meta": {"filepath": "src/Illuminate/Process/Factory.php", "language": "php", "file_size": 8610, "cut_index": 716, "middle_length": 229}} {"prefix": "ing faked.\n *\n * @var string\n */\n protected $command;\n\n /**\n * The underlying process description.\n *\n * @var \\Illuminate\\Process\\FakeProcessDescription\n */\n protected $process;\n\n /**\n * The signals that have been received.\n *\n * @var array\n */\n protected $receivedSignals = [];\n\n /**\n * The number of times the process should indicate that it is \"running\".\n *\n * @var int|null\n */\n protected $remainingRunIterations;\n\n /**\n ", "suffix": "*\n * The current error output's index.\n *\n * @var int\n */\n protected $nextErrorOutputIndex = 0;\n\n /**\n * Create a new invoked process instance.\n *\n * @param string $command\n * @param \\Illuminate\\Process\\FakeProcessD", "middle": " * The general output handler callback.\n *\n * @var callable|null\n */\n protected $outputHandler;\n\n /**\n * The current output's index.\n *\n * @var int\n */\n protected $nextOutputIndex = 0;\n\n /*", "meta": {"filepath": "src/Illuminate/Process/FakeInvokedProcess.php", "language": "php", "file_size": 8310, "cut_index": 716, "middle_length": 229}} {"prefix": " */\n public $processId = 1000;\n\n /**\n * All of the process' output in the order it was described.\n *\n * @var array\n */\n public $output = [];\n\n /**\n * The process' exit code.\n *\n * @var int\n */\n public $exitCode = 0;\n\n /**\n * The number of times the process should indicate that it is \"running\".\n *\n * @var int\n */\n public $runIterations = 0;\n\n /**\n * Specify the process ID that should be assigned to the process.\n *\n * @par", "suffix": "param array|string $output\n * @return $this\n */\n public function output(array|string $output)\n {\n if (is_array($output)) {\n (new Collection($output))->each(fn ($line) => $this->output($line));\n\n return $this;\n ", "middle": "am int $processId\n * @return $this\n */\n public function id(int $processId)\n {\n $this->processId = $processId;\n\n return $this;\n }\n\n /**\n * Describe a line of standard output.\n *\n * @", "meta": {"filepath": "src/Illuminate/Process/FakeProcessDescription.php", "language": "php", "file_size": 5207, "cut_index": 716, "middle_length": 229}} {"prefix": "ontract;\nuse Illuminate\\Process\\Exceptions\\ProcessFailedException;\nuse Illuminate\\Support\\Collection;\n\nclass FakeProcessResult implements ProcessResultContract\n{\n /**\n * The command string.\n *\n * @var string\n */\n protected $command;\n\n /**\n * The process exit code.\n *\n * @var int\n */\n protected $exitCode;\n\n /**\n * The process output.\n *\n * @var string\n */\n protected $output = '';\n\n /**\n * The process error output.\n *\n * @var str", "suffix": "ing $errorOutput\n */\n public function __construct(string $command = '', int $exitCode = 0, array|string $output = '', array|string $errorOutput = '')\n {\n $this->command = $command;\n $this->exitCode = $exitCode;\n $this->outpu", "middle": "ing\n */\n protected $errorOutput = '';\n\n /**\n * Create a new process result instance.\n *\n * @param string $command\n * @param int $exitCode\n * @param array|string $output\n * @param array|str", "meta": {"filepath": "src/Illuminate/Process/FakeProcessResult.php", "language": "php", "file_size": 4571, "cut_index": 614, "middle_length": 229}} {"prefix": "ontract;\nuse OutOfBoundsException;\n\nclass FakeProcessSequence\n{\n /**\n * The fake process results and descriptions.\n *\n * @var array\n */\n protected $processes = [];\n\n /**\n * Indicates that invoking this sequence when it is empty should throw an exception.\n *\n * @var bool\n */\n protected $failWhenEmpty = true;\n\n /**\n * The response that should be returned when the sequence is empty.\n *\n * @var \\Illuminate\\Contracts\\Process\\ProcessResult|\\Illuminate\\Pro", "suffix": " {\n $this->processes = $processes;\n }\n\n /**\n * Push a new process result or description onto the sequence.\n *\n * @param \\Illuminate\\Contracts\\Process\\ProcessResult|\\Illuminate\\Process\\FakeProcessDescription|array|string $proce", "middle": "cess\\FakeProcessDescription\n */\n protected $emptyProcess;\n\n /**\n * Create a new fake process sequence instance.\n *\n * @param array $processes\n */\n public function __construct(array $processes = [])\n", "meta": {"filepath": "src/Illuminate/Process/FakeProcessSequence.php", "language": "php", "file_size": 3457, "cut_index": 614, "middle_length": 229}} {"prefix": "sContract;\nuse Illuminate\\Process\\Exceptions\\ProcessTimedOutException;\nuse Symfony\\Component\\Process\\Exception\\ProcessTimedOutException as SymfonyTimeoutException;\nuse Symfony\\Component\\Process\\Process;\n\nclass InvokedProcess implements InvokedProcessContract\n{\n /**\n * The underlying process instance.\n *\n * @var \\Symfony\\Component\\Process\\Process\n */\n protected $process;\n\n /**\n * Create a new invoked process instance.\n *\n * @param \\Symfony\\Component\\Process\\Process $pro", "suffix": "unction id()\n {\n return $this->process->getPid();\n }\n\n /**\n * Get the command line for the process.\n *\n * @return string\n */\n public function command()\n {\n return $this->process->getCommandLine();\n }\n\n /**", "middle": "cess\n */\n public function __construct(Process $process)\n {\n $this->process = $process;\n }\n\n /**\n * Get the process ID if the process is still running.\n *\n * @return int|null\n */\n public f", "meta": {"filepath": "src/Illuminate/Process/InvokedProcess.php", "language": "php", "file_size": 4114, "cut_index": 614, "middle_length": 229}} {"prefix": "te\\Process;\n\nuse Countable;\nuse Illuminate\\Support\\Collection;\n\nclass InvokedProcessPool implements Countable\n{\n /**\n * The array of invoked processes.\n *\n * @var array\n */\n protected $invokedProcesses;\n\n /**\n * Create a new invoked process pool.\n *\n * @param array $invokedProcesses\n */\n public function __construct(array $invokedProcesses)\n {\n $this->invokedProcesses = $invokedProcesses;\n }\n\n /**\n * Send a signal to each running process in th", "suffix": "gnal($signal);\n }\n\n /**\n * Stop all processes that are still running.\n *\n * @param float $timeout\n * @param int|null $signal\n * @return \\Illuminate\\Support\\Collection\n */\n public function stop(float $timeout = 10, ?int ", "middle": "e pool, returning the processes that were signalled.\n *\n * @param int $signal\n * @return \\Illuminate\\Support\\Collection\n */\n public function signal(int $signal)\n {\n return $this->running()->each->si", "meta": {"filepath": "src/Illuminate/Process/InvokedProcessPool.php", "language": "php", "file_size": 1823, "cut_index": 537, "middle_length": 229}} {"prefix": "s\\Process;\n\nclass PendingProcess\n{\n use Conditionable;\n\n /**\n * The process factory instance.\n *\n * @var \\Illuminate\\Process\\Factory\n */\n protected $factory;\n\n /**\n * The command to invoke the process.\n *\n * @var array|string|null\n */\n public $command;\n\n /**\n * The working directory of the process.\n *\n * @var string|null\n */\n public $path;\n\n /**\n * The maximum number of seconds the process may run.\n *\n * @", "suffix": "ronment variables for the process.\n *\n * @var array\n */\n public $environment = [];\n\n /**\n * The standard input data that should be piped into the command.\n *\n * @var string|int|float|bool|resource|\\Traversable|null\n */\n ", "middle": "var int|null\n */\n public $timeout = 60;\n\n /**\n * The maximum number of seconds the process may go without returning output.\n *\n * @var int\n */\n public $idleTimeout;\n\n /**\n * The additional envi", "meta": {"filepath": "src/Illuminate/Process/PendingProcess.php", "language": "php", "file_size": 12086, "cut_index": 921, "middle_length": 229}} {"prefix": "e\\Support\\Collection;\nuse InvalidArgumentException;\n\n/**\n * @mixin \\Illuminate\\Process\\Factory\n * @mixin \\Illuminate\\Process\\PendingProcess\n */\nclass Pipe\n{\n /**\n * The process factory instance.\n *\n * @var \\Illuminate\\Process\\Factory\n */\n protected $factory;\n\n /**\n * The callback that resolves the pending processes.\n *\n * @var callable\n */\n protected $callback;\n\n /**\n * The array of pending processes.\n *\n * @var array\n */\n protected $pendingP", "suffix": "ble $callback)\n {\n $this->factory = $factory;\n $this->callback = $callback;\n }\n\n /**\n * Add a process to the pipe with a key.\n *\n * @param string $key\n * @return \\Illuminate\\Process\\PendingProcess\n */\n public", "middle": "rocesses = [];\n\n /**\n * Create a new series of piped processes.\n *\n * @param \\Illuminate\\Process\\Factory $factory\n * @param callable $callback\n */\n public function __construct(Factory $factory, calla", "meta": {"filepath": "src/Illuminate/Process/Pipe.php", "language": "php", "file_size": 2858, "cut_index": 563, "middle_length": 229}} {"prefix": "\n\n/**\n * @mixin \\Illuminate\\Process\\Factory\n * @mixin \\Illuminate\\Process\\PendingProcess\n */\nclass Pool\n{\n /**\n * The process factory instance.\n *\n * @var \\Illuminate\\Process\\Factory\n */\n protected $factory;\n\n /**\n * The callback that resolves the pending processes.\n *\n * @var callable\n */\n protected $callback;\n\n /**\n * The array of pending processes.\n *\n * @var array\n */\n protected $pendingProcesses = [];\n\n /**\n * Create a new process", "suffix": "$this->callback = $callback;\n }\n\n /**\n * Add a process to the pool with a key.\n *\n * @param string $key\n * @return \\Illuminate\\Process\\PendingProcess\n */\n public function as(string $key)\n {\n return tap($this->factor", "middle": " pool.\n *\n * @param \\Illuminate\\Process\\Factory $factory\n * @param callable $callback\n */\n public function __construct(Factory $factory, callable $callback)\n {\n $this->factory = $factory;\n ", "meta": {"filepath": "src/Illuminate/Process/Pool.php", "language": "php", "file_size": 3112, "cut_index": 614, "middle_length": 229}} {"prefix": "te\\Process;\n\nuse ArrayAccess;\nuse Illuminate\\Support\\Collection;\n\nclass ProcessPoolResults implements ArrayAccess\n{\n /**\n * The results of the processes.\n *\n * @var array\n */\n protected $results = [];\n\n /**\n * Create a new process pool result set.\n *\n * @param array $results\n */\n public function __construct(array $results)\n {\n $this->results = $results;\n }\n\n /**\n * Determine if all of the processes in the pool were successful.\n *\n * @", "suffix": "l\n */\n public function failed()\n {\n return ! $this->successful();\n }\n\n /**\n * Get the results as a collection.\n *\n * @return \\Illuminate\\Support\\Collection\n */\n public function collect()\n {\n return new Co", "middle": "return bool\n */\n public function successful()\n {\n return $this->collect()->every(fn ($p) => $p->successful());\n }\n\n /**\n * Determine if any of the processes in the pool failed.\n *\n * @return boo", "meta": {"filepath": "src/Illuminate/Process/ProcessPoolResults.php", "language": "php", "file_size": 1967, "cut_index": 537, "middle_length": 229}} {"prefix": "ontract;\nuse Illuminate\\Process\\Exceptions\\ProcessFailedException;\nuse Symfony\\Component\\Process\\Process;\n\nclass ProcessResult implements ProcessResultContract\n{\n /**\n * The underlying process instance.\n *\n * @var \\Symfony\\Component\\Process\\Process\n */\n protected $process;\n\n /**\n * Create a new process result instance.\n *\n * @param \\Symfony\\Component\\Process\\Process $process\n */\n public function __construct(Process $process)\n {\n $this->process = $proce", "suffix": " if the process was successful.\n *\n * @return bool\n */\n public function successful()\n {\n return $this->process->isSuccessful();\n }\n\n /**\n * Determine if the process failed.\n *\n * @return bool\n */\n public fu", "middle": "ss;\n }\n\n /**\n * Get the original command executed by the process.\n *\n * @return string\n */\n public function command()\n {\n return $this->process->getCommandLine();\n }\n\n /**\n * Determine", "meta": {"filepath": "src/Illuminate/Process/ProcessResult.php", "language": "php", "file_size": 3148, "cut_index": 614, "middle_length": 229}} {"prefix": "?php\n\nnamespace Illuminate\\Process\\Exceptions;\n\nuse Illuminate\\Contracts\\Process\\ProcessResult;\nuse RuntimeException;\n\nclass ProcessFailedException extends RuntimeException\n{\n /**\n * The process result instance.\n *\n * @var \\Illuminate\\Contracts\\Process\\ProcessResult\n */\n public $result;\n\n /**\n * Create a new exception instance.\n *\n * @param \\Illuminate\\Contracts\\Process\\ProcessResult $result\n */\n public function __construct(ProcessResult $result)\n {\n $", "suffix": "$error .= sprintf(\"\\n\\nOutput:\\n================\\n%s\", $result->output());\n }\n\n if (! empty($result->errorOutput())) {\n $error .= sprintf(\"\\n\\nError Output:\\n================\\n%s\", $result->errorOutput());\n }\n\n parent", "middle": "this->result = $result;\n\n $error = sprintf('The command \"%s\" failed.'.\"\\n\\nExit Code: %s\",\n $result->command(),\n $result->exitCode(),\n );\n\n if (! empty($result->output())) {\n ", "meta": {"filepath": "src/Illuminate/Process/Exceptions/ProcessFailedException.php", "language": "php", "file_size": 1055, "cut_index": 513, "middle_length": 229}} {"prefix": "\\Exceptions;\n\nuse Illuminate\\Contracts\\Process\\ProcessResult;\nuse Symfony\\Component\\Process\\Exception\\ProcessTimedOutException as SymfonyTimeoutException;\nuse Symfony\\Component\\Process\\Exception\\RuntimeException;\n\nclass ProcessTimedOutException extends RuntimeException\n{\n /**\n * The process result instance.\n *\n * @var \\Illuminate\\Contracts\\Process\\ProcessResult\n */\n public $result;\n\n /**\n * Create a new exception instance.\n *\n * @param \\Symfony\\Component\\Process\\Excepti", "suffix": " \\Illuminate\\Contracts\\Process\\ProcessResult $result\n */\n public function __construct(SymfonyTimeoutException $original, ProcessResult $result)\n {\n $this->result = $result;\n\n parent::__construct($original->getMessage(), $original-", "middle": "on\\ProcessTimedOutException $original\n * @param", "meta": {"filepath": "src/Illuminate/Process/Exceptions/ProcessTimedOutException.php", "language": "php", "file_size": 887, "cut_index": 547, "middle_length": 52}} {"prefix": "roable;\nuse Symfony\\Component\\HttpFoundation\\Cookie;\n\nclass CookieJar implements JarContract\n{\n use InteractsWithTime, Macroable;\n\n /**\n * The default path (if specified).\n *\n * @var string\n */\n protected $path = '/';\n\n /**\n * The default domain (if specified).\n *\n * @var string|null\n */\n protected $domain;\n\n /**\n * The default secure setting (defaults to null).\n *\n * @var bool|null\n */\n protected $secure;\n\n /**\n * The default SameS", "suffix": "tected $queued = [];\n\n /**\n * Create a new cookie instance.\n *\n * @param string $name\n * @param string $value\n * @param int $minutes\n * @param string|null $path\n * @param string|null $domain\n * @param bool|null", "middle": "ite option (defaults to lax).\n *\n * @var string\n */\n protected $sameSite = 'lax';\n\n /**\n * All of the cookies queued for sending.\n *\n * @var \\Symfony\\Component\\HttpFoundation\\Cookie[]\n */\n pro", "meta": {"filepath": "src/Illuminate/Cookie/CookieJar.php", "language": "php", "file_size": 6380, "cut_index": 716, "middle_length": 229}} {"prefix": "\nnamespace Illuminate\\Cookie;\n\nclass CookieValuePrefix\n{\n /**\n * Create a new cookie value prefix for the given cookie name.\n *\n * @param string $cookieName\n * @param string $key\n * @return string\n */\n public static function create($cookieName, $key)\n {\n return hash_hmac('sha1', $cookieName.'v2', $key).'|';\n }\n\n /**\n * Remove the cookie value prefix.\n *\n * @param string $cookieValue\n * @return string\n */\n public static function remov", "suffix": " * @param string $cookieName\n * @param string $cookieValue\n * @param array $keys\n * @return string|null\n */\n public static function validate($cookieName, $cookieValue, array $keys)\n {\n foreach ($keys as $key) {\n ", "middle": "e($cookieValue)\n {\n return substr($cookieValue, 41);\n }\n\n /**\n * Validate a cookie value contains a valid prefix. If it does, return the cookie value with the prefix removed. Otherwise, return null.\n *\n ", "meta": {"filepath": "src/Illuminate/Cookie/CookieValuePrefix.php", "language": "php", "file_size": 1211, "cut_index": 518, "middle_length": 229}} {"prefix": "inate\\Contracts\\Cookie\\QueueingFactory as CookieJar;\n\nclass AddQueuedCookiesToResponse\n{\n /**\n * The cookie jar instance.\n *\n * @var \\Illuminate\\Contracts\\Cookie\\QueueingFactory\n */\n protected $cookies;\n\n /**\n * Create a new CookieQueue instance.\n *\n * @param \\Illuminate\\Contracts\\Cookie\\QueueingFactory $cookies\n */\n public function __construct(CookieJar $cookies)\n {\n $this->cookies = $cookies;\n }\n\n /**\n * Handle an incoming request.\n *\n ", "suffix": " * @param \\Closure $next\n * @return mixed\n */\n public function handle($request, Closure $next)\n {\n $response = $next($request);\n\n foreach ($this->cookies->getQueuedCookies() as $cookie) {\n $response->headers->setCo", "middle": " * @param \\Illuminate\\Http\\Request $request\n ", "meta": {"filepath": "src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php", "language": "php", "file_size": 950, "cut_index": 582, "middle_length": 52}} {"prefix": "\\CookieValuePrefix;\nuse Illuminate\\Support\\Arr;\nuse Symfony\\Component\\HttpFoundation\\Cookie;\nuse Symfony\\Component\\HttpFoundation\\Request;\nuse Symfony\\Component\\HttpFoundation\\Response;\n\nclass EncryptCookies\n{\n /**\n * The encrypter instance.\n *\n * @var \\Illuminate\\Contracts\\Encryption\\Encrypter\n */\n protected $encrypter;\n\n /**\n * The names of the cookies that should not be encrypted.\n *\n * @var array\n */\n protected $except = [];\n\n /**\n * The gl", "suffix": "ed static $serialize = false;\n\n /**\n * Create a new CookieGuard instance.\n *\n * @param \\Illuminate\\Contracts\\Encryption\\Encrypter $encrypter\n */\n public function __construct(EncrypterContract $encrypter)\n {\n $this->encrypt", "middle": "obally ignored cookies that should not be encrypted.\n *\n * @var array\n */\n protected static $neverEncrypt = [];\n\n /**\n * Indicates if cookies should be serialized.\n *\n * @var bool\n */\n protect", "meta": {"filepath": "src/Illuminate/Cookie/Middleware/EncryptCookies.php", "language": "php", "file_size": 6622, "cut_index": 716, "middle_length": 229}} {"prefix": " * This is a PHP 7.4 compatible implementation of is_callable.\n *\n * @param mixed $var\n * @param bool $syntaxOnly\n * @return bool\n */\n public static function isCallable($var, $syntaxOnly = false)\n {\n if (! is_array($var)) {\n return is_callable($var, $syntaxOnly);\n }\n\n if (! isset($var[0], $var[1]) || ! is_string($var[1] ?? null)) {\n return false;\n }\n\n if ($syntaxOnly &&\n (is_string($var[0]) || is_object($var", "suffix": "urn false;\n }\n\n if (method_exists($class, $method)) {\n return (new ReflectionMethod($class, $method))->isPublic();\n }\n\n if (is_object($var[0]) && method_exists($class, '__call')) {\n return (new ReflectionMe", "middle": "[0])) &&\n is_string($var[1])) {\n return true;\n }\n\n $class = is_object($var[0]) ? get_class($var[0]) : $var[0];\n\n $method = $var[1];\n\n if (! class_exists($class)) {\n ret", "meta": {"filepath": "src/Illuminate/Reflection/Reflector.php", "language": "php", "file_size": 6305, "cut_index": 716, "middle_length": 229}} {"prefix": "es;\n\nif (! function_exists('lazy')) {\n /**\n * Create a lazy instance.\n *\n * @template TValue of object\n *\n * @param class-string|(\\Closure(TValue): mixed) $class\n * @param (\\Closure(TValue): mixed)|int $callback\n * @param int $options\n * @param array $eager\n * @return TValue\n */\n function lazy($class, $callback = 0, $options = 0, $eager = [])\n {\n static $closureReflector;\n\n $closureReflector ??= new class\n {", "suffix": "$options] = is_string($class)\n ? [$class, $callback, $options]\n : [$closureReflector->typeFromParameter($class), $class, $callback ?: $options];\n\n $reflectionClass = new ReflectionClass($class);\n\n $instance = $reflection", "middle": "\n use ReflectsClosures;\n\n public function typeFromParameter($callback)\n {\n return $this->firstClosureParameterType($callback);\n }\n };\n\n [$class, $callback, ", "meta": {"filepath": "src/Illuminate/Reflection/helpers.php", "language": "php", "file_size": 2869, "cut_index": 563, "middle_length": 229}} {"prefix": "inate\\Support\\Reflector;\nuse ReflectionFunction;\nuse ReflectionIntersectionType;\nuse ReflectionUnionType;\nuse RuntimeException;\n\ntrait ReflectsClosures\n{\n /**\n * Get the class name of the first parameter of the given Closure.\n *\n * @param \\Closure $closure\n * @return string\n *\n * @throws \\ReflectionException\n * @throws \\RuntimeException\n */\n protected function firstClosureParameterType(Closure $closure)\n {\n $types = array_values($this->closureParameterTypes(", "suffix": "given Closure is missing a type hint.');\n }\n\n return $types[0];\n }\n\n /**\n * Get the class names of the first parameter of the given Closure, including union types.\n *\n * @param \\Closure $closure\n * @return array\n *", "middle": "$closure));\n\n if (! $types) {\n throw new RuntimeException('The given Closure has no parameters.');\n }\n\n if ($types[0] === null) {\n throw new RuntimeException('The first parameter of the ", "meta": {"filepath": "src/Illuminate/Reflection/Traits/ReflectsClosures.php", "language": "php", "file_size": 3714, "cut_index": 614, "middle_length": 229}} {"prefix": "\nuse Illuminate\\Contracts\\Container\\Container;\nuse Illuminate\\Contracts\\Pipeline\\Hub as HubContract;\n\nclass Hub implements HubContract\n{\n /**\n * The container implementation.\n *\n * @var \\Illuminate\\Contracts\\Container\\Container|null\n */\n protected $container;\n\n /**\n * All of the available pipelines.\n *\n * @var array\n */\n protected $pipelines = [];\n\n /**\n * Create a new Hub instance.\n *\n * @param \\Illuminate\\Contracts\\Container\\Container|null $cont", "suffix": "eturn void\n */\n public function defaults(Closure $callback)\n {\n $this->pipeline('default', $callback);\n }\n\n /**\n * Define a new named pipeline.\n *\n * @param string $name\n * @param \\Closure $callback\n * @return", "middle": "ainer\n */\n public function __construct(?Container $container = null)\n {\n $this->container = $container;\n }\n\n /**\n * Define the default named pipeline.\n *\n * @param \\Closure $callback\n * @r", "meta": {"filepath": "src/Illuminate/Pipeline/Hub.php", "language": "php", "file_size": 2089, "cut_index": 563, "middle_length": 229}} {"prefix": "e;\nuse Illuminate\\Support\\Traits\\Macroable;\nuse RuntimeException;\nuse Throwable;\n\nclass Pipeline implements PipelineContract\n{\n use Conditionable;\n use Macroable;\n\n /**\n * The container implementation.\n *\n * @var \\Illuminate\\Contracts\\Container\\Container|null\n */\n protected $container;\n\n /**\n * The object being passed through the pipeline.\n *\n * @var mixed\n */\n protected $passable;\n\n /**\n * The array of class pipes.\n *\n * @var array\n */\n ", "suffix": " the outcome.\n *\n * @var \\Closure|null\n */\n protected $finally;\n\n /**\n * Indicates whether to wrap the pipeline in a database transaction.\n *\n * @var string|null|\\UnitEnum|false\n */\n protected $withinTransaction = false", "middle": " protected $pipes = [];\n\n /**\n * The method to call on each pipe.\n *\n * @var string\n */\n protected $method = 'handle';\n\n /**\n * The final callback to be executed after the pipeline ends regardless of", "meta": {"filepath": "src/Illuminate/Pipeline/Pipeline.php", "language": "php", "file_size": 8308, "cut_index": 716, "middle_length": 229}} {"prefix": "espace Illuminate\\Pipeline;\n\nuse Illuminate\\Contracts\\Pipeline\\Hub as PipelineHubContract;\nuse Illuminate\\Contracts\\Support\\DeferrableProvider;\nuse Illuminate\\Support\\ServiceProvider;\n\nclass PipelineServiceProvider extends ServiceProvider implements DeferrableProvider\n{\n /**\n * Register the service provider.\n *\n * @return void\n */\n public function register()\n {\n $this->app->singleton(\n PipelineHubContract::class,\n Hub::class\n );\n\n $this->ap", "suffix": "ine', fn ($app) => new Pipeline($app));\n }\n\n /**\n * Get the services provided by the provider.\n *\n * @return array\n */\n public function provides()\n {\n return [\n PipelineHubContract::class,\n 'pipeline", "middle": "p->bind('pipel", "meta": {"filepath": "src/Illuminate/Pipeline/PipelineServiceProvider.php", "language": "php", "file_size": 814, "cut_index": 522, "middle_length": 14}} {"prefix": "e\\Contracts\\Queue\\ShouldQueue;\nuse Illuminate\\Queue\\InteractsWithQueue;\n\nclass CallQueuedListener implements ShouldQueue\n{\n use InteractsWithQueue, Queueable;\n\n /**\n * The listener class name.\n *\n * @var class-string\n */\n public $class;\n\n /**\n * The listener method.\n *\n * @var string\n */\n public $method;\n\n /**\n * The data to be passed to the listener.\n *\n * @var array\n */\n public $data;\n\n /**\n * The number of times the job may be at", "suffix": "seconds to wait before retrying a job that encountered an uncaught exception.\n *\n * @var int\n */\n public $backoff;\n\n /**\n * The timestamp indicating when the job should timeout.\n *\n * @var int\n */\n public $retryUntil;\n\n", "middle": "tempted.\n *\n * @var int\n */\n public $tries;\n\n /**\n * The maximum number of exceptions allowed, regardless of attempts.\n *\n * @var int\n */\n public $maxExceptions;\n\n /**\n * The number of ", "meta": {"filepath": "src/Illuminate/Events/CallQueuedListener.php", "language": "php", "file_size": 5608, "cut_index": 716, "middle_length": 229}} {"prefix": "use Illuminate\\Queue\\Attributes\\Backoff;\nuse Illuminate\\Queue\\Attributes\\Connection;\nuse Illuminate\\Queue\\Attributes\\Delay;\nuse Illuminate\\Queue\\Attributes\\DeleteWhenMissingModels;\nuse Illuminate\\Queue\\Attributes\\FailOnTimeout;\nuse Illuminate\\Queue\\Attributes\\MaxExceptions;\nuse Illuminate\\Queue\\Attributes\\Queue as QueueAttribute;\nuse Illuminate\\Queue\\Attributes\\Timeout;\nuse Illuminate\\Queue\\Attributes\\Tries;\nuse Illuminate\\Queue\\Attributes\\UniqueFor;\nuse Illuminate\\Support\\Arr;\nuse Illuminate\\Support\\Collec", "suffix": "res;\nuse ReflectionClass;\n\nuse function Illuminate\\Support\\enum_value;\n\nclass Dispatcher implements DispatcherContract\n{\n use Macroable, ReadsClassAttributes, ReflectsClosures, ResolvesQueueRoutes;\n\n /**\n * The IoC container instance.\n *\n ", "middle": "tion;\nuse Illuminate\\Support\\Queue\\Concerns\\ResolvesQueueRoutes;\nuse Illuminate\\Support\\Str;\nuse Illuminate\\Support\\Traits\\Macroable;\nuse Illuminate\\Support\\Traits\\ReadsClassAttributes;\nuse Illuminate\\Support\\Traits\\ReflectsClosu", "meta": {"filepath": "src/Illuminate/Events/Dispatcher.php", "language": "php", "file_size": 27570, "cut_index": 1331, "middle_length": 229}} {"prefix": "nate\\Support\\Collection;\n\nclass InvokeQueuedClosure\n{\n /**\n * Handle the event.\n *\n * @param \\Laravel\\SerializableClosure\\SerializableClosure $closure\n * @param array $arguments\n * @return void\n */\n public function handle($closure, array $arguments)\n {\n call_user_func($closure->getClosure(), ...$arguments);\n }\n\n /**\n * Handle a job failure.\n *\n * @param \\Laravel\\SerializableClosure\\SerializableClosure $closure\n * @param array $arguments\n ", "suffix": "\\Throwable $exception\n * @return void\n */\n public function failed($closure, array $arguments, array $catchCallbacks, $exception)\n {\n $arguments[] = $exception;\n\n (new Collection($catchCallbacks))->each->__invoke(...$arguments);", "middle": " * @param array $catchCallbacks\n * @param ", "meta": {"filepath": "src/Illuminate/Events/InvokeQueuedClosure.php", "language": "php", "file_size": 876, "cut_index": 559, "middle_length": 52}} {"prefix": "\nuse Illuminate\\Support\\Traits\\ForwardsCalls;\n\nclass NullDispatcher implements DispatcherContract\n{\n use ForwardsCalls;\n\n /**\n * The underlying event dispatcher instance.\n *\n * @var \\Illuminate\\Contracts\\Events\\Dispatcher\n */\n protected $dispatcher;\n\n /**\n * Create a new event dispatcher instance that does not fire.\n *\n * @param \\Illuminate\\Contracts\\Events\\Dispatcher $dispatcher\n */\n public function __construct(DispatcherContract $dispatcher)\n {\n $", "suffix": "atch($event, $payload = [], $halt = false)\n {\n //\n }\n\n /**\n * Don't register an event and payload to be fired later.\n *\n * @param string $event\n * @param array $payload\n * @return void\n */\n public function pus", "middle": "this->dispatcher = $dispatcher;\n }\n\n /**\n * Don't fire an event.\n *\n * @param string|object $event\n * @param mixed $payload\n * @param bool $halt\n * @return void\n */\n public function disp", "meta": {"filepath": "src/Illuminate/Events/NullDispatcher.php", "language": "php", "file_size": 3097, "cut_index": 614, "middle_length": 229}} {"prefix": "lizableClosure\\SerializableClosure;\n\nuse function Illuminate\\Support\\enum_value;\n\nclass QueuedClosure\n{\n /**\n * The underlying Closure.\n *\n * @var \\Closure\n */\n public $closure;\n\n /**\n * The name of the connection the job should be sent to.\n *\n * @var string|null\n */\n public $connection;\n\n /**\n * The name of the queue the job should be sent to.\n *\n * @var string|null\n */\n public $queue;\n\n /**\n * The job \"group\" the job should be sent t", "suffix": "osure|null\n */\n public $deduplicator;\n\n /**\n * The number of seconds before the job should be made available.\n *\n * @var \\DateTimeInterface|\\DateInterval|int|null\n */\n public $delay;\n\n /**\n * All of the \"catch\" callbacks", "middle": "o.\n *\n * @var string|null\n */\n public $messageGroup;\n\n /**\n * The job deduplicator callback the job should use to generate the deduplication ID.\n *\n * @var \\Laravel\\SerializableClosure\\SerializableCl", "meta": {"filepath": "src/Illuminate/Events/QueuedClosure.php", "language": "php", "file_size": 4072, "cut_index": 614, "middle_length": 229}} {"prefix": "te\\Notifications;\n\nuse Illuminate\\Contracts\\Notifications\\Dispatcher;\nuse InvalidArgumentException;\n\nclass AnonymousNotifiable\n{\n /**\n * All of the notification routing information.\n *\n * @var array\n */\n public $routes = [];\n\n /**\n * Add routing information to the target.\n *\n * @param string $channel\n * @param mixed $route\n * @return $this\n *\n * @throws \\InvalidArgumentException\n */\n public function route($channel, $route)\n {\n if ($ch", "suffix": " * Send the given notification.\n *\n * @param mixed $notification\n * @return void\n */\n public function notify($notification)\n {\n app(Dispatcher::class)->send($this, $notification);\n }\n\n /**\n * Send the given noti", "middle": "annel === 'database') {\n throw new InvalidArgumentException('The database channel does not support on-demand notifications.');\n }\n\n $this->routes[$channel] = $route;\n\n return $this;\n }\n\n /**\n", "meta": {"filepath": "src/Illuminate/Notifications/AnonymousNotifiable.php", "language": "php", "file_size": 1643, "cut_index": 537, "middle_length": 229}} {"prefix": "nate\\Contracts\\Events\\Dispatcher;\nuse Illuminate\\Contracts\\Notifications\\Dispatcher as DispatcherContract;\nuse Illuminate\\Contracts\\Notifications\\Factory as FactoryContract;\nuse Illuminate\\Support\\Manager;\nuse Illuminate\\Support\\Queue\\Concerns\\ResolvesQueueRoutes;\nuse Illuminate\\Support\\Traits\\Macroable;\nuse InvalidArgumentException;\n\nclass ChannelManager extends Manager implements DispatcherContract, FactoryContract\n{\n use Macroable, ResolvesQueueRoutes;\n\n /**\n * The resolved notification sender ", "suffix": "ed $defaultChannel = 'mail';\n\n /**\n * The locale used when sending notifications.\n *\n * @var string|null\n */\n protected $locale;\n\n /**\n * Send the given notification to the given notifiable entities.\n *\n * @param \\Illu", "middle": "instance.\n *\n * @var \\Illuminate\\Notifications\\NotificationSender|null\n */\n protected $notificationSender;\n\n /**\n * The default channel used to deliver messages.\n *\n * @var string\n */\n protect", "meta": {"filepath": "src/Illuminate/Notifications/ChannelManager.php", "language": "php", "file_size": 4652, "cut_index": 614, "middle_length": 229}} {"prefix": "enderer;\n\nuse Illuminate\\Contracts\\Events\\Dispatcher;\nuse Illuminate\\Database\\Events\\QueryExecuted;\nuse Illuminate\\Queue\\Events\\JobProcessed;\nuse Illuminate\\Queue\\Events\\JobProcessing;\nuse Laravel\\Octane\\Events\\RequestReceived;\nuse Laravel\\Octane\\Events\\RequestTerminated;\nuse Laravel\\Octane\\Events\\TaskReceived;\nuse Laravel\\Octane\\Events\\TickReceived;\n\nclass Listener\n{\n /**\n * The queries that have been executed.\n *\n * @var arraylisten(QueryExecuted::class, $this->onQueryExecuted(...));\n\n $events->listen([JobProcessing::class, JobProcessed::class], function () {\n $this->queries =", "middle": "dings: array}>\n */\n protected $queries = [];\n\n /**\n * Register the appropriate listeners on the given event dispatcher.\n *\n * @param \\Illuminate\\Contracts\\Events\\Dispatcher $events\n * @return void\n ", "meta": {"filepath": "src/Illuminate/Foundation/Exceptions/Renderer/Listener.php", "language": "php", "file_size": 2420, "cut_index": 563, "middle_length": 229}} {"prefix": "e Illuminate\\Foundation\\Exceptions\\Renderer\\Mappers\\BladeMapper;\nuse Illuminate\\Http\\Request;\nuse Symfony\\Component\\ErrorHandler\\ErrorRenderer\\HtmlErrorRenderer;\nuse Throwable;\n\nclass Renderer\n{\n /**\n * The path to the renderer's distribution files.\n *\n * @var string\n */\n protected const DIST = __DIR__.'/../../resources/exceptions/renderer/dist/';\n\n /**\n * The view factory instance.\n *\n * @var \\Illuminate\\Contracts\\View\\Factory\n */\n protected $viewFactory;\n\n /*", "suffix": "nent\\ErrorHandler\\ErrorRenderer\\HtmlErrorRenderer\n */\n protected $htmlErrorRenderer;\n\n /**\n * The Blade mapper instance.\n *\n * @var \\Illuminate\\Foundation\\Exceptions\\Renderer\\Mappers\\BladeMapper\n */\n protected $bladeMapper;\n\n ", "middle": "*\n * The exception listener instance.\n *\n * @var \\Illuminate\\Foundation\\Exceptions\\Renderer\\Listener\n */\n protected $listener;\n\n /**\n * The HTML error renderer instance.\n *\n * @var \\Symfony\\Compo", "meta": {"filepath": "src/Illuminate/Foundation/Exceptions/Renderer/Renderer.php", "language": "php", "file_size": 3592, "cut_index": 614, "middle_length": 229}} {"prefix": "yle>\n /*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}a{background-color:transparent}code{font-family:monospace,monospace;font-size:1em}[hidden]{display:none}html{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5}*,:after,:before{box-sizing:border-box;border:0 s", "suffix": "ty:1;background-color:#fff;background-color:rgba(255,255,255,var(--bg-opacity))}.bg-gray-100{--bg-opacity:1;background-color:#f7fafc;background-color:rgba(247,250,252,var(--bg-opacity))}.border-gray-200{--border-opacity:1;border-color:#edf2f7;border-color:", "middle": "olid #e2e8f0}a{color:inherit;text-decoration:inherit}code{font-family:Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}svg,video{display:block;vertical-align:middle}video{max-width:100%;height:auto}.bg-white{--bg-opaci", "meta": {"filepath": "src/Illuminate/Foundation/Exceptions/views/minimal.blade.php", "language": "php", "file_size": 6613, "cut_index": 716, "middle_length": 229}} {"prefix": "Illuminate\\Foundation\\Exceptions\\Whoops;\n\nuse Illuminate\\Contracts\\Foundation\\ExceptionRenderer;\nuse Whoops\\Run as Whoops;\n\nuse function tap;\n\nclass WhoopsExceptionRenderer implements ExceptionRenderer\n{\n /**\n * Renders the given exception as HTML.\n *\n * @param \\Throwable $throwable\n * @return string\n */\n public function render($throwable)\n {\n return tap(new Whoops, function ($whoops) {\n $whoops->appendHandler($this->whoopsHandler());\n\n $whoops->wr", "suffix": "false);\n })->handleException($throwable);\n }\n\n /**\n * Get the Whoops handler for the application.\n *\n * @return \\Whoops\\Handler\\Handler\n */\n protected function whoopsHandler()\n {\n return (new WhoopsHandler)->forDeb", "middle": "iteToOutput(false);\n\n $whoops->allowQuit(", "meta": {"filepath": "src/Illuminate/Foundation/Exceptions/Whoops/WhoopsExceptionRenderer.php", "language": "php", "file_size": 851, "cut_index": 529, "middle_length": 52}} {"prefix": "hoops;\n\nuse Illuminate\\Filesystem\\Filesystem;\nuse Illuminate\\Support\\Arr;\nuse Whoops\\Handler\\PrettyPageHandler;\n\nclass WhoopsHandler\n{\n /**\n * Create a new Whoops handler for debug mode.\n *\n * @return \\Whoops\\Handler\\PrettyPageHandler\n */\n public function forDebug()\n {\n return tap(new PrettyPageHandler, function ($handler) {\n $handler->handleUnconditionally(true);\n\n $this->registerApplicationPaths($handler)\n ->registerBlacklist($handler)\n ", "suffix": "ected function registerApplicationPaths($handler)\n {\n $handler->setApplicationPaths(\n array_flip($this->directoriesExceptVendor())\n );\n\n return $this;\n }\n\n /**\n * Get the application paths except for the \"vendor", "middle": " ->registerEditor($handler);\n });\n }\n\n /**\n * Register the application paths with the handler.\n *\n * @param \\Whoops\\Handler\\PrettyPageHandler $handler\n * @return $this\n */\n prot", "meta": {"filepath": "src/Illuminate/Foundation/Exceptions/Whoops/WhoopsHandler.php", "language": "php", "file_size": 2099, "cut_index": 563, "middle_length": 229}} {"prefix": "pace Illuminate\\Foundation\\Auth\\Access;\n\nuse Illuminate\\Contracts\\Auth\\Access\\Gate;\n\ntrait Authorizable\n{\n /**\n * Determine if the entity has the given abilities.\n *\n * @param iterable|\\UnitEnum|string $abilities\n * @param mixed $arguments\n * @return bool\n */\n public function can($abilities, $arguments = [])\n {\n return app(Gate::class)->forUser($this)->check($abilities, $arguments);\n }\n\n /**\n * Determine if the entity has any of the given abilities.\n ", "suffix": "ny($abilities, $arguments);\n }\n\n /**\n * Determine if the entity does not have the given abilities.\n *\n * @param iterable|\\UnitEnum|string $abilities\n * @param mixed $arguments\n * @return bool\n */\n public function cant($", "middle": " *\n * @param iterable|\\UnitEnum|string $abilities\n * @param mixed $arguments\n * @return bool\n */\n public function canAny($abilities, $arguments = [])\n {\n return app(Gate::class)->forUser($this)->a", "meta": {"filepath": "src/Illuminate/Foundation/Auth/Access/Authorizable.php", "language": "php", "file_size": 1420, "cut_index": 524, "middle_length": 229}} {"prefix": "luminate\\Support\\Str;\n\nuse function Illuminate\\Support\\enum_value;\n\ntrait AuthorizesRequests\n{\n /**\n * Authorize a given action for the current user.\n *\n * @param mixed $ability\n * @param mixed $arguments\n * @return \\Illuminate\\Auth\\Access\\Response\n *\n * @throws \\Illuminate\\Auth\\Access\\AuthorizationException\n */\n public function authorize($ability, $arguments = [])\n {\n [$ability, $arguments] = $this->parseAbilityAndArguments($ability, $arguments);\n\n ", "suffix": " * @param mixed $arguments\n * @return \\Illuminate\\Auth\\Access\\Response\n *\n * @throws \\Illuminate\\Auth\\Access\\AuthorizationException\n */\n public function authorizeForUser($user, $ability, $arguments = [])\n {\n [$ability, $arg", "middle": " return app(Gate::class)->authorize($ability, $arguments);\n }\n\n /**\n * Authorize a given action for a user.\n *\n * @param \\Illuminate\\Contracts\\Auth\\Authenticatable|mixed $user\n * @param mixed $ability\n ", "meta": {"filepath": "src/Illuminate/Foundation/Auth/Access/AuthorizesRequests.php", "language": "php", "file_size": 3859, "cut_index": 614, "middle_length": 229}} {"prefix": "se Symfony\\Component\\VarDumper\\Caster\\ReflectionCaster;\nuse Symfony\\Component\\VarDumper\\Cloner\\Data;\nuse Symfony\\Component\\VarDumper\\Cloner\\VarCloner;\nuse Symfony\\Component\\VarDumper\\Dumper\\HtmlDumper as BaseHtmlDumper;\nuse Symfony\\Component\\VarDumper\\VarDumper;\n\nclass HtmlDumper extends BaseHtmlDumper\n{\n use ResolvesDumpSource;\n\n /**\n * Where the source should be placed on \"expanded\" kind of dumps.\n *\n * @var string\n */\n const EXPANDED_SEPARATOR = 'class=sf-dump-expanded>';\n\n /*", "suffix": "@var string\n */\n protected $basePath;\n\n /**\n * The compiled view path of the application.\n *\n * @var string\n */\n protected $compiledViewPath;\n\n /**\n * If the dumper is currently dumping.\n *\n * @var bool\n */\n ", "middle": "*\n * Where the source should be placed on \"non expanded\" kind of dumps.\n *\n * @var string\n */\n const NON_EXPANDED_SEPARATOR = \"\\n',\n $result->toHtml()\n );\n\n $this->cleanViteManifest($buildDir);\n }\n\n public functio", "suffix": "000/@vite/client\">'\n .'',\n $result->toHtml()\n );\n }\n\n public function testViteHotModuleReplacementWithJsAndCss()\n {\n $this-", "middle": "n testViteHotModuleReplacementWithJsOnly()\n {\n $this->makeViteHotFile();\n\n $result = app(Vite::class)('resources/js/app.js');\n\n $this->assertSame(\n '