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
9f84d8de45106d97feb672e199840ea186035ef4.json
Update versions for 7.0
src/Illuminate/View/composer.json
@@ -16,11 +16,11 @@ "require": { "php": "^7.2", "ext-json": "*", - "illuminate/container": "^6.0", - "illuminate/contracts": "^6.0", - "illuminate/events": "^6.0", - "illuminate/filesystem": "^6.0", - "illuminate/support": "^6.0", + "illuminate/container"...
true
Other
laravel
framework
7c1f079ce047b83cdee0787bea86468262a0f22d.json
Fix incorrect return type
src/Illuminate/Cache/RedisStore.php
@@ -235,7 +235,7 @@ public function tags($names) /** * Get the Redis connection instance. * - * @return \Predis\ClientInterface + * @return \Illuminate\Redis\Connections\Connection */ public function connection() {
false
Other
laravel
framework
e54e1cc6841efca50c1d5a548f1ce15d7d59c51e.json
Remove Nexmo routing After seeing https://github.com/laravel/framework/pull/29679 I noticed this was left over from when we removed the Nexmo notification channel from the core. After this change people will need to implement the routeNotificationForNexmo method themselves as they do for the Slack driver. This is a b...
src/Illuminate/Notifications/RoutesNotifications.php
@@ -48,8 +48,6 @@ public function routeNotificationFor($driver, $notification = null) return $this->notifications(); case 'mail': return $this->email; - case 'nexmo': - return $this->phone_number; } } }
true
Other
laravel
framework
e54e1cc6841efca50c1d5a548f1ce15d7d59c51e.json
Remove Nexmo routing After seeing https://github.com/laravel/framework/pull/29679 I noticed this was left over from when we removed the Nexmo notification channel from the core. After this change people will need to implement the routeNotificationForNexmo method themselves as they do for the Slack driver. This is a b...
tests/Notifications/NotificationRoutesNotificationsTest.php
@@ -49,7 +49,6 @@ public function testNotificationOptionRouting() $instance = new RoutesNotificationsTestInstance; $this->assertEquals('bar', $instance->routeNotificationFor('foo')); $this->assertEquals('taylor@laravel.com', $instance->routeNotificationFor('mail')); - $this->assertEqua...
true
Other
laravel
framework
1239e66293c025210d69bab8a4556fdda9cfab85.json
Remove symfony dependencies from require-dev
composer.json
@@ -88,8 +88,6 @@ "phpunit/phpunit": "^8.0", "predis/predis": "^1.1.1", "symfony/cache": "^4.3", - "symfony/css-selector": "^4.3", - "symfony/dom-crawler": "^4.3", "true/punycode": "^2.1" }, "autoload": {
false
Other
laravel
framework
68359835771a43ee2432735b0d25de8d8c41b02c.json
Simplify lazy collection
src/Illuminate/Support/LazyCollection.php
@@ -149,10 +149,8 @@ public function mode($key = null) */ public function collapse() { - $original = clone $this; - - return new static(function () use ($original) { - foreach ($original as $values) { + return new static(function () { + foreach ($this as $value...
false
Other
laravel
framework
4365561e5e5ad3b088d1752c6c6bb5bab652a5db.json
Remove mutating methods from lazy collection
src/Illuminate/Support/Collection.php
@@ -805,6 +805,19 @@ public function prepend($value, $key = null) return $this; } + /** + * Push an item onto the end of the collection. + * + * @param mixed $value + * @return $this + */ + public function push($value) + { + $this->items[] = $value; + + retur...
true
Other
laravel
framework
4365561e5e5ad3b088d1752c6c6bb5bab652a5db.json
Remove mutating methods from lazy collection
src/Illuminate/Support/Enumerable.php
@@ -408,14 +408,6 @@ public function firstWhere($key, $operator = null, $value = null); */ public function flip(); - /** - * Remove an item by key. - * - * @param string|array $keys - * @return $this - */ - public function forget($keys); - /** * Get an item from the c...
true
Other
laravel
framework
4365561e5e5ad3b088d1752c6c6bb5bab652a5db.json
Remove mutating methods from lazy collection
src/Illuminate/Support/LazyCollection.php
@@ -401,29 +401,6 @@ public function flip() }); } - /** - * Remove an item by key. - * - * @param string|array $keys - * @return $this - */ - public function forget($keys) - { - $original = clone $this; - - $this->source = function () use ($original, $keys) {...
true
Other
laravel
framework
4365561e5e5ad3b088d1752c6c6bb5bab652a5db.json
Remove mutating methods from lazy collection
src/Illuminate/Support/Traits/EnumeratesValues.php
@@ -377,17 +377,6 @@ public function partition($key, $operator = null, $value = null) return new static([new static($passed), new static($failed)]); } - /** - * Push an item onto the end. - * - * @param mixed $value - * @return $this - */ - public function push($value) - {...
true
Other
laravel
framework
4365561e5e5ad3b088d1752c6c6bb5bab652a5db.json
Remove mutating methods from lazy collection
tests/Support/SupportCollectionTest.php
@@ -127,23 +127,17 @@ public function testLastWithDefaultAndWithoutCallback($collection) $this->assertEquals('default', $result); } - /** - * @dataProvider collectionClassProvider - */ - public function testPopReturnsAndRemovesLastItemInCollection($collection) + public function testPopR...
true
Other
laravel
framework
4365561e5e5ad3b088d1752c6c6bb5bab652a5db.json
Remove mutating methods from lazy collection
tests/Support/SupportLazyCollectionIsLazyTest.php
@@ -8,17 +8,6 @@ class SupportLazyCollectionIsLazyTest extends TestCase { - public function testAddIsLazy() - { - $this->assertDoesNotEnumerate(function ($collection) { - $collection->add(11); - }); - - $this->assertEnumerates(2, function ($collection) { - $collectio...
true
Other
laravel
framework
5c7ece78e17b581990838f9b7b81d7c311d2f0d8.json
Replace Application contract with Container This is a follow-up for https://github.com/laravel/framework/pull/29619 Mior correctly noted that Managers only need to have a container instance to function properly. The fact that the default container we inject here is an instance of the Laravel application is an impleme...
src/Illuminate/Hashing/HashManager.php
@@ -14,7 +14,7 @@ class HashManager extends Manager implements Hasher */ public function createBcryptDriver() { - return new BcryptHasher($this->app['config']['hashing.bcrypt'] ?? []); + return new BcryptHasher($this->config->get('hashing.bcrypt') ?? []); } /** @@ -24,7 +24,7 @...
true
Other
laravel
framework
5c7ece78e17b581990838f9b7b81d7c311d2f0d8.json
Replace Application contract with Container This is a follow-up for https://github.com/laravel/framework/pull/29619 Mior correctly noted that Managers only need to have a container instance to function properly. The fact that the default container we inject here is an instance of the Laravel application is an impleme...
src/Illuminate/Mail/TransportManager.php
@@ -25,7 +25,7 @@ class TransportManager extends Manager */ protected function createSmtpDriver() { - $config = $this->app->make('config')->get('mail'); + $config = $this->config->get('mail'); // The Swift SMTP transport instance will allow us to use any SMTP backend //...
true
Other
laravel
framework
5c7ece78e17b581990838f9b7b81d7c311d2f0d8.json
Replace Application contract with Container This is a follow-up for https://github.com/laravel/framework/pull/29619 Mior correctly noted that Managers only need to have a container instance to function properly. The fact that the default container we inject here is an instance of the Laravel application is an impleme...
src/Illuminate/Notifications/ChannelManager.php
@@ -35,7 +35,7 @@ class ChannelManager extends Manager implements DispatcherContract, FactoryContr public function send($notifiables, $notification) { return (new NotificationSender( - $this, $this->app->make(Bus::class), $this->app->make(Dispatcher::class), $this->locale) + $th...
true
Other
laravel
framework
5c7ece78e17b581990838f9b7b81d7c311d2f0d8.json
Replace Application contract with Container This is a follow-up for https://github.com/laravel/framework/pull/29619 Mior correctly noted that Managers only need to have a container instance to function properly. The fact that the default container we inject here is an instance of the Laravel application is an impleme...
src/Illuminate/Session/SessionManager.php
@@ -35,7 +35,7 @@ protected function createArrayDriver() protected function createCookieDriver() { return $this->buildSession(new CookieSessionHandler( - $this->app['cookie'], $this->app['config']['session.lifetime'] + $this->container->make('cookie'), $this->config->get('sessio...
true
Other
laravel
framework
5c7ece78e17b581990838f9b7b81d7c311d2f0d8.json
Replace Application contract with Container This is a follow-up for https://github.com/laravel/framework/pull/29619 Mior correctly noted that Managers only need to have a container instance to function properly. The fact that the default container we inject here is an instance of the Laravel application is an impleme...
src/Illuminate/Support/Manager.php
@@ -4,15 +4,23 @@ use Closure; use InvalidArgumentException; +use Illuminate\Contracts\Container\Container; abstract class Manager { /** - * The application instance. + * The container instance. * - * @var \Illuminate\Contracts\Container\Container|\Illuminate\Contracts\Foundation\Applicat...
true
Other
laravel
framework
9c31b1e0e1eb80086952952003b33ce1a29e7da9.json
Add LazyCollection tests
tests/Support/SupportLazyCollectionTest.php
@@ -3,10 +3,87 @@ namespace Illuminate\Tests\Support; use PHPUnit\Framework\TestCase; +use Illuminate\Support\Collection; use Illuminate\Support\LazyCollection; class SupportLazyCollectionTest extends TestCase { + public function testCanCreateEmptyCollection() + { + $this->assertSame([], LazyColle...
false
Other
laravel
framework
c02cd1e04f73b76b5e059a7b5b18fa5b8ba679b7.json
Add tapEach() method to LazyCollection
src/Illuminate/Support/LazyCollection.php
@@ -1212,8 +1212,35 @@ public function take($limit) return new static(function () use ($original, $limit) { $iterator = $original->getIterator(); - for (; $iterator->valid() && $limit--; $iterator->next()) { + while ($limit--) { + if (! $iterator->valid()) { ...
true
Other
laravel
framework
c02cd1e04f73b76b5e059a7b5b18fa5b8ba679b7.json
Add tapEach() method to LazyCollection
tests/Support/SupportLazyCollectionTest.php
@@ -0,0 +1,27 @@ +<?php + +namespace Illuminate\Tests\Support; + +use PHPUnit\Framework\TestCase; +use Illuminate\Support\LazyCollection; + +class SupportLazyCollectionTest extends TestCase +{ + public function testTapEach() + { + $data = LazyCollection::times(10); + + $tapped = []; + + $data...
true
Other
laravel
framework
be140fcc63fb2c7373e8c19269125b8f711a127b.json
Avoid call to method alias
src/Illuminate/Cache/Repository.php
@@ -205,7 +205,7 @@ public function put($key, $value, $ttl = null) $seconds = $this->getSeconds($ttl); if ($seconds <= 0) { - return $this->delete($key); + return $this->forget($key); } $result = $this->store->put($this->itemKey($key), $value, $seconds);
false
Other
laravel
framework
2fea43d024fa0f0faf10059113781942cc03a5ff.json
Return a lazy collection from Query@cursor()
src/Illuminate/Database/Eloquent/Builder.php
@@ -636,15 +636,15 @@ protected function isNestedUnder($relation, $name) } /** - * Get a generator for the given query. + * Get a lazy collection for the given query. * - * @return \Generator + * @return \Illuminate\Support\LazyCollection */ public function cursor() { -...
true
Other
laravel
framework
2fea43d024fa0f0faf10059113781942cc03a5ff.json
Return a lazy collection from Query@cursor()
src/Illuminate/Database/Query/Builder.php
@@ -10,6 +10,7 @@ use InvalidArgumentException; use Illuminate\Support\Collection; use Illuminate\Pagination\Paginator; +use Illuminate\Support\LazyCollection; use Illuminate\Support\Traits\Macroable; use Illuminate\Contracts\Support\Arrayable; use Illuminate\Database\ConnectionInterface; @@ -2234,19 +2235,21 @@ ...
true
Other
laravel
framework
2fea43d024fa0f0faf10059113781942cc03a5ff.json
Return a lazy collection from Query@cursor()
tests/Database/DatabaseEloquentHasManyThroughIntegrationTest.php
@@ -3,6 +3,7 @@ namespace Illuminate\Tests\Database; use PHPUnit\Framework\TestCase; +use Illuminate\Support\LazyCollection; use Illuminate\Database\Eloquent\SoftDeletes; use Illuminate\Database\Capsule\Manager as DB; use Illuminate\Database\Eloquent\Model as Eloquent; @@ -224,6 +225,8 @@ public function testCur...
true
Other
laravel
framework
0c25708a288dd1dc00ac2321851d0dcafaa2c6c2.json
Fix broken tests
src/Illuminate/Console/Command.php
@@ -641,8 +641,10 @@ public function setLaravel($laravel) * @param \Symfony\Component\Console\Output\OutputInterface $output * @return int */ - private function runCommand($command, array $arguments, OutputInterface $output): int + private function runCommand($command, array $arguments, OutputIn...
false
Other
laravel
framework
7d2c2c4d8b0fcf533ca6df68ad5ecc921e424e94.json
Fix UNION queries with ORDER BY bindings
src/Illuminate/Database/Query/Builder.php
@@ -59,6 +59,7 @@ class Builder 'having' => [], 'order' => [], 'union' => [], + 'unionOrder' => [], ]; /** @@ -1804,7 +1805,7 @@ public function orderBy($column, $direction = 'asc') $column = new Expression('('.$query.')'); - $this->addBinding(...
true
Other
laravel
framework
7d2c2c4d8b0fcf533ca6df68ad5ecc921e424e94.json
Fix UNION queries with ORDER BY bindings
tests/Database/DatabaseQueryBuilderTest.php
@@ -1067,6 +1067,13 @@ public function testOrderBys() $builder = $this->getBuilder(); $builder->select('*')->from('users')->orderByDesc('name'); $this->assertEquals('select * from "users" order by "name" desc', $builder->toSql()); + + $builder = $this->getBuilder(); + $builder->...
true
Other
laravel
framework
6c1e014943a508afb2c10869c3175f7783a004e1.json
Add subquery support for "from" and "table"
src/Illuminate/Database/Capsule/Manager.php
@@ -77,13 +77,14 @@ public static function connection($connection = null) /** * Get a fluent query builder instance. * - * @param string $table + * @param \Closure|\Illuminate\Database\Query\Builder|string $table + * @param string|null $as * @param string|null $connection ...
true
Other
laravel
framework
6c1e014943a508afb2c10869c3175f7783a004e1.json
Add subquery support for "from" and "table"
src/Illuminate/Database/Connection.php
@@ -257,12 +257,13 @@ public function getSchemaBuilder() /** * Begin a fluent query against a database table. * - * @param string $table + * @param \Closure|\Illuminate\Database\Query\Builder|string $table + * @param string|null $as * @return \Illuminate\Database\Query\Builder ...
true
Other
laravel
framework
6c1e014943a508afb2c10869c3175f7783a004e1.json
Add subquery support for "from" and "table"
src/Illuminate/Database/ConnectionInterface.php
@@ -9,10 +9,11 @@ interface ConnectionInterface /** * Begin a fluent query against a database table. * - * @param string $table + * @param \Closure|\Illuminate\Database\Query\Builder|string $table + * @param string|null $as * @return \Illuminate\Database\Query\Builder */ -...
true
Other
laravel
framework
6c1e014943a508afb2c10869c3175f7783a004e1.json
Add subquery support for "from" and "table"
src/Illuminate/Database/Query/Builder.php
@@ -367,12 +367,19 @@ public function distinct() /** * Set the table which the query is targeting. * - * @param string $table + * @param \Closure|\Illuminate\Database\Query\Builder|string $table + * @param string|null $as * @return $this */ - public function from($table...
true
Other
laravel
framework
6c1e014943a508afb2c10869c3175f7783a004e1.json
Add subquery support for "from" and "table"
tests/Integration/Database/QueryBuilderTest.php
@@ -31,6 +31,21 @@ protected function setUp(): void ]); } + public function testFromWithAlias() + { + $this->assertSame('select * from "posts" as "alias"', DB::table('posts', 'alias')->toSql()); + } + + public function testFromWithSubQuery() + { + $this->assertSame( + ...
true
Other
laravel
framework
ee7398572518e7fe768cbea10d4bfddd87314c18.json
Apply fixes from StyleCI (#29613)
src/Illuminate/Cache/CacheServiceProvider.php
@@ -3,8 +3,8 @@ namespace Illuminate\Cache; use Illuminate\Support\ServiceProvider; -use Illuminate\Contracts\Support\DeferrableProvider; use Symfony\Component\Cache\Adapter\Psr16Adapter; +use Illuminate\Contracts\Support\DeferrableProvider; class CacheServiceProvider extends ServiceProvider implements Deferrab...
false
Other
laravel
framework
bbc559073aed1706be8c0ee134c56fdcc347614a.json
Apply fixes from StyleCI (#29612)
tests/Integration/Foundation/DiscoverEventsTest.php
@@ -7,7 +7,6 @@ use Illuminate\Tests\Integration\Foundation\Fixtures\EventDiscovery\Events\EventOne; use Illuminate\Tests\Integration\Foundation\Fixtures\EventDiscovery\Events\EventTwo; use Illuminate\Tests\Integration\Foundation\Fixtures\EventDiscovery\Listeners\Listener; -use Tests\Integration\Foundation\Fixtures\...
false
Other
laravel
framework
0b8b18bfc1d8ecb1b2d7027629c1ea38f6508af6.json
Apply fixes from StyleCI (#29611)
tests/Integration/Foundation/DiscoverEventsTest.php
@@ -7,7 +7,6 @@ use Illuminate\Tests\Integration\Foundation\Fixtures\EventDiscovery\Events\EventOne; use Illuminate\Tests\Integration\Foundation\Fixtures\EventDiscovery\Events\EventTwo; use Illuminate\Tests\Integration\Foundation\Fixtures\EventDiscovery\Listeners\Listener; -use Tests\Integration\Foundation\Fixtures\...
false
Other
laravel
framework
31983f6d2fa14b24892bd2debcf8c22abed081f2.json
Add dependencies to commands
src/Illuminate/Foundation/Providers/ArtisanServiceProvider.php
@@ -635,8 +635,8 @@ protected function registerQueueListenCommand() */ protected function registerQueueRestartCommand() { - $this->app->singleton('command.queue.restart', function () { - return new QueueRestartCommand; + $this->app->singleton('command.queue.restart', function ($...
false
Other
laravel
framework
4e44ae56d1a4a22b78d1d6fb7f82f06bb3678bbe.json
Use repository interfaces instead of alias
src/Illuminate/Queue/Console/RestartCommand.php
@@ -4,6 +4,7 @@ use Illuminate\Console\Command; use Illuminate\Support\InteractsWithTime; +use Illuminate\Contracts\Cache\Repository as Cache; class RestartCommand extends Command { @@ -23,14 +24,34 @@ class RestartCommand extends Command */ protected $description = 'Restart queue worker daemons afte...
true
Other
laravel
framework
4e44ae56d1a4a22b78d1d6fb7f82f06bb3678bbe.json
Use repository interfaces instead of alias
src/Illuminate/Queue/Console/WorkCommand.php
@@ -10,6 +10,7 @@ use Illuminate\Queue\Events\JobFailed; use Illuminate\Queue\Events\JobProcessed; use Illuminate\Queue\Events\JobProcessing; +use Illuminate\Contracts\Cache\Repository as Cache; class WorkCommand extends Command { @@ -45,16 +46,25 @@ class WorkCommand extends Command */ protected $wor...
true
Other
laravel
framework
da88b26a56bcd35e1e62f362c5920e023be6a9aa.json
Use real classname for seeders This way, if a programmer decides to override (example below) a seeder in a container, an actual class name is printed instead of the parent class name. Example: I'm working on a multi-tenant app, where each tenant has its own "configuration" folder (contains a service provider and...
src/Illuminate/Database/Seeder.php
@@ -35,11 +35,13 @@ public function call($class, $silent = false) $classes = Arr::wrap($class); foreach ($classes as $class) { + $seeder = $this->resolve($class); + if ($silent === false && isset($this->command)) { - $this->command->getOutput()->writeln("<info>...
false
Other
laravel
framework
55785d3514a8149d4858acef40c56a31b6b2ccd1.json
Remove Input Facade
src/Illuminate/Support/Facades/Input.php
@@ -1,114 +0,0 @@ -<?php - -namespace Illuminate\Support\Facades; - -/** - * @method static bool matchesType(string $actual, string $type) - * @method static bool isJson() - * @method static bool expectsJson() - * @method static bool wantsJson() - * @method static bool accepts(string|array $contentTypes) - * @method st...
true
Other
laravel
framework
55785d3514a8149d4858acef40c56a31b6b2ccd1.json
Remove Input Facade
src/Illuminate/Support/Facades/Request.php
@@ -3,6 +3,43 @@ namespace Illuminate\Support\Facades; /** + * @method static bool matchesType(string $actual, string $type) + * @method static bool isJson() + * @method static bool expectsJson() + * @method static bool wantsJson() + * @method static bool accepts(string|array $contentTypes) + * @method static bool ...
true
Other
laravel
framework
bbc0a1980a51a8894c5bcc9a42e605f43b18f897.json
Use proper assertions.
tests/Database/DatabaseEloquentModelTest.php
@@ -149,7 +149,7 @@ public function testArrayAccessToAttributes() $this->assertTrue(isset($model['connection'])); $this->assertEquals($model['connection'], 2); $this->assertFalse(isset($model['table'])); - $this->assertEquals($model['table'], null); + $this->assertNull($model['t...
true
Other
laravel
framework
bbc0a1980a51a8894c5bcc9a42e605f43b18f897.json
Use proper assertions.
tests/Http/HttpRequestTest.php
@@ -16,6 +16,8 @@ class HttpRequestTest extends TestCase { protected function tearDown(): void { + parent::tearDown(); + m::close(); } @@ -915,18 +917,18 @@ public function testMagicMethods() // Parameter 'foo' is 'bar', then it ISSET and is NOT EMPTY. $this->assert...
true
Other
laravel
framework
bbc0a1980a51a8894c5bcc9a42e605f43b18f897.json
Use proper assertions.
tests/Mail/MailMarkdownTest.php
@@ -11,6 +11,8 @@ class MailMarkdownTest extends TestCase { protected function tearDown(): void { + parent::tearDown(); + m::close(); } @@ -24,9 +26,9 @@ public function testRenderFunctionReturnsHtml() $viewFactory->shouldReceive('make')->with('mail::themes.default')->andRetur...
true
Other
laravel
framework
2bc42882d85787d1cbace7215c27dda138e67a10.json
Add lazy() method to standard collection
src/Illuminate/Support/Collection.php
@@ -60,6 +60,16 @@ public function all() return $this->items; } + /** + * Get a lazy collection for the items in this collection. + * + * @return \Illuminate\Support\LazyCollection + */ + public function lazy() + { + return new LazyCollection($this->items); + } + ...
true
Other
laravel
framework
2bc42882d85787d1cbace7215c27dda138e67a10.json
Add lazy() method to standard collection
tests/Support/SupportCollectionTest.php
@@ -269,6 +269,18 @@ public function testToArrayCallsToArrayOnEachItemInCollection($collection) $this->assertEquals(['foo.array', 'bar.array'], $results); } + public function testLazyReturnsLazyCollection() + { + $data = new Collection([1, 2, 3, 4, 5]); + + $lazy = $data->lazy(); + +...
true
Other
laravel
framework
ecf7f30e9778c6df91677fbc8f3d407318a8d298.json
Create LazyCollection class
src/Illuminate/Support/LazyCollection.php
@@ -0,0 +1,1419 @@ +<?php + +namespace Illuminate\Support; + +use Closure; +use stdClass; +use ArrayIterator; +use IteratorAggregate; +use Illuminate\Support\Traits\Macroable; +use Illuminate\Support\Traits\EnumeratesValues; + +class LazyCollection implements Enumerable +{ + use EnumeratesValues, Macroable; + + /...
true
Other
laravel
framework
ecf7f30e9778c6df91677fbc8f3d407318a8d298.json
Create LazyCollection class
tests/Support/SupportCollectionTest.php
@@ -15,6 +15,7 @@ use PHPUnit\Framework\TestCase; use Illuminate\Support\Collection; use Illuminate\Support\HtmlString; +use Illuminate\Support\LazyCollection; use Illuminate\Contracts\Support\Jsonable; use Illuminate\Contracts\Support\Arrayable; @@ -3934,6 +3935,7 @@ public function collectionClassProvider() ...
true
Other
laravel
framework
67d6b72b68b4f02665ddba079fb9edd3ddb90d8f.json
Add Enumerable skip() method
src/Illuminate/Support/Collection.php
@@ -942,6 +942,17 @@ public function shuffle($seed = null) return new static(Arr::shuffle($this->items, $seed)); } + /** + * Skip the first {$count} items. + * + * @param int $count + * @return static + */ + public function skip($count) + { + return $this->slice($co...
true
Other
laravel
framework
67d6b72b68b4f02665ddba079fb9edd3ddb90d8f.json
Add Enumerable skip() method
src/Illuminate/Support/Enumerable.php
@@ -767,6 +767,14 @@ public function shift(); */ public function shuffle($seed = null); + /** + * Skip the first {$count} items. + * + * @param int $count + * @return static + */ + public function skip($count); + /** * Get a slice of items from the enumerable. *
true
Other
laravel
framework
67d6b72b68b4f02665ddba079fb9edd3ddb90d8f.json
Add Enumerable skip() method
tests/Support/SupportCollectionTest.php
@@ -205,6 +205,18 @@ public function testCollectionShuffleWithSeed($collection) $this->assertEquals($firstRandom, $secondRandom); } + /** + * @dataProvider collectionClassProvider + */ + public function testSkipMethod($collection) + { + $data = new $collection([1, 2, 3, 4, 5, 6])...
true
Other
laravel
framework
0c86fd2d155e431b5055046eced247a9037b9099.json
Support all Enumerables in proxy
src/Illuminate/Support/HigherOrderCollectionProxy.php
@@ -3,14 +3,14 @@ namespace Illuminate\Support; /** - * @mixin \Illuminate\Support\Collection + * @mixin \Illuminate\Support\Enumerable */ class HigherOrderCollectionProxy { /** * The collection being operated on. * - * @var \Illuminate\Support\Collection + * @var \Illuminate\Support\En...
false
Other
laravel
framework
7657da10f2a3b9e49270d371685fb836947ca724.json
Create Enumerable contract
src/Illuminate/Support/Collection.php
@@ -37,7 +37,8 @@ * @property-read HigherOrderCollectionProxy $sum * @property-read HigherOrderCollectionProxy $unique */ -class Collection implements Arrayable, ArrayAccess, Countable, IteratorAggregate, Jsonable, JsonSerializable + +class Collection implements ArrayAccess, Enumerable { use Macroable;
true
Other
laravel
framework
7657da10f2a3b9e49270d371685fb836947ca724.json
Create Enumerable contract
src/Illuminate/Support/Enumerable.php
@@ -0,0 +1,979 @@ +<?php + +namespace Illuminate\Support; + +use Countable; +use JsonSerializable; +use IteratorAggregate; +use Illuminate\Contracts\Support\Jsonable; +use Illuminate\Contracts\Support\Arrayable; + +interface Enumerable extends Arrayable, Countable, IteratorAggregate, Jsonable, JsonSerializable +{ + ...
true
Other
laravel
framework
7414de1dbe645e371f9ddff758e11aa287ae92c8.json
Fix StyleCI warning
src/Illuminate/Foundation/Testing/TestCase.php
@@ -4,8 +4,8 @@ use Mockery; use Carbon\Carbon; -use Illuminate\Support\Str; use Carbon\CarbonImmutable; +use Illuminate\Support\Str; use Illuminate\Support\Facades\Facade; use Illuminate\Database\Eloquent\Model; use Mockery\Exception\InvalidCountException;
false
Other
laravel
framework
c06ea522ca7e553584e7fb0f3726d2c979c25ec5.json
Remove unused variables
tests/Log/LogLoggerTest.php
@@ -54,15 +54,15 @@ public function testListenShortcutFailsWithNoDispatcher() $this->expectException(RuntimeException::class); $this->expectExceptionMessage('Events dispatcher has not been set.'); - $writer = new Logger($monolog = m::mock(Monolog::class)); + $writer = new Logger(m::moc...
false
Other
laravel
framework
7b0b2e847ae32e6973f9226a9f4b650920e74480.json
Fix exception message
src/Illuminate/Foundation/ProviderRepository.php
@@ -186,8 +186,8 @@ protected function freshManifest(array $providers) */ public function writeManifest($manifest) { - if (! is_writable(dirname($this->manifestPath))) { - throw new Exception('The bootstrap/cache directory must be present and writable.'); + if (! is_writable($di...
true
Other
laravel
framework
7b0b2e847ae32e6973f9226a9f4b650920e74480.json
Fix exception message
tests/Foundation/FoundationProviderRepositoryTest.php
@@ -2,6 +2,7 @@ namespace Illuminate\Tests\Foundation; +use Exception; use Mockery as m; use PHPUnit\Framework\TestCase; use Illuminate\Filesystem\Filesystem; @@ -87,4 +88,15 @@ public function testWriteManifestStoresToProperLocation() $this->assertEquals(['foo', 'when' => []], $result); } + + ...
true
Other
laravel
framework
d4f1b423350607582d33bbd9710747ea7558fd38.json
Remove unused property
src/Illuminate/Cache/NullStore.php
@@ -6,13 +6,6 @@ class NullStore extends TaggableStore { use RetrievesMultipleKeys; - /** - * The array of stored values. - * - * @var array - */ - protected $storage = []; - /** * Retrieve an item from the cache by key. *
false
Other
laravel
framework
9cb116d9f7d810b71f3e878db8ec9d27af148ada.json
Add the ability add a sub query select
src/Illuminate/Database/Query/Builder.php
@@ -335,10 +335,23 @@ protected function parseSub($query) * Add a new select column to the query. * * @param array|mixed $column + * @param \Closure|\Illuminate\Database\Query\Builder|string|null $query * @return $this */ - public function addSelect($column) + public function...
true
Other
laravel
framework
9cb116d9f7d810b71f3e878db8ec9d27af148ada.json
Add the ability add a sub query select
tests/Database/DatabaseQueryBuilderTest.php
@@ -103,6 +103,24 @@ public function testAddingSelects() $builder = $this->getBuilder(); $builder->select('foo')->addSelect('bar')->addSelect(['baz', 'boom'])->from('users'); $this->assertEquals('select "foo", "bar", "baz", "boom" from "users"', $builder->toSql()); + + $builder = $this...
true
Other
laravel
framework
8c994c3394c5f1ddc77717e2d3150ba3c9c70d16.json
Add the ability to order by subqueries
src/Illuminate/Database/Query/Builder.php
@@ -1761,14 +1761,24 @@ public function orHavingRaw($sql, array $bindings = []) /** * Add an "order by" clause to the query. * - * @param string $column + * @param \Closure|\Illuminate\Database\Query\Builder|string $column * @param string $direction * @return $this * ...
true
Other
laravel
framework
8c994c3394c5f1ddc77717e2d3150ba3c9c70d16.json
Add the ability to order by subqueries
tests/Database/DatabaseQueryBuilderTest.php
@@ -1069,6 +1069,23 @@ public function testOrderBys() $this->assertEquals('select * from "users" order by "name" desc', $builder->toSql()); } + public function testOrderBySubQueries() + { + $expected = 'select * from "users" order by (select "created_at" from "logins" where "user_id" = "use...
true
Other
laravel
framework
a5ccc1302223042a2b5656da009e8e19aaf4e9df.json
Use DI and Contract instead of static method This allows for a custom container and is a cleaner way than using a static resolver.
src/Illuminate/Queue/CallQueuedHandler.php
@@ -5,9 +5,9 @@ use Exception; use ReflectionClass; use Illuminate\Pipeline\Pipeline; -use Illuminate\Container\Container; use Illuminate\Contracts\Queue\Job; use Illuminate\Contracts\Bus\Dispatcher; +use Illuminate\Contracts\Container\Container; use Illuminate\Database\Eloquent\ModelNotFoundException; class C...
true
Other
laravel
framework
a5ccc1302223042a2b5656da009e8e19aaf4e9df.json
Use DI and Contract instead of static method This allows for a custom container and is a cleaner way than using a static resolver.
tests/Integration/Queue/CallQueuedHandlerTest.php
@@ -29,7 +29,7 @@ public function testJobCanBeDispatched() { CallQueuedHandlerTestJob::$handled = false; - $instance = new CallQueuedHandler(new Dispatcher(app())); + $instance = new CallQueuedHandler(new Dispatcher($this->app), $this->app); $job = m::mock(Job::class); ...
true
Other
laravel
framework
2e2fd1ff8deef57f5e03bb0263567ac9efd3367e.json
Remove JsonExpression class
src/Illuminate/Database/Query/Grammars/MySqlGrammar.php
@@ -3,7 +3,6 @@ namespace Illuminate\Database\Query\Grammars; use Illuminate\Database\Query\Builder; -use Illuminate\Database\Query\JsonExpression; class MySqlGrammar extends Grammar { @@ -145,25 +144,33 @@ protected function compileUpdateColumns($values) { return collect($values)->map(function ($...
true
Other
laravel
framework
2e2fd1ff8deef57f5e03bb0263567ac9efd3367e.json
Remove JsonExpression class
src/Illuminate/Database/Query/JsonExpression.php
@@ -1,51 +0,0 @@ -<?php - -namespace Illuminate\Database\Query; - -use InvalidArgumentException; - -class JsonExpression extends Expression -{ - /** - * Create a new raw query expression. - * - * @param mixed $value - * @return void - */ - public function __construct($value) - { - ...
true
Other
laravel
framework
74b62bbbb32674dfa167e2812231bf302454e67f.json
remove unneeded code
src/Illuminate/Queue/SerializesAndRestoresModelIdentifiers.php
@@ -85,9 +85,7 @@ protected function restoreCollection($value) return new $collectionClass( collect($value->id)->map(function ($id) use ($collection) { return $collection[$id] ?? null; - })->when($collection->count() !== count($value->id), function ($collection) { - ...
false
Other
laravel
framework
8557dc56b11c5e4dc746cb5558d6e694131f0dd8.json
Remove duplicate trans methods on Translator This removes the duplicate trans and transChoice methods on the Translator class since these are already implemented as "get" and "choice". Replaces https://github.com/laravel/framework/pull/29516
src/Illuminate/Contracts/Translation/Translator.php
@@ -12,7 +12,7 @@ interface Translator * @param string|null $locale * @return mixed */ - public function trans($key, array $replace = [], $locale = null); + public function get($key, array $replace = [], $locale = null); /** * Get a translation according to an integer value. @@ -2...
true
Other
laravel
framework
8557dc56b11c5e4dc746cb5558d6e694131f0dd8.json
Remove duplicate trans methods on Translator This removes the duplicate trans and transChoice methods on the Translator class since these are already implemented as "get" and "choice". Replaces https://github.com/laravel/framework/pull/29516
src/Illuminate/Foundation/helpers.php
@@ -875,7 +875,7 @@ function trans($key = null, $replace = [], $locale = null) return app('translator'); } - return app('translator')->trans($key, $replace, $locale); + return app('translator')->get($key, $replace, $locale); } } @@ -891,7 +891,7 @@ function trans($key = nul...
true
Other
laravel
framework
8557dc56b11c5e4dc746cb5558d6e694131f0dd8.json
Remove duplicate trans methods on Translator This removes the duplicate trans and transChoice methods on the Translator class since these are already implemented as "get" and "choice". Replaces https://github.com/laravel/framework/pull/29516
src/Illuminate/Translation/Translator.php
@@ -88,19 +88,6 @@ public function has($key, $locale = null, $fallback = true) return $this->get($key, [], $locale, $fallback) !== $key; } - /** - * Get the translation for a given key. - * - * @param string $key - * @param array $replace - * @param string|null $locale - ...
true
Other
laravel
framework
8557dc56b11c5e4dc746cb5558d6e694131f0dd8.json
Remove duplicate trans methods on Translator This removes the duplicate trans and transChoice methods on the Translator class since these are already implemented as "get" and "choice". Replaces https://github.com/laravel/framework/pull/29516
src/Illuminate/Validation/Concerns/FormatsMessages.php
@@ -54,7 +54,7 @@ protected function getMessage($attribute, $rule) // messages out of the translator service for this validation rule. $key = "validation.{$lowerRule}"; - if ($key != ($value = $this->translator->trans($key))) { + if ($key != ($value = $this->translator->get($key))) { ...
true
Other
laravel
framework
8557dc56b11c5e4dc746cb5558d6e694131f0dd8.json
Remove duplicate trans methods on Translator This removes the duplicate trans and transChoice methods on the Translator class since these are already implemented as "get" and "choice". Replaces https://github.com/laravel/framework/pull/29516
tests/Translation/TranslationTranslatorTest.php
@@ -71,7 +71,7 @@ public function testTransMethodProperlyLoadsAndRetrievesItemWithHTMLInTheMessage $t = new Translator($this->getLoader(), 'en'); $t->getLoader()->shouldReceive('load')->once()->with('en', '*', '*')->andReturn([]); $t->getLoader()->shouldReceive('load')->once()->with('en', 'fo...
true
Other
laravel
framework
42b16bfc934ca7b5c1f33c8438d0ab45a7484950.json
Remove unused variables
tests/Routing/RoutingUrlGeneratorTest.php
@@ -17,8 +17,8 @@ class RoutingUrlGeneratorTest extends TestCase public function testBasicGeneration() { $url = new UrlGenerator( - $routes = new RouteCollection, - $request = Request::create('http://www.foo.com/') + new RouteCollection, + Request::create('...
false
Other
laravel
framework
b28424410e46ebcdc0733f46b5a4c9aca36b1c58.json
Add missing test for getRoutesByMethod.
tests/Routing/RouteCollectionTest.php
@@ -190,6 +190,42 @@ public function testRouteCollectionCanGetRoutesByName() $this->assertSame($routesByName, $this->routeCollection->getRoutesByName()); } + public function testRouteCollectionCanGetRoutesByMethod() + { + $routes = [ + 'foo_index' => new Route('GET', 'foo/index',...
false
Other
laravel
framework
ab3a6af87d07632e5d5643bd4987902c6fe239db.json
Fix duplicate implements.
src/Illuminate/Filesystem/FilesystemAdapter.php
@@ -26,7 +26,7 @@ /** * @mixin \League\Flysystem\FilesystemInterface */ -class FilesystemAdapter implements CloudFilesystemContract, FilesystemContract +class FilesystemAdapter implements CloudFilesystemContract { /** * The Flysystem filesystem implementation.
false
Other
laravel
framework
e2518c79d793094533bc97a522c32922ada17d8f.json
Simplify mock returns.
tests/Auth/AuthEloquentUserProviderTest.php
@@ -24,7 +24,7 @@ public function testRetrieveByIDReturnsUser() $mock->shouldReceive('getAuthIdentifierName')->once()->andReturn('id'); $mock->shouldReceive('where')->once()->with('id', 1)->andReturn($mock); $mock->shouldReceive('first')->once()->andReturn('bar'); - $provider->expects(...
true
Other
laravel
framework
e2518c79d793094533bc97a522c32922ada17d8f.json
Simplify mock returns.
tests/Auth/AuthGuardTest.php
@@ -128,7 +128,7 @@ public function testLoginStoresIdentifierInSession() [$session, $provider, $request, $cookie] = $this->getMocks(); $mock = $this->getMockBuilder(SessionGuard::class)->setMethods(['getName'])->setConstructorArgs(['default', $provider, $session, $request])->getMock(); $user ...
true
Other
laravel
framework
e2518c79d793094533bc97a522c32922ada17d8f.json
Simplify mock returns.
tests/Auth/AuthPasswordBrokerTest.php
@@ -24,7 +24,7 @@ public function testIfUserIsNotFoundErrorRedirectIsReturned() { $mocks = $this->getMocks(); $broker = $this->getMockBuilder(PasswordBroker::class)->setMethods(['getUser', 'makeErrorRedirect'])->setConstructorArgs(array_values($mocks))->getMock(); - $broker->expects($this-...
true
Other
laravel
framework
e2518c79d793094533bc97a522c32922ada17d8f.json
Simplify mock returns.
tests/Cache/CacheApcStoreTest.php
@@ -11,15 +11,15 @@ class CacheApcStoreTest extends TestCase public function testGetReturnsNullWhenNotFound() { $apc = $this->getMockBuilder(ApcWrapper::class)->setMethods(['get'])->getMock(); - $apc->expects($this->once())->method('get')->with($this->equalTo('foobar'))->will($this->returnValu...
true
Other
laravel
framework
e2518c79d793094533bc97a522c32922ada17d8f.json
Simplify mock returns.
tests/Cache/CacheDatabaseStoreTest.php
@@ -36,7 +36,7 @@ public function testNullIsReturnedAndItemDeletedWhenItemIsExpired() $store->getConnection()->shouldReceive('table')->once()->with('table')->andReturn($table); $table->shouldReceive('where')->once()->with('key', '=', 'prefixfoo')->andReturn($table); $table->shouldReceive('fir...
true
Other
laravel
framework
e2518c79d793094533bc97a522c32922ada17d8f.json
Simplify mock returns.
tests/Cache/CacheFileStoreTest.php
@@ -50,7 +50,7 @@ public function testExpiredItemsReturnNull() { $files = $this->mockFilesystem(); $contents = '0000000000'; - $files->expects($this->once())->method('get')->will($this->returnValue($contents)); + $files->expects($this->once())->method('get')->willReturn($contents); ...
true
Other
laravel
framework
e2518c79d793094533bc97a522c32922ada17d8f.json
Simplify mock returns.
tests/Cache/CacheMemcachedConnectorTest.php
@@ -21,7 +21,7 @@ public function testServersAreAddedCorrectly() $connector = $this->connectorMock(); $connector->expects($this->once()) ->method('createMemcachedInstance') - ->will($this->returnValue($memcached)); + ->willReturn($memcached); $result = $th...
true
Other
laravel
framework
e2518c79d793094533bc97a522c32922ada17d8f.json
Simplify mock returns.
tests/Cache/CacheMemcachedStoreTest.php
@@ -17,8 +17,8 @@ public function testGetReturnsNullWhenNotFound() } $memcache = $this->getMockBuilder(stdClass::class)->setMethods(['get', 'getResultCode'])->getMock(); - $memcache->expects($this->once())->method('get')->with($this->equalTo('foo:bar'))->will($this->returnValue(null)); - ...
true
Other
laravel
framework
e2518c79d793094533bc97a522c32922ada17d8f.json
Simplify mock returns.
tests/Console/ConsoleApplicationTest.php
@@ -22,7 +22,7 @@ public function testAddSetsLaravelInstance() $app = $this->getMockConsole(['addToParent']); $command = m::mock(Command::class); $command->shouldReceive('setLaravel')->once()->with(m::type(ApplicationContract::class)); - $app->expects($this->once())->method('addToParen...
true
Other
laravel
framework
e2518c79d793094533bc97a522c32922ada17d8f.json
Simplify mock returns.
tests/Container/ContainerTest.php
@@ -413,7 +413,7 @@ public function testMakeWithMethodIsAnAliasForMakeMethod() $mock->expects($this->once()) ->method('make') ->with(ContainerDefaultValueStub::class, ['default' => 'laurence']) - ->will($this->returnValue(new stdClass)); + ->willReturn(new st...
true
Other
laravel
framework
e2518c79d793094533bc97a522c32922ada17d8f.json
Simplify mock returns.
tests/Database/DatabaseConnectionTest.php
@@ -34,7 +34,7 @@ public function testSettingDefaultCallsGetDefaultGrammar() { $connection = $this->getMockConnection(); $mock = m::mock(stdClass::class); - $connection->expects($this->once())->method('getDefaultQueryGrammar')->will($this->returnValue($mock)); + $connection->expects...
true
Other
laravel
framework
e2518c79d793094533bc97a522c32922ada17d8f.json
Simplify mock returns.
tests/Database/DatabaseConnectorTest.php
@@ -32,8 +32,8 @@ public function testMySqlConnectCallsCreateConnectionWithProperArguments($dsn, $ { $connector = $this->getMockBuilder(MySqlConnector::class)->setMethods(['createConnection', 'getOptions'])->getMock(); $connection = m::mock(PDO::class); - $connector->expects($this->once())...
true
Other
laravel
framework
e2518c79d793094533bc97a522c32922ada17d8f.json
Simplify mock returns.
tests/Database/DatabaseEloquentCollectionTest.php
@@ -159,7 +159,7 @@ public function testLoadMethodEagerLoadsGivenRelationships() { $c = $this->getMockBuilder(Collection::class)->setMethods(['first'])->setConstructorArgs([['foo']])->getMock(); $mockItem = m::mock(stdClass::class); - $c->expects($this->once())->method('first')->will($this...
true
Other
laravel
framework
e2518c79d793094533bc97a522c32922ada17d8f.json
Simplify mock returns.
tests/Database/DatabaseEloquentHasOneTest.php
@@ -111,7 +111,7 @@ public function testSaveMethodSetsForeignKeyOnModel() { $relation = $this->getRelation(); $mockModel = $this->getMockBuilder(Model::class)->setMethods(['save'])->getMock(); - $mockModel->expects($this->once())->method('save')->will($this->returnValue(true)); + $m...
true
Other
laravel
framework
e2518c79d793094533bc97a522c32922ada17d8f.json
Simplify mock returns.
tests/Database/DatabaseEloquentModelTest.php
@@ -259,7 +259,7 @@ public function testUpdateProcess() $query = m::mock(Builder::class); $query->shouldReceive('where')->once()->with('id', '=', 1); $query->shouldReceive('update')->once()->with(['name' => 'taylor'])->andReturn(1); - $model->expects($this->once())->method('newModelQue...
true
Other
laravel
framework
e2518c79d793094533bc97a522c32922ada17d8f.json
Simplify mock returns.
tests/Database/DatabaseEloquentPivotTest.php
@@ -117,7 +117,7 @@ public function testDeleteMethodDeletesModelByKeys() $query = m::mock(stdClass::class); $query->shouldReceive('where')->once()->with(['foreign' => 'foreign.value', 'other' => 'other.value'])->andReturn($query); $query->shouldReceive('delete')->once()->andReturn(true); - ...
true
Other
laravel
framework
e2518c79d793094533bc97a522c32922ada17d8f.json
Simplify mock returns.
tests/Database/DatabaseMigrationCreatorTest.php
@@ -19,7 +19,7 @@ public function testBasicCreateMethodStoresMigrationFile() { $creator = $this->getCreator(); - $creator->expects($this->any())->method('getDatePrefix')->will($this->returnValue('foo')); + $creator->expects($this->any())->method('getDatePrefix')->willReturn('foo'); ...
true
Other
laravel
framework
e2518c79d793094533bc97a522c32922ada17d8f.json
Simplify mock returns.
tests/Database/DatabaseMigrationRepositoryTest.php
@@ -38,7 +38,7 @@ public function testGetLastMigrationsGetsAllMigrationsWithTheLatestBatchNumber() $repo = $this->getMockBuilder(DatabaseMigrationRepository::class)->setMethods(['getLastBatchNumber'])->setConstructorArgs([ $resolver = m::mock(ConnectionResolverInterface::class), 'migrations', ...
true
Other
laravel
framework
e2518c79d793094533bc97a522c32922ada17d8f.json
Simplify mock returns.
tests/Database/DatabaseProcessorTest.php
@@ -19,7 +19,7 @@ protected function tearDown(): void public function testInsertGetIdProcessing() { $pdo = $this->createMock(ProcessorTestPDOStub::class); - $pdo->expects($this->once())->method('lastInsertId')->with($this->equalTo('id'))->will($this->returnValue('1')); + $pdo->expects($...
true
Other
laravel
framework
e2518c79d793094533bc97a522c32922ada17d8f.json
Simplify mock returns.
tests/Database/DatabaseSchemaBlueprintTest.php
@@ -25,7 +25,7 @@ public function testToSqlRunsCommandsFromBlueprint() $conn->shouldReceive('statement')->once()->with('bar'); $grammar = m::mock(MySqlGrammar::class); $blueprint = $this->getMockBuilder(Blueprint::class)->setMethods(['toSql'])->setConstructorArgs(['users'])->getMock(); - ...
true
Other
laravel
framework
e2518c79d793094533bc97a522c32922ada17d8f.json
Simplify mock returns.
tests/Mail/MailMailerTest.php
@@ -28,7 +28,7 @@ public function testMailerSendSendsMessageWithProperViewContent() unset($_SERVER['__mailer.test']); $mailer = $this->getMockBuilder(Mailer::class)->setMethods(['createMessage'])->setConstructorArgs($this->getMocks())->getMock(); $message = m::mock(Swift_Mime_SimpleMessage::c...
true
Other
laravel
framework
e2518c79d793094533bc97a522c32922ada17d8f.json
Simplify mock returns.
tests/Mail/MailMessageTest.php
@@ -103,7 +103,7 @@ public function testBasicAttachment() $swift = m::mock(stdClass::class); $message = $this->getMockBuilder(Message::class)->setMethods(['createAttachmentFromPath'])->setConstructorArgs([$swift])->getMock(); $attachment = m::mock(stdClass::class); - $message->expects(...
true
Other
laravel
framework
e2518c79d793094533bc97a522c32922ada17d8f.json
Simplify mock returns.
tests/Queue/QueueDatabaseQueueUnitTest.php
@@ -20,7 +20,7 @@ protected function tearDown(): void public function testPushProperlyPushesJobOntoDatabase() { $queue = $this->getMockBuilder(DatabaseQueue::class)->setMethods(['currentTime'])->setConstructorArgs([$database = m::mock(Connection::class), 'table', 'default'])->getMock(); - $que...
true
Other
laravel
framework
e2518c79d793094533bc97a522c32922ada17d8f.json
Simplify mock returns.
tests/Queue/QueueRedisQueueTest.php
@@ -20,7 +20,7 @@ protected function tearDown(): void public function testPushProperlyPushesJobOntoRedis() { $queue = $this->getMockBuilder(RedisQueue::class)->setMethods(['getRandomId'])->setConstructorArgs([$redis = m::mock(Factory::class), 'default'])->getMock(); - $queue->expects($this->on...
true