Skip to content

Commit 74c9365

Browse files
author
Lucas Michot
authored
Remove empty constructor braces. (#36661)
1 parent d89b025 commit 74c9365

File tree

64 files changed

+158
-158
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+158
-158
lines changed

src/Illuminate/Collections/LazyCollection.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1071,7 +1071,7 @@ public function chunkWhile(callable $callback)
10711071
return new static(function () use ($callback) {
10721072
$iterator = $this->getIterator();
10731073

1074-
$chunk = new Collection();
1074+
$chunk = new Collection;
10751075

10761076
if ($iterator->valid()) {
10771077
$chunk[$iterator->key()] = $iterator->current();
@@ -1083,7 +1083,7 @@ public function chunkWhile(callable $callback)
10831083
if (! $callback($iterator->current(), $iterator->key(), $chunk)) {
10841084
yield new static($chunk);
10851085

1086-
$chunk = new Collection();
1086+
$chunk = new Collection;
10871087
}
10881088

10891089
$chunk[$iterator->key()] = $iterator->current();

src/Illuminate/Foundation/Providers/ArtisanServiceProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ protected function registerEventClearCommand()
466466
protected function registerEventListCommand()
467467
{
468468
$this->app->singleton('command.event.list', function () {
469-
return new EventListCommand();
469+
return new EventListCommand;
470470
});
471471
}
472472

src/Illuminate/Http/Testing/MimeType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class MimeType
2222
public static function getMimeTypes()
2323
{
2424
if (self::$mime === null) {
25-
self::$mime = new MimeTypes();
25+
self::$mime = new MimeTypes;
2626
}
2727

2828
return self::$mime;

src/Illuminate/Mail/MailManager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ protected function createPostmarkTransport(array $config)
335335
$config['token'] ?? $this->app['config']->get('services.postmark.token'),
336336
$headers
337337
), function ($transport) {
338-
$transport->registerPlugin(new ThrowExceptionOnFailurePlugin());
338+
$transport->registerPlugin(new ThrowExceptionOnFailurePlugin);
339339
});
340340
}
341341

src/Illuminate/Support/Str.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -779,7 +779,7 @@ public static function orderedUuid()
779779
return call_user_func(static::$uuidFactory);
780780
}
781781

782-
$factory = new UuidFactory();
782+
$factory = new UuidFactory;
783783

784784
$factory->setRandomGenerator(new CombGenerator(
785785
$factory->getRandomGenerator(),

src/Illuminate/Validation/Concerns/ValidatesAttributes.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -617,23 +617,23 @@ public function validateEmail($attribute, $value, $parameters)
617617
->unique()
618618
->map(function ($validation) {
619619
if ($validation === 'rfc') {
620-
return new RFCValidation();
620+
return new RFCValidation;
621621
} elseif ($validation === 'strict') {
622-
return new NoRFCWarningsValidation();
622+
return new NoRFCWarningsValidation;
623623
} elseif ($validation === 'dns') {
624-
return new DNSCheckValidation();
624+
return new DNSCheckValidation;
625625
} elseif ($validation === 'spoof') {
626-
return new SpoofCheckValidation();
626+
return new SpoofCheckValidation;
627627
} elseif ($validation === 'filter') {
628-
return new FilterEmailValidation();
628+
return new FilterEmailValidation;
629629
} elseif ($validation === 'filter_unicode') {
630630
return FilterEmailValidation::unicode();
631631
} elseif (is_string($validation) && class_exists($validation)) {
632632
return $this->container->make($validation);
633633
}
634634
})
635635
->values()
636-
->all() ?: [new RFCValidation()];
636+
->all() ?: [new RFCValidation];
637637

638638
return (new EmailValidator)->isValid($value, new MultipleValidationWithAnd($validations));
639639
}

tests/Broadcasting/UsePusherChannelsNamesTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class UsePusherChannelsNamesTest extends TestCase
1313
*/
1414
public function testChannelNameNormalization($requestChannelName, $normalizedName)
1515
{
16-
$broadcaster = new FakeBroadcasterUsingPusherChannelsNames();
16+
$broadcaster = new FakeBroadcasterUsingPusherChannelsNames;
1717

1818
$this->assertSame(
1919
$normalizedName,
@@ -23,7 +23,7 @@ public function testChannelNameNormalization($requestChannelName, $normalizedNam
2323

2424
public function testChannelNameNormalizationSpecialCase()
2525
{
26-
$broadcaster = new FakeBroadcasterUsingPusherChannelsNames();
26+
$broadcaster = new FakeBroadcasterUsingPusherChannelsNames;
2727

2828
$this->assertSame(
2929
'private-123',
@@ -36,7 +36,7 @@ public function testChannelNameNormalizationSpecialCase()
3636
*/
3737
public function testIsGuardedChannel($requestChannelName, $_, $guarded)
3838
{
39-
$broadcaster = new FakeBroadcasterUsingPusherChannelsNames();
39+
$broadcaster = new FakeBroadcasterUsingPusherChannelsNames;
4040

4141
$this->assertSame(
4242
$guarded,

tests/Bus/BusBatchTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -310,11 +310,11 @@ public function test_chain_can_be_added_to_batch()
310310

311311
$batch = $this->createTestBatch($queue);
312312

313-
$chainHeadJob = new ChainHeadJob();
313+
$chainHeadJob = new ChainHeadJob;
314314

315-
$secondJob = new SecondTestJob();
315+
$secondJob = new SecondTestJob;
316316

317-
$thirdJob = new ThirdTestJob();
317+
$thirdJob = new ThirdTestJob;
318318

319319
$queue->shouldReceive('connection')->once()
320320
->with('test-connection')

tests/Cache/CacheManagerTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function testForgetDriver()
3939
$cacheManager->shouldReceive('resolve')
4040
->withArgs(['array'])
4141
->times(4)
42-
->andReturn(new ArrayStore());
42+
->andReturn(new ArrayStore);
4343

4444
$cacheManager->shouldReceive('getDefaultDriver')
4545
->once()
@@ -64,7 +64,7 @@ public function testForgetDriverForgets()
6464
],
6565
]);
6666
$cacheManager->extend('forget', function () {
67-
return new ArrayStore();
67+
return new ArrayStore;
6868
});
6969

7070
$cacheManager->store('forget')->forever('foo', 'bar');

tests/Console/CommandTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function handle()
3333
$command->setLaravel($application);
3434

3535
$input = new ArrayInput([]);
36-
$output = new NullOutput();
36+
$output = new NullOutput;
3737
$application->shouldReceive('make')->with(OutputStyle::class, ['input' => $input, 'output' => $output])->andReturn(m::mock(OutputStyle::class));
3838

3939
$application->shouldReceive('call')->with([$command, 'handle'])->andReturnUsing(function () use ($command, $application) {
@@ -84,7 +84,7 @@ protected function getOptions()
8484
'--option-one' => 'test-first-option',
8585
'--option-two' => 'test-second-option',
8686
]);
87-
$output = new NullOutput();
87+
$output = new NullOutput;
8888

8989
$command->run($input, $output);
9090

0 commit comments

Comments
 (0)