Skip to content

Commit a3c5d91

Browse files
tpetrygithub-actions[bot]
authored andcommitted
style: fix styling
1 parent c2d4c2d commit a3c5d91

File tree

7 files changed

+15
-16
lines changed

7 files changed

+15
-16
lines changed

src/Eloquent/Mixins/BuilderLazyByCursor.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
use Closure;
88
use Generator;
9-
use Illuminate\Database\Eloquent\Model;
109
use Illuminate\Support\LazyCollection;
1110

1211
/** @mixin \Illuminate\Database\Eloquent\Builder */
@@ -19,7 +18,7 @@ public function lazyByCursor(): Closure
1918
return new LazyCollection(function () use ($chunkSize): Generator {
2019
foreach ($this->applyScopes()->getQuery()->lazyByCursor($chunkSize)->chunk($chunkSize) as $items) {
2120
$models = $this->getModel()->hydrate($items->all())->all();
22-
if (count($models) > 0) {
21+
if (\count($models) > 0) {
2322
$models = $this->eagerLoadRelations($models);
2423
}
2524

tests/Eloquent/AutomaticDateFormatTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public function testAutomaticDateFormat(): void
5050

5151
protected function createModel(): Model
5252
{
53-
return new class() extends Model {
53+
return new class extends Model {
5454
use AutomaticDateFormat;
5555

5656
public $table = 'example';

tests/Eloquent/AutomaticDateFormatWithMillisecondsTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public function testAutomaticDateFormatWithMilliseconds(): void
5050

5151
protected function createModel(): Model
5252
{
53-
return new class() extends Model {
53+
return new class extends Model {
5454
use AutomaticDateFormatWithMilliseconds;
5555

5656
public $table = 'example';

tests/Eloquent/IntegerArrayCastTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public function testParseFromDatabaseValue(): void
1818
}
1919

2020
$cast = new IntegerArrayCast();
21-
$model = new class() extends Model { };
21+
$model = new class extends Model { };
2222

2323
$this->assertNull($cast->get($model, 'column', null, []));
2424
$this->assertEquals([], $cast->get($model, 'column', '{}', []));
@@ -33,7 +33,7 @@ public function testTransformToDatabaseValue(): void
3333
}
3434

3535
$cast = new IntegerArrayCast();
36-
$model = new class() extends Model { };
36+
$model = new class extends Model { };
3737

3838
$this->assertNull($cast->get($model, 'column', null, []));
3939

tests/Eloquent/RefreshDataOnSaveTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function testRefreshOnSave(): void
4141

4242
protected function createModel(): Model
4343
{
44-
return new class() extends Model {
44+
return new class extends Model {
4545
use RefreshDataOnSave;
4646

4747
public $table = 'example';

tests/Eloquent/VectorArrayCastTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public function testParseFromDatabaseValue(): void
1818
}
1919

2020
$cast = new VectorArray();
21-
$model = new class() extends Model { };
21+
$model = new class extends Model { };
2222

2323
$this->assertNull($cast->get($model, 'column', null, []));
2424
$this->assertEquals([], $cast->get($model, 'column', '[]', []));
@@ -32,7 +32,7 @@ public function testTransformToDatabaseValue(): void
3232
}
3333

3434
$cast = new VectorArray();
35-
$model = new class() extends Model { };
35+
$model = new class extends Model { };
3636

3737
$this->assertNull($cast->set($model, 'column', null, []));
3838

tests/Migration/ZeroDowntimeMigrationTest.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class ZeroDowntimeMigrationTest extends TestCase
2121
public function testLongRunningApplicationLogicIsCancelled(): void
2222
{
2323
$this->expectException(ZeroDowntimeMigrationTimeoutException::class);
24-
$this->runMigration(fn () => usleep(500_000), new class() extends Migration {
24+
$this->runMigration(fn () => usleep(500_000), new class extends Migration {
2525
use ZeroDowntimeMigration;
2626
public $timeout = 0.4;
2727
});
@@ -33,7 +33,7 @@ public function testLongRunningQueriesAreCancelled(): void
3333
$this->runMigration(function (): void {
3434
$this->app->get('db.connection')->statement("SELECT pg_sleep_for('250 milliseconds')");
3535
$this->app->get('db.connection')->statement("SELECT pg_sleep_for('250 milliseconds')");
36-
}, new class() extends Migration {
36+
}, new class extends Migration {
3737
use ZeroDowntimeMigration;
3838
public float $timeout = 0.4;
3939
});
@@ -42,7 +42,7 @@ public function testLongRunningQueriesAreCancelled(): void
4242
public function testMigrationNeedsToRunInTransaction(): void
4343
{
4444
$this->expectException(RuntimeException::class);
45-
$this->runMigration(fn () => usleep(1000), new class() extends Migration {
45+
$this->runMigration(fn () => usleep(1000), new class extends Migration {
4646
use ZeroDowntimeMigration;
4747
public $timeout = 0.0;
4848
public $withinTransaction = false;
@@ -52,7 +52,7 @@ public function testMigrationNeedsToRunInTransaction(): void
5252
public function testOnlyRunsOnPostgresql(): void
5353
{
5454
$this->expectNotToPerformAssertions();
55-
$this->runMigration(fn () => usleep(1000), new class() extends Migration {
55+
$this->runMigration(fn () => usleep(1000), new class extends Migration {
5656
use ZeroDowntimeMigration;
5757

5858
public $timeout = 0.0;
@@ -63,11 +63,11 @@ public function testOnlyRunsOnPostgresql(): void
6363
public function testTimeoutIsResetForEveryMigration(): void
6464
{
6565
$this->expectNotToPerformAssertions();
66-
$this->runMigration(fn () => usleep(25_000), new class() extends Migration {
66+
$this->runMigration(fn () => usleep(25_000), new class extends Migration {
6767
use ZeroDowntimeMigration;
6868
public $timeout = 0.04;
6969
});
70-
$this->runMigration(fn () => usleep(25_000), new class() extends Migration {
70+
$this->runMigration(fn () => usleep(25_000), new class extends Migration {
7171
use ZeroDowntimeMigration;
7272
public $timeout = 0.04;
7373
});
@@ -76,7 +76,7 @@ public function testTimeoutIsResetForEveryMigration(): void
7676
public function testTraitNeedsToBeUsedToActivate(): void
7777
{
7878
$this->expectNotToPerformAssertions();
79-
$this->runMigration(fn () => usleep(1000), new class() extends Migration {
79+
$this->runMigration(fn () => usleep(1000), new class extends Migration {
8080
public $timeout = 0.0;
8181
});
8282
}

0 commit comments

Comments
 (0)