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
6116d5106525a05d885408ed0a63a752732ba253.json
Use value helper when applicable (#36994)
src/Illuminate/Database/Eloquent/Concerns/HidesAttributes.php
@@ -94,9 +94,7 @@ public function makeVisible($attributes) */ public function makeVisibleIf($condition, $attributes) { - $condition = $condition instanceof Closure ? $condition($this) : $condition; - - return $condition ? $this->makeVisible($attributes) : $this; + return value($cond...
true
Other
laravel
framework
6116d5106525a05d885408ed0a63a752732ba253.json
Use value helper when applicable (#36994)
src/Illuminate/Foundation/Testing/Concerns/InteractsWithViews.php
@@ -2,7 +2,6 @@ namespace Illuminate\Foundation\Testing\Concerns; -use Closure; use Illuminate\Support\Facades\View as ViewFacade; use Illuminate\Support\MessageBag; use Illuminate\Support\Str; @@ -57,11 +56,7 @@ protected function component(string $componentClass, array $data = []) { $component =...
true
Other
laravel
framework
6116d5106525a05d885408ed0a63a752732ba253.json
Use value helper when applicable (#36994)
src/Illuminate/Foundation/helpers.php
@@ -659,7 +659,7 @@ function rescue(callable $callback, $rescue = null, $report = true) report($e); } - return $rescue instanceof Closure ? $rescue($e) : $rescue; + return value($rescue, $e); } } }
true
Other
laravel
framework
6116d5106525a05d885408ed0a63a752732ba253.json
Use value helper when applicable (#36994)
src/Illuminate/View/Concerns/ManagesComponents.php
@@ -2,7 +2,6 @@ namespace Illuminate\View\Concerns; -use Closure; use Illuminate\Contracts\Support\Htmlable; use Illuminate\Contracts\View\View; use Illuminate\Support\Arr; @@ -84,9 +83,7 @@ public function renderComponent() $data = $this->componentData(); - if ($view instanceof Closure) { -...
true
Other
laravel
framework
f1b3e80d22e57b28f9afbd7e44529c6b15b39526.json
Simplify throw unless (#36988)
src/Illuminate/Support/helpers.php
@@ -304,13 +304,7 @@ function throw_if($condition, $exception = 'RuntimeException', ...$parameters) */ function throw_unless($condition, $exception = 'RuntimeException', ...$parameters) { - if (! $condition) { - if (is_string($exception) && class_exists($exception)) { - ...
false
Other
laravel
framework
8f31b6407b5b4bf4082984a8f88db4da19451c7e.json
Apply fixes from StyleCI (#36983)
src/Illuminate/Routing/UrlGenerator.php
@@ -391,7 +391,7 @@ public function hasCorrectSignature(Request $request, $absolute = true, array $i { $ignoreQuery[] = 'signature'; - $url = $absolute ? $request->url() : '/' . $request->path(); + $url = $absolute ? $request->url() : '/'.$request->path(); $original = rtrim($url...
false
Other
laravel
framework
589fe7968349b191395547b9a0c5044a22d4456f.json
Reset use statements order
src/Illuminate/Http/Client/Factory.php
@@ -3,13 +3,12 @@ namespace Illuminate\Http\Client; use Closure; +use function GuzzleHttp\Promise\promise_for; use GuzzleHttp\Psr7\Response as Psr7Response; use Illuminate\Support\Str; use Illuminate\Support\Traits\Macroable; use PHPUnit\Framework\Assert as PHPUnit; -use function GuzzleHttp\Promise\promise_fo...
false
Other
laravel
framework
8f2d3ef57d4d13de850181e5a253b14923893909.json
Replace deprecated functions
src/Illuminate/Http/Client/Factory.php
@@ -3,7 +3,7 @@ namespace Illuminate\Http\Client; use Closure; -use function GuzzleHttp\Promise\promise_for; +use GuzzleHttp\Promise\Create; use GuzzleHttp\Psr7\Response as Psr7Response; use Illuminate\Support\Str; use Illuminate\Support\Traits\Macroable; @@ -34,6 +34,8 @@ * @method \Illuminate\Http\Client\Pen...
true
Other
laravel
framework
8f2d3ef57d4d13de850181e5a253b14923893909.json
Replace deprecated functions
src/Illuminate/Http/Client/RequestException.php
@@ -2,6 +2,8 @@ namespace Illuminate\Http\Client; +use GuzzleHttp\Psr7\Message; + class RequestException extends HttpClientException { /** @@ -34,7 +36,7 @@ protected function prepareMessage(Response $response) { $message = "HTTP request returned status code {$response->status()}"; - ...
true
Other
laravel
framework
9311dafa61fe5e7fd1aaffa525eca3dd15992fef.json
Implement anonymous migrations
src/Illuminate/Database/Migrations/Migrator.php
@@ -13,6 +13,7 @@ use Illuminate\Support\Arr; use Illuminate\Support\Collection; use Illuminate\Support\Str; +use ReflectionClass; use Symfony\Component\Console\Output\OutputInterface; class Migrator @@ -185,9 +186,8 @@ protected function runUp($file, $batch, $pretend) // First we will resolve a "real" ...
false
Other
laravel
framework
a22794263e85607bbf897c74dfde5f7172ce8910.json
Add temporary_url when creating flysystem (#36860)
src/Illuminate/Filesystem/FilesystemManager.php
@@ -243,7 +243,7 @@ protected function createFlysystem(AdapterInterface $adapter, array $config) { $cache = Arr::pull($config, 'cache'); - $config = Arr::only($config, ['visibility', 'disable_asserts', 'url']); + $config = Arr::only($config, ['visibility', 'disable_asserts', 'url', 'tempor...
false
Other
laravel
framework
33af82595b5f36d8f77cea69a4f275556e1ebfb4.json
Add exception accesor to HTTP client (#36879) * Add exception accesor to HTTP client If a request fails, a new toException() method is available to generate the illuminate RequestException to do with as you please. * Update Response.php Co-authored-by: Taylor Otwell <taylor@laravel.com>
src/Illuminate/Http/Client/Response.php
@@ -237,6 +237,18 @@ public function toPsrResponse() return $this->response; } + /** + * Create an exception if a server or client error occurred. + * + * @return \Illuminate\Http\Client\RequestException|null + */ + public function toException() + { + if ($this->failed())...
true
Other
laravel
framework
33af82595b5f36d8f77cea69a4f275556e1ebfb4.json
Add exception accesor to HTTP client (#36879) * Add exception accesor to HTTP client If a request fails, a new toException() method is available to generate the illuminate RequestException to do with as you please. * Update Response.php Co-authored-by: Taylor Otwell <taylor@laravel.com>
tests/Http/HttpClientTest.php
@@ -465,6 +465,27 @@ public function testCanConfirmManyHeadersUsingAString() }); } + public function testExceptionAccessorOnSuccess() + { + $resp = new Response(new Psr7Response()); + + $this->assertNull($resp->toException()); + } + + public function testExceptionAccessorOnFail...
true
Other
laravel
framework
871fca6144fabc08c6ebf892098c1d8c8ea8140a.json
Support empty strings (#36848)
src/Illuminate/View/Compilers/BladeCompiler.php
@@ -417,7 +417,7 @@ protected function compileExtensions($value) protected function compileStatements($value) { return preg_replace_callback( - '/\B@(@?\w+(?:::\w+)?)([ \t]*)(\( ( (?>\'[^\']+\') | (?>"[^"]+") | (?>[^()\'"]+) | (?3) )* \))?/x', function ($match) { + '/\B@(@?\w+(?...
true
Other
laravel
framework
871fca6144fabc08c6ebf892098c1d8c8ea8140a.json
Support empty strings (#36848)
tests/View/Blade/BladePhpStatementsTest.php
@@ -52,4 +52,19 @@ public function testStringWithParenthesisDataValue() $this->assertEquals($expected, $this->compiler->compileString($string)); } + + public function testStringWithEmptyStringDataValue() + { + $string = "@php(\$data = ['test' => ''])"; + + $expected = "<?php (\$data ...
true
Other
laravel
framework
97fe4a1a7cb8dd8982a2c8af98154dd030fe6c95.json
Add dispatch_sync helper (#36835)
src/Illuminate/Bus/Dispatcher.php
@@ -81,7 +81,7 @@ public function dispatch($command) /** * Dispatch a command to its appropriate handler in the current process. * - * Queuable jobs will be dispatched to the "sync" queue. + * Queueable jobs will be dispatched to the "sync" queue. * * @param mixed $command *...
true
Other
laravel
framework
97fe4a1a7cb8dd8982a2c8af98154dd030fe6c95.json
Add dispatch_sync helper (#36835)
src/Illuminate/Contracts/Bus/Dispatcher.php
@@ -15,7 +15,7 @@ public function dispatch($command); /** * Dispatch a command to its appropriate handler in the current process. * - * Queuable jobs will be dispatched to the "sync" queue. + * Queueable jobs will be dispatched to the "sync" queue. * * @param mixed $command ...
true
Other
laravel
framework
97fe4a1a7cb8dd8982a2c8af98154dd030fe6c95.json
Add dispatch_sync helper (#36835)
src/Illuminate/Foundation/Bus/Dispatchable.php
@@ -48,7 +48,7 @@ public static function dispatchUnless($boolean, ...$arguments) /** * Dispatch a command to its appropriate handler in the current process. * - * Queuable jobs will be dispatched to the "sync" queue. + * Queueable jobs will be dispatched to the "sync" queue. * * @re...
true
Other
laravel
framework
97fe4a1a7cb8dd8982a2c8af98154dd030fe6c95.json
Add dispatch_sync helper (#36835)
src/Illuminate/Foundation/helpers.php
@@ -390,6 +390,22 @@ function dispatch($job) } } +if (! function_exists('dispatch_sync')) { + /** + * Dispatch a command to its appropriate handler in the current process. + * + * Queueable jobs will be dispatched to the "sync" queue. + * + * @param mixed $job + * @param mixed $ha...
true
Other
laravel
framework
97fe4a1a7cb8dd8982a2c8af98154dd030fe6c95.json
Add dispatch_sync helper (#36835)
src/Illuminate/Support/Testing/Fakes/BusFake.php
@@ -435,7 +435,7 @@ public function dispatch($command) /** * Dispatch a command to its appropriate handler in the current process. * - * Queuable jobs will be dispatched to the "sync" queue. + * Queueable jobs will be dispatched to the "sync" queue. * * @param mixed $command ...
true
Other
laravel
framework
0ac05201b7b06e368c4336ac5760d76d28da3e55.json
Implement proper return types (#36836)
src/Illuminate/Cache/RedisTaggedCache.php
@@ -10,6 +10,7 @@ class RedisTaggedCache extends TaggedCache * @var string */ const REFERENCE_KEY_FOREVER = 'forever_ref'; + /** * Standard reference key. * @@ -41,27 +42,27 @@ public function put($key, $value, $ttl = null) * * @param string $key * @param mixed $v...
true
Other
laravel
framework
0ac05201b7b06e368c4336ac5760d76d28da3e55.json
Implement proper return types (#36836)
src/Illuminate/Cache/TaggedCache.php
@@ -52,7 +52,7 @@ public function putMany(array $values, $ttl = null) * * @param string $key * @param mixed $value - * @return void + * @return int|bool */ public function increment($key, $value = 1) { @@ -64,7 +64,7 @@ public function increment($key, $value = 1) * ...
true
Other
laravel
framework
006ba38124df6a8a651546a0301d604665b394b7.json
Use qualified column names in pivot query (#36720) Co-authored-by: Menzo Wijmenga <menzo@vdlp.nl>
src/Illuminate/Database/Eloquent/Relations/Concerns/InteractsWithPivotTable.php
@@ -429,7 +429,7 @@ public function detach($ids = null, $touch = true) return 0; } - $query->whereIn($this->relatedPivotKey, (array) $ids); + $query->whereIn($this->getQualifiedRelatedPivotKeyName(), (array) $ids); } // On...
true
Other
laravel
framework
006ba38124df6a8a651546a0301d604665b394b7.json
Use qualified column names in pivot query (#36720) Co-authored-by: Menzo Wijmenga <menzo@vdlp.nl>
tests/Database/DatabaseEloquentMorphToManyTest.php
@@ -47,9 +47,9 @@ public function testDetachRemovesPivotTableRecord() $relation = $this->getMockBuilder(MorphToMany::class)->setMethods(['touchIfTouching'])->setConstructorArgs($this->getRelationArguments())->getMock(); $query = m::mock(stdClass::class); $query->shouldReceive('from')->once()-...
true
Other
laravel
framework
76762f90e510c4cb74ed3907b8c26350e1c26ece.json
add age option to flush failed jobs command
src/Illuminate/Queue/Console/FlushFailedCommand.php
@@ -11,7 +11,7 @@ class FlushFailedCommand extends Command * * @var string */ - protected $name = 'queue:flush'; + protected $signature = 'queue:flush {--age= : Only clear failed jobs older than the given age in days}'; /** * The name of the console command. @@ -36,7 +36,13 @@ class...
true
Other
laravel
framework
76762f90e510c4cb74ed3907b8c26350e1c26ece.json
add age option to flush failed jobs command
src/Illuminate/Queue/Failed/DatabaseFailedJobProvider.php
@@ -98,11 +98,14 @@ public function forget($id) /** * Flush all of the failed jobs from storage. * + * @param int|null $age * @return void */ - public function flush() + public function flush($age = null) { - $this->getTable()->delete(); + $this->getTable()->w...
true
Other
laravel
framework
76762f90e510c4cb74ed3907b8c26350e1c26ece.json
add age option to flush failed jobs command
src/Illuminate/Queue/Failed/DatabaseUuidFailedJobProvider.php
@@ -111,11 +111,14 @@ public function forget($id) /** * Flush all of the failed jobs from storage. * + * @param int|null $age * @return void */ - public function flush() + public function flush($age = null) { - $this->getTable()->delete(); + $this->getTable()-...
true
Other
laravel
framework
76762f90e510c4cb74ed3907b8c26350e1c26ece.json
add age option to flush failed jobs command
src/Illuminate/Queue/Failed/DynamoDbFailedJobProvider.php
@@ -165,11 +165,12 @@ public function forget($id) /** * Flush all of the failed jobs from storage. * + * @param int|null $age * @return void * * @throws \Exception */ - public function flush() + public function flush($age = null) { throw new Exception("...
true
Other
laravel
framework
76762f90e510c4cb74ed3907b8c26350e1c26ece.json
add age option to flush failed jobs command
src/Illuminate/Queue/Failed/FailedJobProviderInterface.php
@@ -41,7 +41,8 @@ public function forget($id); /** * Flush all of the failed jobs from storage. * + * @param int|null $age * @return void */ - public function flush(); + public function flush($age = null); }
true
Other
laravel
framework
76762f90e510c4cb74ed3907b8c26350e1c26ece.json
add age option to flush failed jobs command
src/Illuminate/Queue/Failed/NullFailedJobProvider.php
@@ -53,9 +53,10 @@ public function forget($id) /** * Flush all of the failed jobs from storage. * + * @param int|null $age * @return void */ - public function flush() + public function flush($age = null) { // }
true
Other
laravel
framework
76762f90e510c4cb74ed3907b8c26350e1c26ece.json
add age option to flush failed jobs command
tests/Queue/DatabaseFailedJobProviderTest.php
@@ -0,0 +1,42 @@ +<?php + +namespace Illuminate\Tests\Queue; + +use Illuminate\Database\Capsule\Manager as DB; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Queue\Failed\DatabaseFailedJobProvider; +use Illuminate\Support\Facades\Date; +use PHPUnit\Framework\TestCase; + +class DatabaseFailedJobProviderTest ...
true
Other
laravel
framework
c04fa172ab4488f297549aa8618b066835b78d26.json
Remove useless loop (#36722)
src/Illuminate/Support/Str.php
@@ -568,11 +568,9 @@ public static function replaceLast($search, $replace, $subject) */ public static function remove($search, $subject, $caseSensitive = true) { - foreach (Arr::wrap($search) as $s) { - $subject = $caseSensitive - ? str_replace($search, '', $subj...
false
Other
laravel
framework
0de4d79afd6f287028d7914d5dc4eeb26f89f2ff.json
Add prohibited validation rule (#36667)
src/Illuminate/Validation/Concerns/ValidatesAttributes.php
@@ -1434,6 +1434,19 @@ public function validateRequiredIf($attribute, $value, $parameters) return true; } + /** + * Validate that an attribute does not exist. + * + * @param string $attribute + * @param mixed $value + * @param mixed $parameters + * @return bool + */ ...
true
Other
laravel
framework
0de4d79afd6f287028d7914d5dc4eeb26f89f2ff.json
Add prohibited validation rule (#36667)
src/Illuminate/Validation/Validator.php
@@ -227,6 +227,7 @@ class Validator implements ValidatorContract 'RequiredWithAll', 'RequiredWithout', 'RequiredWithoutAll', + 'Prohibited', 'ProhibitedIf', 'ProhibitedUnless', 'Same',
true
Other
laravel
framework
0de4d79afd6f287028d7914d5dc4eeb26f89f2ff.json
Add prohibited validation rule (#36667)
tests/Validation/ValidationValidatorTest.php
@@ -1190,6 +1190,36 @@ public function testRequiredUnless() $this->assertSame('The last field is required unless first is in taylor, sven.', $v->messages()->first('last')); } + public function testProhibited() + { + $trans = $this->getIlluminateArrayTranslator(); + + $v = new Validat...
true
Other
laravel
framework
9522b1f18491c17f31c0aa57a3032364f5cf4216.json
Use proper tests assertions (#36653)
tests/Bus/BusBatchTest.php
@@ -113,7 +113,7 @@ public function test_jobs_can_be_added_to_the_batch() $this->assertEquals(3, $batch->totalJobs); $this->assertEquals(3, $batch->pendingJobs); - $this->assertTrue(is_string($job->batchId)); + $this->assertIsString($job->batchId); $this->assertInstanceOf(Carb...
true
Other
laravel
framework
9522b1f18491c17f31c0aa57a3032364f5cf4216.json
Use proper tests assertions (#36653)
tests/Database/DatabaseEloquentIntegrationTest.php
@@ -811,12 +811,12 @@ public function testBelongsToManyRelationshipModelsAreProperlyHydratedWithSoleQu $user->friends()->create(['email' => 'abigailotwell@gmail.com']); $user->friends()->get()->each(function ($friend) { - $this->assertTrue($friend->pivot instanceof EloquentTestFriendPivot...
true
Other
laravel
framework
9522b1f18491c17f31c0aa57a3032364f5cf4216.json
Use proper tests assertions (#36653)
tests/Http/HttpRequestTest.php
@@ -1024,7 +1024,7 @@ public function testMagicMethods() // Parameter 'foo' is 'bar', then it ISSET and is NOT EMPTY. $this->assertSame('bar', $request->foo); $this->assertTrue(isset($request->foo)); - $this->assertFalse(empty($request->foo)); + $this->assertNotEmpty($request->f...
true
Other
laravel
framework
9522b1f18491c17f31c0aa57a3032364f5cf4216.json
Use proper tests assertions (#36653)
tests/Integration/Database/DatabaseEloquentModelCustomCastingTest.php
@@ -106,7 +106,7 @@ public function testBasicCustomCasting() $model = new TestEloquentModelWithCustomCast; $model->birthday_at = now(); - $this->assertTrue(is_string($model->toArray()['birthday_at'])); + $this->assertIsString($model->toArray()['birthday_at']); } public func...
true
Other
laravel
framework
9522b1f18491c17f31c0aa57a3032364f5cf4216.json
Use proper tests assertions (#36653)
tests/Integration/Database/DatabaseSchemaBuilderAlterTableWithEnumTest.php
@@ -4,6 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; +use stdClass; class DatabaseSchemaBuilderAlterTableWithEnumTest extends DatabaseMySqlTestCase { @@ -30,7 +31,7 @@ public function testGetAllTablesAndColumnListing() $tables = Schema::getAllTables(); ...
true
Other
laravel
framework
9522b1f18491c17f31c0aa57a3032364f5cf4216.json
Use proper tests assertions (#36653)
tests/Integration/Http/ResourceTest.php
@@ -781,7 +781,7 @@ public function testCollectionResourcesAreCountable() $collection = new PostCollectionResource($posts); $this->assertCount(2, $collection); - $this->assertSame(2, count($collection)); + $this->assertCount(2, $collection); } public function testKeysArePre...
true
Other
laravel
framework
9522b1f18491c17f31c0aa57a3032364f5cf4216.json
Use proper tests assertions (#36653)
tests/Validation/ValidationAddFailureTest.php
@@ -25,7 +25,7 @@ public function testAddFailureExists() $validator = $this->makeValidator(); $method_name = 'addFailure'; $this->assertTrue(method_exists($validator, $method_name)); - $this->assertTrue(is_callable([$validator, $method_name])); + $this->assertIsCallable([$valida...
true
Other
laravel
framework
9522b1f18491c17f31c0aa57a3032364f5cf4216.json
Use proper tests assertions (#36653)
tests/Validation/ValidationValidatorTest.php
@@ -5238,7 +5238,7 @@ public function message() ); $this->assertFalse($v->passes()); - $this->assertTrue(is_array($v->failed()['foo.foo.bar'])); + $this->assertIsArray($v->failed()['foo.foo.bar']); } public function testImplicitCustomValidationObjects()
true
Other
laravel
framework
74c9365845225459349b76e759ad64daba1ddf45.json
Remove empty constructor braces. (#36661)
src/Illuminate/Collections/LazyCollection.php
@@ -1071,7 +1071,7 @@ public function chunkWhile(callable $callback) return new static(function () use ($callback) { $iterator = $this->getIterator(); - $chunk = new Collection(); + $chunk = new Collection; if ($iterator->valid()) { $chunk[$i...
true
Other
laravel
framework
74c9365845225459349b76e759ad64daba1ddf45.json
Remove empty constructor braces. (#36661)
src/Illuminate/Foundation/Providers/ArtisanServiceProvider.php
@@ -466,7 +466,7 @@ protected function registerEventClearCommand() protected function registerEventListCommand() { $this->app->singleton('command.event.list', function () { - return new EventListCommand(); + return new EventListCommand; }); }
true
Other
laravel
framework
74c9365845225459349b76e759ad64daba1ddf45.json
Remove empty constructor braces. (#36661)
src/Illuminate/Http/Testing/MimeType.php
@@ -22,7 +22,7 @@ class MimeType public static function getMimeTypes() { if (self::$mime === null) { - self::$mime = new MimeTypes(); + self::$mime = new MimeTypes; } return self::$mime;
true
Other
laravel
framework
74c9365845225459349b76e759ad64daba1ddf45.json
Remove empty constructor braces. (#36661)
src/Illuminate/Mail/MailManager.php
@@ -335,7 +335,7 @@ protected function createPostmarkTransport(array $config) $config['token'] ?? $this->app['config']->get('services.postmark.token'), $headers ), function ($transport) { - $transport->registerPlugin(new ThrowExceptionOnFailurePlugin()); + $trans...
true
Other
laravel
framework
74c9365845225459349b76e759ad64daba1ddf45.json
Remove empty constructor braces. (#36661)
src/Illuminate/Support/Str.php
@@ -779,7 +779,7 @@ public static function orderedUuid() return call_user_func(static::$uuidFactory); } - $factory = new UuidFactory(); + $factory = new UuidFactory; $factory->setRandomGenerator(new CombGenerator( $factory->getRandomGenerator(),
true
Other
laravel
framework
74c9365845225459349b76e759ad64daba1ddf45.json
Remove empty constructor braces. (#36661)
src/Illuminate/Validation/Concerns/ValidatesAttributes.php
@@ -617,23 +617,23 @@ public function validateEmail($attribute, $value, $parameters) ->unique() ->map(function ($validation) { if ($validation === 'rfc') { - return new RFCValidation(); + return new RFCValidation; } elseif...
true
Other
laravel
framework
74c9365845225459349b76e759ad64daba1ddf45.json
Remove empty constructor braces. (#36661)
tests/Broadcasting/UsePusherChannelsNamesTest.php
@@ -13,7 +13,7 @@ class UsePusherChannelsNamesTest extends TestCase */ public function testChannelNameNormalization($requestChannelName, $normalizedName) { - $broadcaster = new FakeBroadcasterUsingPusherChannelsNames(); + $broadcaster = new FakeBroadcasterUsingPusherChannelsNames; ...
true
Other
laravel
framework
74c9365845225459349b76e759ad64daba1ddf45.json
Remove empty constructor braces. (#36661)
tests/Bus/BusBatchTest.php
@@ -310,11 +310,11 @@ public function test_chain_can_be_added_to_batch() $batch = $this->createTestBatch($queue); - $chainHeadJob = new ChainHeadJob(); + $chainHeadJob = new ChainHeadJob; - $secondJob = new SecondTestJob(); + $secondJob = new SecondTestJob; - $thirdJo...
true
Other
laravel
framework
74c9365845225459349b76e759ad64daba1ddf45.json
Remove empty constructor braces. (#36661)
tests/Cache/CacheManagerTest.php
@@ -39,7 +39,7 @@ public function testForgetDriver() $cacheManager->shouldReceive('resolve') ->withArgs(['array']) ->times(4) - ->andReturn(new ArrayStore()); + ->andReturn(new ArrayStore); $cacheManager->shouldReceive('getDefaultDriver') ...
true
Other
laravel
framework
74c9365845225459349b76e759ad64daba1ddf45.json
Remove empty constructor braces. (#36661)
tests/Console/CommandTest.php
@@ -33,7 +33,7 @@ public function handle() $command->setLaravel($application); $input = new ArrayInput([]); - $output = new NullOutput(); + $output = new NullOutput; $application->shouldReceive('make')->with(OutputStyle::class, ['input' => $input, 'output' => $output])->andRet...
true
Other
laravel
framework
74c9365845225459349b76e759ad64daba1ddf45.json
Remove empty constructor braces. (#36661)
tests/Container/ContainerTaggingTest.php
@@ -48,7 +48,7 @@ public function testContainerTags() public function testTaggedServicesAreLazyLoaded() { $container = $this->createPartialMock(Container::class, ['make']); - $container->expects($this->once())->method('make')->willReturn(new ContainerImplementationTaggedStub()); + $cont...
true
Other
laravel
framework
74c9365845225459349b76e759ad64daba1ddf45.json
Remove empty constructor braces. (#36661)
tests/Container/ContainerTest.php
@@ -127,7 +127,7 @@ public function testBindFailsLoudlyWithInvalidArgument() $this->expectException(TypeError::class); $container = new Container; - $concrete = new ContainerConcreteStub(); + $concrete = new ContainerConcreteStub; $container->bind(ContainerConcreteStub::class,...
true
Other
laravel
framework
74c9365845225459349b76e759ad64daba1ddf45.json
Remove empty constructor braces. (#36661)
tests/Container/ResolvingCallbackTest.php
@@ -303,7 +303,7 @@ public function testResolvingCallbacksAreCallWhenRebindHappenForResolvedAbstract $this->assertEquals(3, $callCounter); $container->bind(ResolvingContractStub::class, function () { - return new ResolvingImplementationStubTwo(); + return new ResolvingImplement...
true
Other
laravel
framework
74c9365845225459349b76e759ad64daba1ddf45.json
Remove empty constructor braces. (#36661)
tests/Cookie/Middleware/AddQueuedCookiesToResponseTest.php
@@ -13,14 +13,14 @@ class AddQueuedCookiesToResponseTest extends TestCase { public function testHandle(): void { - $cookieJar = new CookieJar(); + $cookieJar = new CookieJar; $cookieOne = $cookieJar->make('foo', 'bar', 0, '/path'); $cookieTwo = $cookieJar->make('foo', 'rab', 0...
true
Other
laravel
framework
74c9365845225459349b76e759ad64daba1ddf45.json
Remove empty constructor braces. (#36661)
tests/Database/DatabaseEloquentBuilderTest.php
@@ -660,7 +660,7 @@ public function testQueryPassThru() $this->assertSame('foo', $builder->raw('bar')); $builder = $this->getBuilder(); - $grammar = new Grammar(); + $grammar = new Grammar; $builder->getQuery()->shouldReceive('getGrammar')->once()->andReturn($grammar); ...
true
Other
laravel
framework
74c9365845225459349b76e759ad64daba1ddf45.json
Remove empty constructor braces. (#36661)
tests/Database/DatabaseEloquentCollectionTest.php
@@ -278,10 +278,10 @@ public function testCollectionDiffsWithGivenCollection() public function testCollectionReturnsDuplicateBasedOnlyOnKeys() { - $one = new TestEloquentCollectionModel(); - $two = new TestEloquentCollectionModel(); - $three = new TestEloquentCollectionModel(); - ...
true
Other
laravel
framework
74c9365845225459349b76e759ad64daba1ddf45.json
Remove empty constructor braces. (#36661)
tests/Database/DatabaseEloquentIrregularPluralTest.php
@@ -70,7 +70,7 @@ protected function schema() /** @test */ public function itPluralizesTheTableName() { - $model = new IrregularPluralHuman(); + $model = new IrregularPluralHuman; $this->assertSame('irregular_plural_humans', $model->getTable()); }
true
Other
laravel
framework
74c9365845225459349b76e759ad64daba1ddf45.json
Remove empty constructor braces. (#36661)
tests/Database/DatabaseEloquentModelTest.php
@@ -72,7 +72,7 @@ public function testAttributeManipulation() public function testSetAttributeWithNumericKey() { - $model = new EloquentDateModelStub(); + $model = new EloquentDateModelStub; $model->setAttribute(0, 'value'); $this->assertEquals([0 => 'value'], $model->getAt...
true
Other
laravel
framework
74c9365845225459349b76e759ad64daba1ddf45.json
Remove empty constructor braces. (#36661)
tests/Database/DatabaseEloquentPivotTest.php
@@ -156,7 +156,7 @@ public function testPivotModelWithoutParentReturnsModelTimestampColumns() public function testWithoutRelations() { - $original = new Pivot(); + $original = new Pivot; $original->pivotParent = 'foo'; $original->setRelation('bar', 'baz');
true
Other
laravel
framework
74c9365845225459349b76e759ad64daba1ddf45.json
Remove empty constructor braces. (#36661)
tests/Database/DatabaseMigrationRefreshCommandTest.php
@@ -24,7 +24,7 @@ protected function tearDown(): void public function testRefreshCommandCallsCommandsWithProperArguments() { - $command = new RefreshCommand(); + $command = new RefreshCommand; $app = new ApplicationDatabaseRefreshStub(['path.database' => __DIR__]); $dispatc...
true
Other
laravel
framework
74c9365845225459349b76e759ad64daba1ddf45.json
Remove empty constructor braces. (#36661)
tests/Database/DatabaseMySqlBuilderTest.php
@@ -17,7 +17,7 @@ protected function tearDown(): void public function testCreateDatabase() { - $grammar = new MySqlGrammar(); + $grammar = new MySqlGrammar; $connection = m::mock(Connection::class); $connection->shouldReceive('getConfig')->once()->with('charset')->andReturn...
true
Other
laravel
framework
74c9365845225459349b76e759ad64daba1ddf45.json
Remove empty constructor braces. (#36661)
tests/Database/DatabasePostgresBuilderTest.php
@@ -17,7 +17,7 @@ protected function tearDown(): void public function testCreateDatabase() { - $grammar = new PostgresGrammar(); + $grammar = new PostgresGrammar; $connection = m::mock(Connection::class); $connection->shouldReceive('getConfig')->once()->with('charset')->and...
true
Other
laravel
framework
74c9365845225459349b76e759ad64daba1ddf45.json
Remove empty constructor braces. (#36661)
tests/Database/DatabaseQueryBuilderTest.php
@@ -1976,7 +1976,7 @@ public function testExistsOr() $builder = $this->getBuilder(); $builder->getConnection()->shouldReceive('select')->andReturn([['exists' => 0]]); $results = $builder->from('users')->doesntExistOr(function () { - throw new RuntimeException(); + throw ...
true
Other
laravel
framework
74c9365845225459349b76e759ad64daba1ddf45.json
Remove empty constructor braces. (#36661)
tests/Database/DatabaseSQLiteBuilderTest.php
@@ -15,7 +15,7 @@ class DatabaseSQLiteBuilderTest extends TestCase { protected function setUp(): void { - $app = new Container(); + $app = new Container; Container::setInstance($app) ->singleton('files', Filesystem::class);
true
Other
laravel
framework
74c9365845225459349b76e759ad64daba1ddf45.json
Remove empty constructor braces. (#36661)
tests/Database/DatabaseSchemaBlueprintIntegrationTest.php
@@ -169,7 +169,7 @@ public function testAddUniqueIndexWithoutNameWorks() $table->string('name')->nullable()->unique()->change(); }); - $queries = $blueprintMySql->toSql($this->db->connection(), new MySqlGrammar()); + $queries = $blueprintMySql->toSql($this->db->connection(), new My...
true
Other
laravel
framework
74c9365845225459349b76e759ad64daba1ddf45.json
Remove empty constructor braces. (#36661)
tests/Database/DatabaseTransactionsManagerTest.php
@@ -9,7 +9,7 @@ class DatabaseTransactionsManagerTest extends TestCase { public function testBeginningTransactions() { - $manager = (new DatabaseTransactionsManager()); + $manager = (new DatabaseTransactionsManager); $manager->begin('default', 1); $manager->begin('default', ...
true
Other
laravel
framework
74c9365845225459349b76e759ad64daba1ddf45.json
Remove empty constructor braces. (#36661)
tests/Database/DatabaseTransactionsTest.php
@@ -62,7 +62,7 @@ protected function tearDown(): void public function testTransactionIsRecordedAndCommitted() { - $transactionManager = m::mock(new DatabaseTransactionsManager()); + $transactionManager = m::mock(new DatabaseTransactionsManager); $transactionManager->shouldReceive('beg...
true
Other
laravel
framework
74c9365845225459349b76e759ad64daba1ddf45.json
Remove empty constructor braces. (#36661)
tests/Database/SqlServerBuilderTest.php
@@ -17,7 +17,7 @@ protected function tearDown(): void public function testCreateDatabase() { - $grammar = new SqlServerGrammar(); + $grammar = new SqlServerGrammar; $connection = m::mock(Connection::class); $connection->shouldReceive('getSchemaGrammar')->once()->andReturn($...
true
Other
laravel
framework
74c9365845225459349b76e759ad64daba1ddf45.json
Remove empty constructor braces. (#36661)
tests/Events/EventsSubscriberTest.php
@@ -27,7 +27,7 @@ public function testEventSubscribers() public function testEventSubscribeCanAcceptObject() { - $d = new Dispatcher(); + $d = new Dispatcher; $subs = m::mock(ExampleSubscriber::class); $subs->shouldReceive('subscribe')->once()->with($d); @@ -37,7 +37,7 @@ p...
true
Other
laravel
framework
74c9365845225459349b76e759ad64daba1ddf45.json
Remove empty constructor braces. (#36661)
tests/Events/QueuedEventsTest.php
@@ -39,7 +39,7 @@ public function testCustomizedQueuedEventHandlersAreQueued() { $d = new Dispatcher; - $fakeQueue = new QueueFake(new Container()); + $fakeQueue = new QueueFake(new Container); $d->setQueueResolver(function () use ($fakeQueue) { return $fakeQueue; @...
true
Other
laravel
framework
74c9365845225459349b76e759ad64daba1ddf45.json
Remove empty constructor braces. (#36661)
tests/Foundation/FoundationApplicationTest.php
@@ -430,7 +430,7 @@ public function testEnvPathsAreUsedAndMadeAbsoluteForCachePathsWhenSpecifiedAsRe public function testEnvPathsAreUsedAndMadeAbsoluteForCachePathsWhenSpecifiedAsRelativeWithNullBasePath() { - $app = new Application(); + $app = new Application; $_SERVER['APP_SERVICES_...
true
Other
laravel
framework
74c9365845225459349b76e759ad64daba1ddf45.json
Remove empty constructor braces. (#36661)
tests/Foundation/FoundationExceptionsHandlerTest.php
@@ -150,7 +150,7 @@ public function testReturnsCustomResponseFromRenderableCallback() public function testReturnsCustomResponseFromCallableClass() { - $this->handler->renderable(new CustomRenderer()); + $this->handler->renderable(new CustomRenderer); $response = $this->handler->rend...
true
Other
laravel
framework
74c9365845225459349b76e759ad64daba1ddf45.json
Remove empty constructor braces. (#36661)
tests/Foundation/Http/Middleware/ConvertEmptyStringsToNullTest.php
@@ -11,7 +11,7 @@ class ConvertEmptyStringsToNullTest extends TestCase { public function testConvertsEmptyStringsToNull() { - $middleware = new ConvertEmptyStringsToNull(); + $middleware = new ConvertEmptyStringsToNull; $symfonyRequest = new SymfonyRequest([ 'foo' => 'bar'...
true
Other
laravel
framework
74c9365845225459349b76e759ad64daba1ddf45.json
Remove empty constructor braces. (#36661)
tests/Foundation/Http/Middleware/TrimStringsTest.php
@@ -11,7 +11,7 @@ class TrimStringsTest extends TestCase { public function testTrimStringsIgnoringExceptAttribute() { - $middleware = new TrimStringsWithExceptAttribute(); + $middleware = new TrimStringsWithExceptAttribute; $symfonyRequest = new SymfonyRequest([ 'abc' => '...
true
Other
laravel
framework
74c9365845225459349b76e759ad64daba1ddf45.json
Remove empty constructor braces. (#36661)
tests/Foundation/Testing/Concerns/InteractsWithContainerTest.php
@@ -18,7 +18,7 @@ public function testWithoutMixBindsEmptyHandlerAndReturnsInstance() public function testWithMixRestoresOriginalHandlerAndReturnsInstance() { - $handler = new stdClass(); + $handler = new stdClass; $this->app->instance(Mix::class, $handler); $this->withoutM...
true
Other
laravel
framework
74c9365845225459349b76e759ad64daba1ddf45.json
Remove empty constructor braces. (#36661)
tests/Integration/Auth/AuthenticationTest.php
@@ -313,7 +313,7 @@ public function testDispatcherChangesIfThereIsOneOnTheCustomAuthGuard() ]; Auth::extend('myCustomDriver', function () { - return new MyCustomGuardStub(); + return new MyCustomGuardStub; }); $this->assertInstanceOf(MyCustomGuardStub::class...
true
Other
laravel
framework
74c9365845225459349b76e759ad64daba1ddf45.json
Remove empty constructor braces. (#36661)
tests/Integration/Database/DatabaseEloquentModelCustomCastingTest.php
@@ -447,7 +447,7 @@ class ValueObjectWithCasterInstance extends ValueObject { public static function castUsing(array $arguments) { - return new ValueObjectCaster(); + return new ValueObjectCaster; } }
true
Other
laravel
framework
74c9365845225459349b76e759ad64daba1ddf45.json
Remove empty constructor braces. (#36661)
tests/Integration/Database/EloquentBelongsToManyTest.php
@@ -349,7 +349,7 @@ public function testFindMethod() $this->assertEquals($tag2->name, $post->tags()->find($tag2->id)->name); $this->assertCount(0, $post->tags()->findMany([])); $this->assertCount(2, $post->tags()->findMany([$tag->id, $tag2->id])); - $this->assertCount(0, $post->tags()-...
true
Other
laravel
framework
74c9365845225459349b76e759ad64daba1ddf45.json
Remove empty constructor braces. (#36661)
tests/Integration/Database/EloquentBelongsToTest.php
@@ -96,7 +96,7 @@ public function testParentIsModel() public function testParentIsNotAnotherModel() { $child = User::has('parent')->first(); - $parent = new User(); + $parent = new User; $parent->id = 3; $this->assertFalse($child->parent()->is($parent));
true
Other
laravel
framework
74c9365845225459349b76e759ad64daba1ddf45.json
Remove empty constructor braces. (#36661)
tests/Integration/Database/EloquentHasOneIsTest.php
@@ -51,7 +51,7 @@ public function testChildIsModel() public function testChildIsNotAnotherModel() { $parent = Post::first(); - $child = new Attachment(); + $child = new Attachment; $child->id = 2; $this->assertFalse($parent->attachment()->is($child));
true
Other
laravel
framework
74c9365845225459349b76e759ad64daba1ddf45.json
Remove empty constructor braces. (#36661)
tests/Integration/Database/EloquentModelEncryptedCastingTest.php
@@ -131,7 +131,7 @@ public function testJsonAttributeIsCastable() public function testObjectIsCastable() { - $object = new stdClass(); + $object = new stdClass; $object->key1 = 'value1'; $this->encrypter->expects('encrypt')
true
Other
laravel
framework
74c9365845225459349b76e759ad64daba1ddf45.json
Remove empty constructor braces. (#36661)
tests/Integration/Database/EloquentModelJsonCastingTest.php
@@ -52,7 +52,7 @@ public function testArraysAreCastable() public function testObjectsAreCastable() { - $object = new stdClass(); + $object = new stdClass; $object->key1 = 'value1'; /** @var \Illuminate\Tests\Integration\Database\EloquentModelJsonCastingTest\JsonCast $user *...
true
Other
laravel
framework
74c9365845225459349b76e759ad64daba1ddf45.json
Remove empty constructor braces. (#36661)
tests/Integration/Database/EloquentModelRefreshTest.php
@@ -100,7 +100,7 @@ class AsPivotPost extends Post public function children() { return $this - ->belongsToMany(static::class, (new AsPivotPostPivot())->getTable(), 'foreign_id', 'related_id') + ->belongsToMany(static::class, (new AsPivotPostPivot)->getTable(), 'foreign_id', 'rel...
true
Other
laravel
framework
74c9365845225459349b76e759ad64daba1ddf45.json
Remove empty constructor braces. (#36661)
tests/Integration/Database/EloquentMorphOneIsTest.php
@@ -52,7 +52,7 @@ public function testChildIsModel() public function testChildIsNotAnotherModel() { $parent = Post::first(); - $child = new Attachment(); + $child = new Attachment; $child->id = 2; $this->assertFalse($parent->attachment()->is($child));
true
Other
laravel
framework
74c9365845225459349b76e759ad64daba1ddf45.json
Remove empty constructor braces. (#36661)
tests/Integration/Database/EloquentMorphToIsTest.php
@@ -52,7 +52,7 @@ public function testParentIsModel() public function testParentIsNotAnotherModel() { $child = Comment::first(); - $parent = new Post(); + $parent = new Post; $parent->id = 2; $this->assertFalse($child->commentable()->is($parent));
true
Other
laravel
framework
74c9365845225459349b76e759ad64daba1ddf45.json
Remove empty constructor braces. (#36661)
tests/Integration/Database/EloquentRelationshipsTest.php
@@ -56,11 +56,11 @@ public function testOverriddenRelationships() public function testAlwaysUnsetBelongsToRelationWhenReceivedModelId() { // create users - $user1 = (new FakeRelationship())->forceFill(['id' => 1]); - $user2 = (new FakeRelationship())->forceFill(['id' => 2]); + $u...
true
Other
laravel
framework
74c9365845225459349b76e759ad64daba1ddf45.json
Remove empty constructor braces. (#36661)
tests/Integration/Database/SchemaBuilderTest.php
@@ -61,9 +61,9 @@ public function testRegisterCustomDoctrineType() 'DROP TABLE __temp__test', ]; - $statements = $blueprint->toSql($this->getConnection(), new SQLiteGrammar()); + $statements = $blueprint->toSql($this->getConnection(), new SQLiteGrammar); - $blueprint->buil...
true
Other
laravel
framework
74c9365845225459349b76e759ad64daba1ddf45.json
Remove empty constructor braces. (#36661)
tests/Integration/Mail/SendingMailWithLocaleTest.php
@@ -67,7 +67,7 @@ public function testMailIsSentWithSelectedLocale() public function testMailIsSentWithLocaleFromMailable() { - $mailable = new TestMail(); + $mailable = new TestMail; $mailable->locale('ar'); Mail::to('test@mail.com')->send($mailable);
true
Other
laravel
framework
74c9365845225459349b76e759ad64daba1ddf45.json
Remove empty constructor braces. (#36661)
tests/Integration/Queue/JobChainingTest.php
@@ -63,8 +63,8 @@ public function testJobsCanBeChainedOnSuccessUsingPendingChain() public function testJobsCanBeChainedOnSuccessUsingBusFacade() { Bus::dispatchChain([ - new JobChainingTestFirstJob(), - new JobChainingTestSecondJob(), + new JobChainingTestFirstJob, + ...
true
Other
laravel
framework
74c9365845225459349b76e759ad64daba1ddf45.json
Remove empty constructor braces. (#36661)
tests/Integration/Queue/WorkCommandTest.php
@@ -119,7 +119,7 @@ public function testMaxJobsExceeded() public function testMaxTimeExceeded() { - Queue::connection('database')->push(new ThirdJob()); + Queue::connection('database')->push(new ThirdJob); Queue::connection('database')->push(new FirstJob); Queue::connection('...
true
Other
laravel
framework
74c9365845225459349b76e759ad64daba1ddf45.json
Remove empty constructor braces. (#36661)
tests/Mail/MailLogTransportTest.php
@@ -36,7 +36,7 @@ public function testGetLogTransportWithConfiguredChannel() public function testGetLogTransportWithPsrLogger() { $this->app['config']->set('mail.driver', 'log'); - $logger = $this->app->instance('log', new NullLogger()); + $logger = $this->app->instance('log', new NullL...
true
Other
laravel
framework
74c9365845225459349b76e759ad64daba1ddf45.json
Remove empty constructor braces. (#36661)
tests/Mail/MailSesTransportTest.php
@@ -16,7 +16,7 @@ class MailSesTransportTest extends TestCase /** @group Foo */ public function testGetTransport() { - $container = new Container(); + $container = new Container; $container->singleton('config', function () { return new Repository([
true
Other
laravel
framework
74c9365845225459349b76e759ad64daba1ddf45.json
Remove empty constructor braces. (#36661)
tests/Notifications/NotificationMailMessageTest.php
@@ -141,11 +141,11 @@ public function testWhenCallback() $mailMessage->cc('cc@example.com'); }; - $message = new MailMessage(); + $message = new MailMessage; $message->when(true, $callback); $this->assertSame([['cc@example.com', null]], $message->cc); - $...
true
Other
laravel
framework
74c9365845225459349b76e759ad64daba1ddf45.json
Remove empty constructor braces. (#36661)
tests/Notifications/NotificationSendQueuedNotificationTest.php
@@ -36,15 +36,15 @@ public function testSerializationOfNotifiableModel() $identifier = new ModelIdentifier(NotifiableUser::class, [null], [], null); $serializedIdentifier = serialize($identifier); - $job = new SendQueuedNotifications(new NotifiableUser(), 'notification'); + $job = new ...
true
Other
laravel
framework
74c9365845225459349b76e759ad64daba1ddf45.json
Remove empty constructor braces. (#36661)
tests/Notifications/NotificationSenderTest.php
@@ -33,7 +33,7 @@ public function testItCanSendQueuedNotificationsWithAStringVia() $sender = new NotificationSender($manager, $bus, $events); - $sender->send($notifiable, new DummyQueuedNotificationWithStringVia()); + $sender->send($notifiable, new DummyQueuedNotificationWithStringVia); ...
true
Other
laravel
framework
74c9365845225459349b76e759ad64daba1ddf45.json
Remove empty constructor braces. (#36661)
tests/Redis/ConcurrentLimiterTest.php
@@ -149,7 +149,7 @@ public function testItReleasesIfErrorIsThrown() try { $lock->block(1, function () { - throw new Error(); + throw new Error; }); } catch (Error $e) { }
true
Other
laravel
framework
74c9365845225459349b76e759ad64daba1ddf45.json
Remove empty constructor braces. (#36661)
tests/Redis/RedisManagerExtensionTest.php
@@ -19,7 +19,7 @@ protected function setUp(): void { parent::setUp(); - $this->redis = new RedisManager(new Application(), 'my_custom_driver', [ + $this->redis = new RedisManager(new Application, 'my_custom_driver', [ 'default' => [ 'host' => 'some-host', ...
true