language
stringclasses
1 value
owner
stringlengths
2
15
repo
stringlengths
2
21
sha
stringlengths
45
45
message
stringlengths
7
36.3k
path
stringlengths
1
199
patch
stringlengths
15
102k
is_multipart
bool
2 classes
Other
laravel
framework
a82a25f58252eab6831a0efde35a17403710abdc.json
add listener optinos
src/Illuminate/Queue/Listener.php
@@ -60,41 +60,59 @@ class Listener public function __construct($commandPath) { $this->commandPath = $commandPath; - $this->workerCommand = $this->buildWorkerCommand(); + $this->workerCommand = $this->buildCommandTemplate(); } /** * Build the environment specific worker...
true
Other
laravel
framework
a82a25f58252eab6831a0efde35a17403710abdc.json
add listener optinos
src/Illuminate/Queue/ListenerOptions.php
@@ -0,0 +1,31 @@ +<?php + +namespace Illuminate\Queue; + +class ListenerOptions extends WorkerOptions +{ + /** + * The environment the worker should run in. + * + * @var string + */ + public $environment; + + /** + * Create a new listener options instance. + * + * @param string $e...
true
Other
laravel
framework
a82a25f58252eab6831a0efde35a17403710abdc.json
add listener optinos
tests/Queue/QueueListenerTest.php
@@ -33,7 +33,11 @@ public function testListenerStopsWhenMemoryIsExceeded() public function testMakeProcessCorrectlyFormatsCommandLine() { $listener = new Illuminate\Queue\Listener(__DIR__); - $process = $listener->makeProcess('connection', 'queue', 1, 2, 3); + $options = new Illuminate\...
true
Other
laravel
framework
e5bd04140d609964b10ff75d41ed101173a07f90.json
Add comments to all Lua scripts.
src/Illuminate/Queue/LuaScripts.php
@@ -7,6 +7,10 @@ class LuaScripts /** * Get the Lua script for computing the size of queue. * + * KEYS[1] - The name of the primary queue + * KEYS[2] - The name of the "delayed" queue + * KEYS[3] - The name of the "reserved" queue + * * @return string */ public static f...
false
Other
laravel
framework
7a0318ca268d8c60c37e156a601bf843d8864c55.json
Apply fixes from StyleCI (#17047)
src/Illuminate/Queue/DatabaseQueue.php
@@ -2,7 +2,6 @@ namespace Illuminate\Queue; -use DateTime; use Carbon\Carbon; use Illuminate\Database\Connection; use Illuminate\Queue\Jobs\DatabaseJob;
false
Other
laravel
framework
8e618d00d880f75e31230891a6461379eb704180.json
Apply fixes from StyleCI (#17045)
src/Illuminate/Queue/Queue.php
@@ -2,7 +2,6 @@ namespace Illuminate\Queue; -use Illuminate\Support\Arr; use Illuminate\Container\Container; abstract class Queue
false
Other
laravel
framework
0143f32d5eacfe0b985588502fd94849289d8298.json
Remove setMeta function.
src/Illuminate/Queue/Queue.php
@@ -132,29 +132,6 @@ protected function createPlainPayload($job, $data) return ['job' => $job, 'data' => $data]; } - /** - * Set additional meta on a payload string. - * - * @param string $payload - * @param string $key - * @param string $value - * @return string - *...
false
Other
laravel
framework
20541a6a62af1ed2f44fdee51043ffb4b739bdb8.json
Apply fixes from StyleCI (#17044)
src/Illuminate/Queue/Jobs/Job.php
@@ -2,7 +2,6 @@ namespace Illuminate\Queue\Jobs; -use Illuminate\Support\Arr; use Illuminate\Queue\CalculatesDelays; abstract class Job
true
Other
laravel
framework
20541a6a62af1ed2f44fdee51043ffb4b739bdb8.json
Apply fixes from StyleCI (#17044)
src/Illuminate/Queue/Queue.php
@@ -3,7 +3,6 @@ namespace Illuminate\Queue; use Illuminate\Support\Arr; -use InvalidArgumentException; use Illuminate\Container\Container; abstract class Queue
true
Other
laravel
framework
e030231604479d0326ad9bfb56a2a36229d78ff4.json
Extract some queue logic.
src/Illuminate/Contracts/Queue/Queue.php
@@ -64,6 +64,16 @@ public function later($delay, $job, $data = '', $queue = null); */ public function laterOn($queue, $delay, $job, $data = ''); + /** + * Push an array of jobs onto the queue. + * + * @param array $jobs + * @param mixed $data + * @param string $queue + * ...
true
Other
laravel
framework
e030231604479d0326ad9bfb56a2a36229d78ff4.json
Extract some queue logic.
src/Illuminate/Queue/InvalidPayloadException.php
@@ -0,0 +1,19 @@ +<?php + +namespace Illuminate\Queue; + +use InvalidArgumentException; + +class InvalidPayloadException extends InvalidArgumentException +{ + /** + * Create a new exception instance. + * + * @param string|null $message + * @return void + */ + public function __construct($mes...
true
Other
laravel
framework
e030231604479d0326ad9bfb56a2a36229d78ff4.json
Extract some queue logic.
src/Illuminate/Queue/Jobs/Job.php
@@ -58,22 +58,9 @@ public function fire() { $payload = $this->payload(); - list($class, $method) = $this->parseJob($payload['job']); + list($class, $method) = JobName::parse($payload['job']); - $this->instance = $this->resolve($class); - - $this->instance->{$method}($this, ...
true
Other
laravel
framework
e030231604479d0326ad9bfb56a2a36229d78ff4.json
Extract some queue logic.
src/Illuminate/Queue/Jobs/JobName.php
@@ -0,0 +1,41 @@ +<?php + +namespace Illuminate\Queue\Jobs; + +use Illuminate\Support\Arr; + +class JobName +{ + /** + * Parse the given job name into a class / method array. + * + * @param string $job + * @return array + */ + public static function parse($job) + { + $segments = ex...
true
Other
laravel
framework
e030231604479d0326ad9bfb56a2a36229d78ff4.json
Extract some queue logic.
src/Illuminate/Queue/Queue.php
@@ -74,31 +74,53 @@ public function bulk($jobs, $data = '', $queue = null) * @param string $queue * @return string * - * @throws \InvalidArgumentException + * @throws \Illuminate\Queue\InvalidPayloadException */ protected function createPayload($job, $data = '', $queue = null) ...
true
Other
laravel
framework
e030231604479d0326ad9bfb56a2a36229d78ff4.json
Extract some queue logic.
src/Illuminate/Queue/RedisQueue.php
@@ -195,13 +195,12 @@ public function migrateExpiredJobs($from, $to) * @param string $queue * @return string */ - protected function createPayload($job, $data = '', $queue = null) + protected function createPayloadArray($job, $data = '', $queue = null) { - $payload = $this->setMeta...
true
Other
laravel
framework
e030231604479d0326ad9bfb56a2a36229d78ff4.json
Extract some queue logic.
src/Illuminate/Redis/Connections/PhpRedisConnection.php
@@ -9,7 +9,7 @@ class PhpRedisConnection extends Connection /** * Create a new Predis connection. * - * @param \Predis\Client $client + * @param \Redis $client * @return void */ public function __construct($client)
true
Other
laravel
framework
e030231604479d0326ad9bfb56a2a36229d78ff4.json
Extract some queue logic.
tests/Queue/QueueDatabaseQueueUnitTest.php
@@ -76,20 +76,6 @@ public function testFailureToCreatePayloadFromArray() ]); } - public function testFailureToCreatePayloadAfterAddingMeta() - { - $this->expectException('InvalidArgumentException'); - - $queue = $this->getMockForAbstractClass('Illuminate\Queue\Queue'); - $clas...
true
Other
laravel
framework
6f4076a5d2789538a835f63c47c41dfa4845c7b5.json
Apply fixes from StyleCI (#17042)
src/Illuminate/Queue/Jobs/Job.php
@@ -2,8 +2,6 @@ namespace Illuminate\Queue\Jobs; -use DateTime; -use Carbon\Carbon; use Illuminate\Support\Arr; use Illuminate\Queue\CalculatesDelays;
true
Other
laravel
framework
6f4076a5d2789538a835f63c47c41dfa4845c7b5.json
Apply fixes from StyleCI (#17042)
src/Illuminate/Queue/Queue.php
@@ -2,8 +2,6 @@ namespace Illuminate\Queue; -use DateTime; -use Carbon\Carbon; use Illuminate\Support\Arr; use InvalidArgumentException; use Illuminate\Container\Container;
true
Other
laravel
framework
f6dd1278132de95b18238f5bf3c1786cf1557ae2.json
Fix forloop compilation
src/Illuminate/View/Concerns/ManagesLoops.php
@@ -73,7 +73,8 @@ public function popLoop() */ public function getLastLoop() { - return $last = Arr::last($this->loopsStack) ? (object) $last : null; + return ($last = Arr::last($this->loopsStack)) ? (object) $last : null; + } /**
false
Other
laravel
framework
f1978c4c99e3b2edce33b22f383f0a9d3e47791a.json
Convert looping event into an object.
src/Illuminate/Queue/Events/Looping.php
@@ -0,0 +1,8 @@ +<?php + +namespace Illuminate\Queue\Events; + +class Looping +{ + // +}
true
Other
laravel
framework
f1978c4c99e3b2edce33b22f383f0a9d3e47791a.json
Convert looping event into an object.
src/Illuminate/Queue/QueueManager.php
@@ -82,7 +82,7 @@ public function exceptionOccurred($callback) */ public function looping($callback) { - $this->app['events']->listen('illuminate.queue.looping', $callback); + $this->app['events']->listen(Events\Looping::class, $callback); } /** @@ -163,11 +163,11 @@ protected ...
true
Other
laravel
framework
f1978c4c99e3b2edce33b22f383f0a9d3e47791a.json
Convert looping event into an object.
src/Illuminate/Queue/Worker.php
@@ -125,7 +125,7 @@ protected function registerTimeoutHandler($job, WorkerOptions $options) protected function daemonShouldRun(WorkerOptions $options) { if (($this->manager->isDownForMaintenance() && ! $options->force) || - $this->events->until('illuminate.queue.looping') === false) { + ...
true
Other
laravel
framework
155aab1471634d70c622f755c04f90481595b5bb.json
Apply fixes from StyleCI (#17033)
src/Illuminate/Queue/InteractsWithQueue.php
@@ -2,8 +2,6 @@ namespace Illuminate\Queue; -use Illuminate\Container\Container; -use Illuminate\Contracts\Events\Dispatcher; use Illuminate\Contracts\Queue\Job as JobContract; trait InteractsWithQueue
false
Other
laravel
framework
55afe12977b55dbafda940e18102bb52276ca569.json
Extract duplicate code which handles job failing.
src/Illuminate/Queue/FailingJob.php
@@ -0,0 +1,48 @@ +<?php + +namespace Illuminate\Queue; + +use Illuminate\Container\Container; +use Illuminate\Queue\Events\JobFailed; +use Illuminate\Contracts\Events\Dispatcher; + +class FailingJob +{ + /** + * Delete the given job, call the "failed" method, and raise the failed job event. + * + * @para...
true
Other
laravel
framework
55afe12977b55dbafda940e18102bb52276ca569.json
Extract duplicate code which handles job failing.
src/Illuminate/Queue/InteractsWithQueue.php
@@ -45,18 +45,8 @@ public function delete() */ public function fail($exception = null) { - if (! $this->job || $this->job->isDeleted()) { - return; - } - - try { - $this->job->delete(); - - $this->job->failed($e); - } finally { - Co...
true
Other
laravel
framework
55afe12977b55dbafda940e18102bb52276ca569.json
Extract duplicate code which handles job failing.
src/Illuminate/Queue/Worker.php
@@ -324,29 +324,14 @@ protected function markJobAsFailedIfHasExceededMaxAttempts( /** * Mark the given job as failed and raise the relevant event. * - * Note: Any change to this method should also be made to InteractsWithQueue. - * * @param string $connectionName * @param \Illumi...
true
Other
laravel
framework
55afe12977b55dbafda940e18102bb52276ca569.json
Extract duplicate code which handles job failing.
tests/Queue/QueueWorkerTest.php
@@ -1,5 +1,6 @@ <?php +use Illuminate\Container\Container; use Illuminate\Queue\WorkerOptions; use Illuminate\Queue\Events\JobFailed; use Illuminate\Queue\Events\JobProcessed; @@ -14,10 +15,20 @@ class QueueWorkerTest extends PHPUnit_Framework_TestCase public $events; public $exceptionHandler; - pu...
true
Other
laravel
framework
804c60cd8ad8de8c9ba32baa48ea51db38e3b295.json
Reset test variable This doesn’t get reset before the test so every time `testExtendIsLazyInitialized` runs after the first time it fails.
tests/Container/ContainerTest.php
@@ -197,6 +197,8 @@ public function testExtendInstancesArePreserved() public function testExtendIsLazyInitialized() { + ContainerLazyExtendStub::$initialized = false; + $container = new Container; $container->bind('ContainerLazyExtendStub'); $container->extend('ContainerLaz...
false
Other
laravel
framework
d88b4c7374b8caf0c7eccafe7fdc5e15bfb6b7c8.json
update PhpDoc return values (#17024)
src/Illuminate/Foundation/Auth/ResetsPasswords.php
@@ -31,7 +31,7 @@ public function showResetForm(Request $request, $token = null) * Reset the given user's password. * * @param \Illuminate\Http\Request $request - * @return \Illuminate\Http\Response + * @return \Illuminate\Http\RedirectResponse */ public function reset(Request $re...
true
Other
laravel
framework
d88b4c7374b8caf0c7eccafe7fdc5e15bfb6b7c8.json
update PhpDoc return values (#17024)
src/Illuminate/Foundation/Auth/SendsPasswordResetEmails.php
@@ -43,7 +43,7 @@ public function sendResetLinkEmail(Request $request) * Get the response for a successful password reset link. * * @param string $response - * @return \Illuminate\Http\Response + * @return \Illuminate\Http\RedirectResponse */ protected function sendResetLinkRespon...
true
Other
laravel
framework
192fd8a0c5fef52ceb2af2e9dffe0fcd4bdcea63.json
Apply fixes from StyleCI (#17012)
src/Illuminate/View/Compilers/BladeCompiler.php
@@ -4,7 +4,6 @@ use Illuminate\Support\Arr; use Illuminate\Support\Str; -use Illuminate\View\Factory as ViewFactory; class BladeCompiler extends Compiler implements CompilerInterface {
false
Other
laravel
framework
fdeb01e367ba299e7f5e5accc733c2472b951f7e.json
Apply fixes from StyleCI (#17008)
src/Illuminate/Support/MessageBag.php
@@ -4,7 +4,6 @@ use Countable; use JsonSerializable; -use Illuminate\Support\Arr; use Illuminate\Contracts\Support\Jsonable; use Illuminate\Contracts\Support\Arrayable; use Illuminate\Contracts\Support\MessageProvider;
false
Other
laravel
framework
c4da7b11df210e79c3156fff648768e5bac79825.json
Use implicit null instead of explicit (#16968)
src/Illuminate/Cookie/CookieJar.php
@@ -21,7 +21,7 @@ class CookieJar implements JarContract * * @var string */ - protected $domain = null; + protected $domain; /** * The default secure setting (defaults to false).
true
Other
laravel
framework
c4da7b11df210e79c3156fff648768e5bac79825.json
Use implicit null instead of explicit (#16968)
src/Illuminate/Foundation/Application.php
@@ -130,7 +130,7 @@ class Application extends Container implements ApplicationContract, HttpKernelIn * * @var string */ - protected $namespace = null; + protected $namespace; /** * Create a new Illuminate application instance.
true
Other
laravel
framework
c4da7b11df210e79c3156fff648768e5bac79825.json
Use implicit null instead of explicit (#16968)
src/Illuminate/Notifications/Messages/MailMessage.php
@@ -68,7 +68,7 @@ class MailMessage extends SimpleMessage * * @var int */ - public $priority = null; + public $priority; /** * Set the view for the mail message.
true
Other
laravel
framework
c4da7b11df210e79c3156fff648768e5bac79825.json
Use implicit null instead of explicit (#16968)
src/Illuminate/Notifications/Messages/SimpleMessage.php
@@ -23,9 +23,9 @@ class SimpleMessage /** * The notification's greeting. * - * @var string|null + * @var string */ - public $greeting = null; + public $greeting; /** * The "intro" lines of the notification.
true
Other
laravel
framework
c4da7b11df210e79c3156fff648768e5bac79825.json
Use implicit null instead of explicit (#16968)
src/Illuminate/Notifications/SendQueuedNotifications.php
@@ -29,7 +29,7 @@ class SendQueuedNotifications implements ShouldQueue * * @var array */ - protected $channels = null; + protected $channels; /** * Create a new job instance.
true
Other
laravel
framework
c4da7b11df210e79c3156fff648768e5bac79825.json
Use implicit null instead of explicit (#16968)
src/Illuminate/Pagination/AbstractPaginator.php
@@ -50,7 +50,7 @@ abstract class AbstractPaginator implements Htmlable * * @var string|null */ - protected $fragment = null; + protected $fragment; /** * The query string variable used to store the page.
true
Other
laravel
framework
c4da7b11df210e79c3156fff648768e5bac79825.json
Use implicit null instead of explicit (#16968)
src/Illuminate/Validation/DatabasePresenceVerifier.php
@@ -20,7 +20,7 @@ class DatabasePresenceVerifier implements PresenceVerifierInterface * * @var string */ - protected $connection = null; + protected $connection; /** * Create a new database presence verifier.
true
Other
laravel
framework
c4da7b11df210e79c3156fff648768e5bac79825.json
Use implicit null instead of explicit (#16968)
tests/Database/DatabaseEloquentBelongsToTest.php
@@ -142,5 +142,5 @@ class AnotherEloquentBelongsToModelStub extends Illuminate\Database\Eloquent\Mod class MissingEloquentBelongsToModelStub extends Illuminate\Database\Eloquent\Model { - public $foreign_key = null; + public $foreign_key; }
true
Other
laravel
framework
c4da7b11df210e79c3156fff648768e5bac79825.json
Use implicit null instead of explicit (#16968)
tests/Mail/MailSesTransportTest.php
@@ -64,7 +64,7 @@ public function testSend() class sendRawEmailMock { - protected $getResponse = null; + protected $getResponse; public function __construct($responseValue) {
true
Other
laravel
framework
c4da7b11df210e79c3156fff648768e5bac79825.json
Use implicit null instead of explicit (#16968)
tests/Queue/QueueWorkerTest.php
@@ -164,7 +164,7 @@ private function workerOptions(array $overrides = []) */ class InsomniacWorker extends Illuminate\Queue\Worker { - public $sleptFor = null; + public $sleptFor; public function sleep($seconds) {
true
Other
laravel
framework
8a39838353ccd460a93252b9c7c114e9790d24a7.json
Apply fixes from StyleCI (#16965)
src/Illuminate/Support/Testing/Fakes/MailFake.php
@@ -2,8 +2,6 @@ namespace Illuminate\Support\Testing\Fakes; -use Illuminate\Support\Collection; -use Illuminate\Container\Container; use Illuminate\Contracts\Mail\Mailer; use Illuminate\Contracts\Mail\Mailable; use PHPUnit_Framework_Assert as PHPUnit;
false
Other
laravel
framework
b1d8f813d13960096493f3adc3bc32ace66ba2e6.json
Refactor the mail fake to not be really stupid. Now it works more similarly to the other fakes and you can just use $mailable->hasTo ->hasCc, etc. to make sure it has a given recipient within your passed callable. The callable simply receives the mailable instance. Properties on mailable are public for easy inspection...
src/Illuminate/Support/Testing/Fakes/MailFake.php
@@ -32,68 +32,6 @@ public function assertSent($mailable, $callback = null) ); } - /** - * Assert if a mailable was sent based on a truth-test callback. - * - * @param mixed $users - * @param string $mailable - * @param callable|null $callback - * @return void - */ - ...
true
Other
laravel
framework
b1d8f813d13960096493f3adc3bc32ace66ba2e6.json
Refactor the mail fake to not be really stupid. Now it works more similarly to the other fakes and you can just use $mailable->hasTo ->hasCc, etc. to make sure it has a given recipient within your passed callable. The callable simply receives the mailable instance. Properties on mailable are public for easy inspection...
src/Illuminate/Support/Testing/Fakes/PendingMailFake.php
@@ -7,21 +7,15 @@ class PendingMailFake extends PendingMail { - /** - * The mailable instance. - * - * @var mixed - */ - public $mailable; - /** * Create a new instance. * + * @param \Illuminate\Support\Testing\Fakes\MailFake * @return void */ - public func...
true
Other
laravel
framework
c52e1a467345607926c9378fb2646f8ead6cc1a4.json
Test broken case.
src/Illuminate/Mail/Mailable.php
@@ -388,11 +388,7 @@ public function replyTo($address, $name = null) */ protected function setAddress($address, $name = null, $property = 'to') { - if (! is_array($address) && ! $address instanceof Collection) { - $address = [$address]; - } - - foreach ($address as $recip...
true
Other
laravel
framework
c52e1a467345607926c9378fb2646f8ead6cc1a4.json
Test broken case.
tests/Mail/MailMailableTest.php
@@ -10,6 +10,10 @@ public function testMailableSetsRecipientsCorrectly() $mailable->to('taylor@laravel.com'); $this->assertEquals([['name' => null, 'address' => 'taylor@laravel.com']], $mailable->to); + $mailable = new WelcomeMailableStub; + $mailable->to('taylor@laravel.com', 'Taylor ...
true
Other
laravel
framework
53675f12c79495abf7525731c1e784d02800c129.json
Apply fixes from StyleCI (#16963)
src/Illuminate/Mail/Mailable.php
@@ -397,7 +397,7 @@ protected function setAddress($address, $name = null, $property = 'to') $this->{$property}[] = [ 'name' => isset($recipient->name) ? $recipient->name : null, - 'address' => $recipient->email + 'address' => $recipient->email, ...
true
Other
laravel
framework
53675f12c79495abf7525731c1e784d02800c129.json
Apply fixes from StyleCI (#16963)
tests/Mail/MailMailableTest.php
@@ -15,7 +15,7 @@ public function testMailableSetsRecipientsCorrectly() $this->assertEquals([['name' => null, 'address' => 'taylor@laravel.com']], $mailable->to); $mailable = new WelcomeMailableStub; - $mailable->to([['name' => 'Taylor Otwell', 'email' => 'taylor@laravel.com']]);; + $m...
true
Other
laravel
framework
364ea7b994dda8f2b408b675b8764a665b5672db.json
Remove assignment (#16957) Left over from removal of normalize().
src/Illuminate/Container/Container.php
@@ -337,7 +337,7 @@ public function extend($abstract, Closure $closure) */ public function instance($abstract, $instance) { - unset($this->aliases[$abstract = $abstract]); + unset($this->aliases[$abstract]); // We'll check to determine if this type has been bound before, and if ...
false
Other
laravel
framework
1c797153006a316c6345affbf5bb7ef123250e06.json
Apply fixes from StyleCI (#16952)
src/Illuminate/Session/Store.php
@@ -6,7 +6,6 @@ use Illuminate\Support\Arr; use Illuminate\Support\Str; use SessionHandlerInterface; -use InvalidArgumentException; use Illuminate\Contracts\Session\Session; use Symfony\Component\HttpFoundation\Request;
false
Other
laravel
framework
f49ea906ac371dc343c6d878f13796f08561cfb0.json
Apply fixes from StyleCI (#16951)
src/Illuminate/Session/DatabaseSessionHandler.php
@@ -107,8 +107,8 @@ public function read($sessionId) */ protected function expired($session) { - return (isset($session->last_activity) && - $session->last_activity < Carbon::now()->subMinutes($this->minutes)->getTimestamp()); + return isset($session->last_activity) && + ...
false
Other
laravel
framework
5c4541bc43f22b0d99c5cc6db38781060bff836f.json
Refactor the gate.
src/Illuminate/Auth/Access/Gate.php
@@ -64,7 +64,8 @@ class Gate implements GateContract * @param array $afterCallbacks * @return void */ - public function __construct(Container $container, callable $userResolver, array $abilities = [], array $policies = [], array $beforeCallbacks = [], array $afterCallbacks = []) + public funct...
false
Other
laravel
framework
d8ca3e632dbde7f8233463f330c4053f4fb08f3f.json
Add Macroable trait to RedirectResponse (#16929)
src/Illuminate/Http/RedirectResponse.php
@@ -6,14 +6,17 @@ use Illuminate\Support\Str; use Illuminate\Support\MessageBag; use Illuminate\Support\ViewErrorBag; +use Illuminate\Support\Traits\Macroable; use Illuminate\Session\Store as SessionStore; use Illuminate\Contracts\Support\MessageProvider; use Symfony\Component\HttpFoundation\File\UploadedFile as ...
false
Other
laravel
framework
7c2413712edcac15d82e1e9f359e8234788bf798.json
Apply fixes from StyleCI (#16942)
src/Illuminate/Container/Container.php
@@ -6,7 +6,6 @@ use ArrayAccess; use LogicException; use ReflectionClass; -use ReflectionFunction; use ReflectionParameter; use Illuminate\Contracts\Container\BindingResolutionException; use Illuminate\Contracts\Container\Container as ContainerContract; @@ -723,7 +722,7 @@ protected function resolveClass(Reflecti...
false
Other
laravel
framework
9165096f4458f8ab3cfbd4d6bd32479594a2161c.json
Apply fixes from StyleCI (#16940)
src/Illuminate/Container/Container.php
@@ -6,10 +6,8 @@ use ArrayAccess; use LogicException; use ReflectionClass; -use ReflectionMethod; use ReflectionFunction; use ReflectionParameter; -use InvalidArgumentException; use Illuminate\Contracts\Container\BindingResolutionException; use Illuminate\Contracts\Container\Container as ContainerContract;
true
Other
laravel
framework
9165096f4458f8ab3cfbd4d6bd32479594a2161c.json
Apply fixes from StyleCI (#16940)
src/Illuminate/Container/MethodCaller.php
@@ -2,11 +2,8 @@ namespace Illuminate\Container; -use LogicException; -use ReflectionClass; use ReflectionMethod; use ReflectionFunction; -use ReflectionParameter; use InvalidArgumentException; class MethodCaller
true
Other
laravel
framework
3be65cc66fe1fbee88ffb385e9468513c7592fa2.json
Apply fixes from StyleCI (#16939)
src/Illuminate/Console/Scheduling/Event.php
@@ -4,7 +4,6 @@ use Closure; use Carbon\Carbon; -use LogicException; use Cron\CronExpression; use GuzzleHttp\Client as HttpClient; use Illuminate\Contracts\Mail\Mailer;
false
Other
laravel
framework
efaffd58f5162fa45d2ca5bc352c4a568153ed57.json
Extract method on console parser.
src/Illuminate/Console/Parser.php
@@ -18,6 +18,25 @@ class Parser * @throws \InvalidArgumentException */ public static function parse($expression) + { + $name = static::name($expression); + + if (preg_match_all('/\{\s*(.*?)\s*\}/', $expression, $matches)) { + if (count($matches[1])) { + return...
false
Other
laravel
framework
b0370761de74571a793f40b0547b58402b9737d2.json
Refactor the generator command.
src/Illuminate/Console/GeneratorCommand.php
@@ -49,16 +49,22 @@ abstract protected function getStub(); */ public function fire() { - $name = $this->parseName($this->getNameInput()); + $name = $this->qualifyClass($this->getNameInput()); $path = $this->getPath($name); + // First we will check to see if the class al...
true
Other
laravel
framework
b0370761de74571a793f40b0547b58402b9737d2.json
Refactor the generator command.
src/Illuminate/Database/Console/Seeds/SeederMakeCommand.php
@@ -84,12 +84,12 @@ protected function getPath($name) } /** - * Parse the name and format according to the root namespace. + * Parse the class name and format according to the root namespace. * * @param string $name * @return string */ - protected function parseName($nam...
true
Other
laravel
framework
f21ab706def178635410b2a17a9bee38e4bf2f9b.json
fix cluster resolution
src/Illuminate/Redis/Connectors/PhpRedisConnector.php
@@ -16,7 +16,7 @@ class PhpRedisConnector * @param array $config * @param array $clusterOptions * @param array $options - * @return \Illuminate\Redis\PredisConnection + * @return \Illuminate\Redis\PhpRedisConnection */ public function connect(array $config, array $options) ...
true
Other
laravel
framework
f21ab706def178635410b2a17a9bee38e4bf2f9b.json
fix cluster resolution
src/Illuminate/Redis/Connectors/PredisConnector.php
@@ -34,8 +34,10 @@ public function connect(array $config, array $options) */ public function connectToCluster(array $config, array $clusterOptions, array $options) { + $clusterSpecificOptions = Arr::pull($config, 'options', []); + return new PredisClusterConnection(new Client(array_value...
true
Other
laravel
framework
f21ab706def178635410b2a17a9bee38e4bf2f9b.json
fix cluster resolution
src/Illuminate/Redis/RedisManager.php
@@ -85,7 +85,7 @@ protected function resolveCluster($name) $clusterOptions = Arr::get($this->config, 'clusters.options', []); return $this->connector()->connectToCluster( - $this->config['clusters'][$name], $clusterOptions, $this->config + $this->config['clusters'][$name], $clu...
true
Other
laravel
framework
f7f13fab9a451bc2249fc0709b6cf1fa6b7c795a.json
remove unused method
src/Illuminate/Routing/RouteDependencyResolverTrait.php
@@ -9,20 +9,6 @@ trait RouteDependencyResolverTrait { - /** - * Call a class method with the resolved dependencies. - * - * @param object $instance - * @param string $method - * @return mixed - */ - protected function callWithDependencies($instance, $method) - { - return ...
false
Other
laravel
framework
9111e0eaace063a96ff6321618bbf23e7267599e.json
Apply fixes from StyleCI (#16921)
src/Illuminate/Routing/UrlGenerator.php
@@ -3,13 +3,11 @@ namespace Illuminate\Routing; use Closure; -use Illuminate\Support\Arr; use Illuminate\Support\Str; use Illuminate\Http\Request; use InvalidArgumentException; use Illuminate\Support\Traits\Macroable; use Illuminate\Contracts\Routing\UrlRoutable; -use Illuminate\Routing\Exceptions\UrlGeneratio...
false
Other
laravel
framework
0f3e5092c0e9b9628da951107365fd4a0a3d741e.json
Apply fixes from StyleCI (#16913)
src/Illuminate/Routing/Router.php
@@ -12,7 +12,6 @@ use Illuminate\Support\Traits\Macroable; use Illuminate\Contracts\Events\Dispatcher; use Illuminate\Contracts\Routing\BindingRegistrar; -use Illuminate\Database\Eloquent\ModelNotFoundException; use Psr\Http\Message\ResponseInterface as PsrResponseInterface; use Illuminate\Contracts\Routing\Regist...
false
Other
laravel
framework
dd58def4e5fca939c2f51fe58702a996ec29c520.json
Apply fixes from StyleCI (#16911)
src/Illuminate/Routing/Router.php
@@ -3,7 +3,6 @@ namespace Illuminate\Routing; use Closure; -use Illuminate\Support\Arr; use Illuminate\Support\Str; use Illuminate\Http\Request; use Illuminate\Http\Response;
false
Other
laravel
framework
b208a4fc3b35da167a2dcb9b581d9e072d20ec92.json
extract some classes for router
src/Illuminate/Routing/MiddlewareNameResolver.php
@@ -0,0 +1,85 @@ +<?php + +namespace Illuminate\Routing; + +use Closure; + +class MiddlewareNameResolver +{ + /** + * Resolve the middleware name to a class name(s) preserving passed parameters. + * + * @param string $name + * @param array $map + * @param array $middlewareGroups + * @re...
true
Other
laravel
framework
b208a4fc3b35da167a2dcb9b581d9e072d20ec92.json
extract some classes for router
src/Illuminate/Routing/RouteGroup.php
@@ -0,0 +1,95 @@ +<?php + +namespace Illuminate\Routing; + +use Illuminate\Support\Arr; + +class RouteGroup +{ + /** + * Merge route groups into a new array. + * + * @param array $new + * @param array $old + * @return array + */ + public static function merge($new, $old) + { + ...
true
Other
laravel
framework
b208a4fc3b35da167a2dcb9b581d9e072d20ec92.json
extract some classes for router
src/Illuminate/Routing/Router.php
@@ -275,23 +275,6 @@ public function group(array $attributes, $routes) array_pop($this->groupStack); } - /** - * Load the provided routes. - * - * @param \Closure|string $routes - * @return void - */ - protected function loadRoutes($routes) - { - if ($routes instanc...
true
Other
laravel
framework
b208a4fc3b35da167a2dcb9b581d9e072d20ec92.json
extract some classes for router
tests/Routing/RoutingRouteTest.php
@@ -5,6 +5,7 @@ use Illuminate\Routing\Router; use Illuminate\Events\Dispatcher; use Illuminate\Routing\Controller; +use Illuminate\Routing\RouteGroup; use Illuminate\Container\Container; use Illuminate\Database\Eloquent\Model; use Illuminate\Auth\Middleware\Authorize; @@ -694,23 +695,23 @@ public function testMo...
true
Other
laravel
framework
eecf6eca8b4a0cfdf8ec2b0148ee726b8b67c6bb.json
Start organizing router.
src/Illuminate/Routing/Router.php
@@ -123,10 +123,6 @@ public function __construct(Dispatcher $events, Container $container = null) $this->events = $events; $this->routes = new RouteCollection; $this->container = $container ?: new Container; - - $this->bind('_missing', function ($v) { - return explode('/', $...
false
Other
laravel
framework
a7f60ccfde8a06319050873c54f5597e496b8424.json
Apply fixes from StyleCI (#16908)
src/Illuminate/Routing/Route.php
@@ -4,12 +4,9 @@ use Closure; use LogicException; -use ReflectionMethod; use ReflectionFunction; use Illuminate\Support\Arr; -use Illuminate\Support\Str; use Illuminate\Http\Request; -use UnexpectedValueException; use Illuminate\Container\Container; use Illuminate\Routing\Matching\UriValidator; use Illuminate...
false
Other
laravel
framework
9d3ff161fd3929f9a106f007ce63fffdd118d490.json
Extract route compiler.
src/Illuminate/Routing/Route.php
@@ -16,7 +16,6 @@ use Illuminate\Routing\Matching\MethodValidator; use Illuminate\Routing\Matching\SchemeValidator; use Illuminate\Http\Exception\HttpResponseException; -use Symfony\Component\Routing\Route as SymfonyRoute; class Route { @@ -27,63 +26,63 @@ class Route * * @var string */ - pr...
true
Other
laravel
framework
9d3ff161fd3929f9a106f007ce63fffdd118d490.json
Extract route compiler.
src/Illuminate/Routing/RouteCollection.php
@@ -64,7 +64,7 @@ public function add(Route $route) */ protected function addToCollections($route) { - $domainAndUri = $route->domain().$route->getUri(); + $domainAndUri = $route->domain().$route->uri(); foreach ($route->methods() as $method) { $this->routes[$method...
true
Other
laravel
framework
9d3ff161fd3929f9a106f007ce63fffdd118d490.json
Extract route compiler.
src/Illuminate/Routing/RouteCompiler.php
@@ -0,0 +1,54 @@ +<?php + +namespace Illuminate\Routing; + +use Symfony\Component\Routing\Route as SymfonyRoute; + +class RouteCompiler +{ + /** + * The route instance. + * + * @var \Illuminate\Routing\Route + */ + protected $route; + + /** + * Create a new Route compiler instance. + * ...
true
Other
laravel
framework
9d3ff161fd3929f9a106f007ce63fffdd118d490.json
Extract route compiler.
src/Illuminate/Routing/Router.php
@@ -821,7 +821,7 @@ public function substituteImplicitBindings($route) $class = $parameter->getClass(); if (array_key_exists($parameter->name, $parameters) && - ! $route->getParameter($parameter->name) instanceof Model) { + ! $route->parameter($parameter->name) ...
true
Other
laravel
framework
9d3ff161fd3929f9a106f007ce63fffdd118d490.json
Extract route compiler.
tests/Routing/RouteRegistrarTest.php
@@ -134,7 +134,7 @@ public function testCanRegisterGroupWithPrefix() $router->get('users', 'UsersController@index'); }); - $this->assertEquals('api/users', $this->getRoute()->getUri()); + $this->assertEquals('api/users', $this->getRoute()->uri()); } public function test...
true
Other
laravel
framework
9d3ff161fd3929f9a106f007ce63fffdd118d490.json
Extract route compiler.
tests/Routing/RoutingRouteTest.php
@@ -917,21 +917,21 @@ public function testResourceRouting() $routes = $router->getRoutes(); $routes = $routes->getRoutes(); - $this->assertEquals('foo-bars/{foo_bar}', $routes[0]->getUri()); + $this->assertEquals('foo-bars/{foo_bar}', $routes[0]->uri()); $router = $this->get...
true
Other
laravel
framework
7573abf0202cac49aa626d2186091f45097fff17.json
fix routing pipeline
src/Illuminate/Pipeline/Pipeline.php
@@ -95,17 +95,26 @@ public function via($method) */ public function then(Closure $destination) { - $destination = function ($passable) use ($destination) { - return $destination($passable); - }; - $pipeline = array_reduce( - array_reverse($this->pipes), $this...
true
Other
laravel
framework
7573abf0202cac49aa626d2186091f45097fff17.json
fix routing pipeline
src/Illuminate/Routing/Pipeline.php
@@ -17,17 +17,37 @@ */ class Pipeline extends BasePipeline { + /** + * Get the final piece of the Closure onion. + * + * @param \Closure $destination + * @return \Closure + */ + protected function prepareDestination(Closure $destination) + { + return function ($passable) use ($...
true
Other
laravel
framework
8affc08341beffc81deb3ad78042dcf2dc173027.json
Apply fixes from StyleCI (#16905)
src/Illuminate/Redis/RedisManager.php
@@ -83,8 +83,7 @@ protected function resolve($name) */ protected function connector() { - switch ($this->driver) - { + switch ($this->driver) { case 'predis': return new Connectors\PredisConnector; case 'phpredis':
false
Other
laravel
framework
1ef8b9c3f156c7d4debc6c6f67b73b032d8337d5.json
Rewrite Redis layer. This rewrite the Redis layer to function more like database or cache drivers… a new Redis factory is introduced to retrieve Redis connection instances. Different Redis connection instances are introduced to account for differences between the two drivers (Predis and PhpRedis).
src/Illuminate/Broadcasting/Broadcasters/RedisBroadcaster.php
@@ -4,15 +4,15 @@ use Illuminate\Support\Arr; use Illuminate\Support\Str; -use Illuminate\Contracts\Redis\Database as RedisDatabase; +use Illuminate\Contracts\Redis\Factory as Redis; use Symfony\Component\HttpKernel\Exception\HttpException; class RedisBroadcaster extends Broadcaster { /** * The Redi...
true
Other
laravel
framework
1ef8b9c3f156c7d4debc6c6f67b73b032d8337d5.json
Rewrite Redis layer. This rewrite the Redis layer to function more like database or cache drivers… a new Redis factory is introduced to retrieve Redis connection instances. Different Redis connection instances are introduced to account for differences between the two drivers (Predis and PhpRedis).
src/Illuminate/Cache/RedisStore.php
@@ -3,14 +3,14 @@ namespace Illuminate\Cache; use Illuminate\Contracts\Cache\Store; -use Illuminate\Contracts\Redis\Database; +use Illuminate\Contracts\Redis\Factory as Redis; class RedisStore extends TaggableStore implements Store { /** - * The Redis database connection. + * The Redis factory impl...
true
Other
laravel
framework
1ef8b9c3f156c7d4debc6c6f67b73b032d8337d5.json
Rewrite Redis layer. This rewrite the Redis layer to function more like database or cache drivers… a new Redis factory is introduced to retrieve Redis connection instances. Different Redis connection instances are introduced to account for differences between the two drivers (Predis and PhpRedis).
src/Illuminate/Contracts/Redis/Database.php
@@ -1,15 +0,0 @@ -<?php - -namespace Illuminate\Contracts\Redis; - -interface Database -{ - /** - * Run a command against the Redis database. - * - * @param string $method - * @param array $parameters - * @return mixed - */ - public function command($method, array $parameters = []); -...
true
Other
laravel
framework
1ef8b9c3f156c7d4debc6c6f67b73b032d8337d5.json
Rewrite Redis layer. This rewrite the Redis layer to function more like database or cache drivers… a new Redis factory is introduced to retrieve Redis connection instances. Different Redis connection instances are introduced to account for differences between the two drivers (Predis and PhpRedis).
src/Illuminate/Contracts/Redis/Factory.php
@@ -0,0 +1,14 @@ +<?php + +namespace Illuminate\Contracts\Redis; + +interface Factory +{ + /** + * Get a Redis connection by name. + * + * @param string $name + * @return \Illuminate\Redis\Connections\Connection + */ + public function connection($name = null); +}
true
Other
laravel
framework
1ef8b9c3f156c7d4debc6c6f67b73b032d8337d5.json
Rewrite Redis layer. This rewrite the Redis layer to function more like database or cache drivers… a new Redis factory is introduced to retrieve Redis connection instances. Different Redis connection instances are introduced to account for differences between the two drivers (Predis and PhpRedis).
src/Illuminate/Foundation/Application.php
@@ -1090,7 +1090,7 @@ public function registerCoreContainerAliases() 'queue.connection' => ['Illuminate\Contracts\Queue\Queue'], 'queue.failer' => ['Illuminate\Queue\Failed\FailedJobProviderInterface'], 'redirect' => ['Illuminate\Routing\Redirector'], - ...
true
Other
laravel
framework
1ef8b9c3f156c7d4debc6c6f67b73b032d8337d5.json
Rewrite Redis layer. This rewrite the Redis layer to function more like database or cache drivers… a new Redis factory is introduced to retrieve Redis connection instances. Different Redis connection instances are introduced to account for differences between the two drivers (Predis and PhpRedis).
src/Illuminate/Queue/Connectors/RedisConnector.php
@@ -4,14 +4,14 @@ use Illuminate\Support\Arr; use Illuminate\Queue\RedisQueue; -use Illuminate\Contracts\Redis\Database; +use Illuminate\Contracts\Redis\Factory as Redis; class RedisConnector implements ConnectorInterface { /** * The Redis database instance. * - * @var \Illuminate\Contracts...
true
Other
laravel
framework
1ef8b9c3f156c7d4debc6c6f67b73b032d8337d5.json
Rewrite Redis layer. This rewrite the Redis layer to function more like database or cache drivers… a new Redis factory is introduced to retrieve Redis connection instances. Different Redis connection instances are introduced to account for differences between the two drivers (Predis and PhpRedis).
src/Illuminate/Queue/Jobs/RedisJob.php
@@ -112,9 +112,9 @@ public function getJobId() } /** - * Get the underlying queue driver instance. + * Get the underlying Redis factory implementation. * - * @return \Illuminate\Contracts\Redis\Database + * @return \Illuminate\Contracts\Redis\Factory */ public function getRe...
true
Other
laravel
framework
1ef8b9c3f156c7d4debc6c6f67b73b032d8337d5.json
Rewrite Redis layer. This rewrite the Redis layer to function more like database or cache drivers… a new Redis factory is introduced to retrieve Redis connection instances. Different Redis connection instances are introduced to account for differences between the two drivers (Predis and PhpRedis).
src/Illuminate/Queue/RedisQueue.php
@@ -5,15 +5,15 @@ use Illuminate\Support\Arr; use Illuminate\Support\Str; use Illuminate\Queue\Jobs\RedisJob; -use Illuminate\Contracts\Redis\Database; +use Illuminate\Contracts\Redis\Factory as Redis; use Illuminate\Contracts\Queue\Queue as QueueContract; class RedisQueue extends Queue implements QueueContract ...
true
Other
laravel
framework
1ef8b9c3f156c7d4debc6c6f67b73b032d8337d5.json
Rewrite Redis layer. This rewrite the Redis layer to function more like database or cache drivers… a new Redis factory is introduced to retrieve Redis connection instances. Different Redis connection instances are introduced to account for differences between the two drivers (Predis and PhpRedis).
src/Illuminate/Redis/Connections/Connection.php
@@ -0,0 +1,84 @@ +<?php + +namespace Illuminate\Redis\Connections; + +use Closure; + +abstract class Connection +{ + /** + * The Predis client. + * + * @var \Predis\Client + */ + protected $client; + + /** + * Subscribe to a set of given channels for messages. + * + * @param array|...
true
Other
laravel
framework
1ef8b9c3f156c7d4debc6c6f67b73b032d8337d5.json
Rewrite Redis layer. This rewrite the Redis layer to function more like database or cache drivers… a new Redis factory is introduced to retrieve Redis connection instances. Different Redis connection instances are introduced to account for differences between the two drivers (Predis and PhpRedis).
src/Illuminate/Redis/Connections/PhpRedisClusterConnection.php
@@ -0,0 +1,8 @@ +<?php + +namespace Illuminate\Redis\Connections; + +class PhpRedisClusterConnection extends PhpRedisConnection +{ + // +}
true
Other
laravel
framework
1ef8b9c3f156c7d4debc6c6f67b73b032d8337d5.json
Rewrite Redis layer. This rewrite the Redis layer to function more like database or cache drivers… a new Redis factory is introduced to retrieve Redis connection instances. Different Redis connection instances are introduced to account for differences between the two drivers (Predis and PhpRedis).
src/Illuminate/Redis/Connections/PhpRedisConnection.php
@@ -0,0 +1,73 @@ +<?php + +namespace Illuminate\Redis\Connections; + +use Closure; + +class PhpRedisConnection extends Connection +{ + /** + * Create a new Predis connection. + * + * @param \Predis\Client $client + * @return void + */ + public function __construct($client) + { + $t...
true
Other
laravel
framework
1ef8b9c3f156c7d4debc6c6f67b73b032d8337d5.json
Rewrite Redis layer. This rewrite the Redis layer to function more like database or cache drivers… a new Redis factory is introduced to retrieve Redis connection instances. Different Redis connection instances are introduced to account for differences between the two drivers (Predis and PhpRedis).
src/Illuminate/Redis/Connections/PredisClusterConnection.php
@@ -0,0 +1,8 @@ +<?php + +namespace Illuminate\Redis\Connections; + +class PredisClusterConnection extends PredisConnection +{ + // +}
true
Other
laravel
framework
1ef8b9c3f156c7d4debc6c6f67b73b032d8337d5.json
Rewrite Redis layer. This rewrite the Redis layer to function more like database or cache drivers… a new Redis factory is introduced to retrieve Redis connection instances. Different Redis connection instances are introduced to account for differences between the two drivers (Predis and PhpRedis).
src/Illuminate/Redis/Connections/PredisConnection.php
@@ -0,0 +1,42 @@ +<?php + +namespace Illuminate\Redis\Connections; + +use Closure; + +class PredisConnection extends Connection +{ + /** + * Create a new Predis connection. + * + * @param \Predis\Client $client + * @return void + */ + public function __construct($client) + { + $thi...
true
Other
laravel
framework
1ef8b9c3f156c7d4debc6c6f67b73b032d8337d5.json
Rewrite Redis layer. This rewrite the Redis layer to function more like database or cache drivers… a new Redis factory is introduced to retrieve Redis connection instances. Different Redis connection instances are introduced to account for differences between the two drivers (Predis and PhpRedis).
src/Illuminate/Redis/Connectors/PhpRedisConnector.php
@@ -0,0 +1,118 @@ +<?php + +namespace Illuminate\Redis\Connectors; + +use Redis; +use RedisCluster; +use Illuminate\Support\Arr; +use Illuminate\Redis\Connections\PhpRedisConnection; +use Illuminate\Redis\Connections\PhpRedisClusterConnection; + +class PhpRedisConnector +{ + /** + * Create a new clustered Predis...
true
Other
laravel
framework
1ef8b9c3f156c7d4debc6c6f67b73b032d8337d5.json
Rewrite Redis layer. This rewrite the Redis layer to function more like database or cache drivers… a new Redis factory is introduced to retrieve Redis connection instances. Different Redis connection instances are introduced to account for differences between the two drivers (Predis and PhpRedis).
src/Illuminate/Redis/Connectors/PredisConnector.php
@@ -0,0 +1,41 @@ +<?php + +namespace Illuminate\Redis\Connectors; + +use Predis\Client; +use Illuminate\Support\Arr; +use Illuminate\Redis\Connections\PredisConnection; +use Illuminate\Redis\Connections\PredisClusterConnection; + +class PredisConnector +{ + /** + * Create a new clustered Predis connection. + ...
true
Other
laravel
framework
1ef8b9c3f156c7d4debc6c6f67b73b032d8337d5.json
Rewrite Redis layer. This rewrite the Redis layer to function more like database or cache drivers… a new Redis factory is introduced to retrieve Redis connection instances. Different Redis connection instances are introduced to account for differences between the two drivers (Predis and PhpRedis).
src/Illuminate/Redis/Database.php
@@ -1,44 +0,0 @@ -<?php - -namespace Illuminate\Redis; - -use Illuminate\Support\Arr; -use Illuminate\Contracts\Redis\Database as DatabaseContract; - -abstract class Database implements DatabaseContract -{ - /** - * Get a specific Redis connection instance. - * - * @param string $name - * @return \...
true