Skip to content

Commit 5b661de

Browse files
authored
reapply Pint style changes (#55015)
StyleCI reverted all the changes from the previous commit.
1 parent 3e8baf5 commit 5b661de

13 files changed

+38
-19
lines changed

src/Illuminate/Validation/InvokableValidationRule.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ protected function __construct(ValidationRule|InvokableRule $invokable)
6969
public static function make($invokable)
7070
{
7171
if ($invokable->implicit ?? false) {
72-
return new class($invokable) extends InvokableValidationRule implements ImplicitRule {
72+
return new class($invokable) extends InvokableValidationRule implements ImplicitRule
73+
{
7374
};
7475
}
7576

tests/Bus/BusPendingBatchTest.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ public function test_batch_is_deleted_from_storage_if_exception_thrown_during_ba
7171

7272
$container = new Container;
7373

74-
$job = new class {
74+
$job = new class
75+
{
7576
};
7677

7778
$pendingBatch = new PendingBatch($container, new Collection([$job]));
@@ -226,7 +227,8 @@ public function test_batch_before_event_is_called()
226227

227228
public function test_it_throws_exception_if_batched_job_is_not_batchable(): void
228229
{
229-
$nonBatchableJob = new class {
230+
$nonBatchableJob = new class
231+
{
230232
};
231233

232234
$this->expectException(RuntimeException::class);
@@ -242,7 +244,8 @@ public function test_it_throws_an_exception_if_batched_job_contains_batch_with_n
242244
new PendingBatch(
243245
$container,
244246
new Collection(
245-
[new PendingBatch($container, new Collection([new BatchableJob, new class {
247+
[new PendingBatch($container, new Collection([new BatchableJob, new class
248+
{
246249
}]))]
247250
)
248251
);

tests/Database/DatabaseAbstractSchemaGrammarTest.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ protected function tearDown(): void
1717
public function testCreateDatabase()
1818
{
1919
$connection = m::mock(Connection::class);
20-
$grammar = new class($connection) extends Grammar {
20+
$grammar = new class($connection) extends Grammar
21+
{
2122
};
2223

2324
$this->assertSame('create database "foo"', $grammar->compileCreateDatabase('foo'));
@@ -26,7 +27,8 @@ public function testCreateDatabase()
2627
public function testDropDatabaseIfExists()
2728
{
2829
$connection = m::mock(Connection::class);
29-
$grammar = new class($connection) extends Grammar {
30+
$grammar = new class($connection) extends Grammar
31+
{
3032
};
3133

3234
$this->assertSame('drop database if exists "foo"', $grammar->compileDropDatabaseIfExists('foo'));

tests/Database/DatabaseEloquentInverseRelationTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,8 @@ public function testOnlyHydratesInverseRelationOnModels()
288288
[],
289289
new HasInverseRelationRelatedStub(),
290290
'foo',
291-
new class() {
291+
new class()
292+
{
292293
},
293294
new HasInverseRelationRelatedStub(),
294295
]);

tests/Encryption/EncrypterTest.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,10 +248,12 @@ public static function provideTamperedData()
248248

249249
return [
250250
[['iv' => ['value_in_array'], 'value' => '', 'mac' => '']],
251-
[['iv' => new class() {
251+
[['iv' => new class()
252+
{
252253
}, 'value' => '', 'mac' => '']],
253254
[['iv' => $validIv, 'value' => ['value_in_array'], 'mac' => '']],
254-
[['iv' => $validIv, 'value' => new class() {
255+
[['iv' => $validIv, 'value' => new class()
256+
{
255257
}, 'mac' => '']],
256258
[['iv' => $validIv, 'value' => '', 'mac' => ['value_in_array']]],
257259
[['iv' => $validIv, 'value' => '', 'mac' => null]],

tests/Http/JsonResourceTest.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ class JsonResourceTest extends TestCase
1212
{
1313
public function testJsonResourceNullAttributes()
1414
{
15-
$model = new class extends Model {
15+
$model = new class extends Model
16+
{
1617
};
1718

1819
$model->setAttribute('relation_sum_column', null);
@@ -32,7 +33,8 @@ public function testJsonResourceNullAttributes()
3233

3334
public function testJsonResourceToJsonSucceedsWithPriorErrors(): void
3435
{
35-
$model = new class extends Model {
36+
$model = new class extends Model
37+
{
3638
};
3739

3840
$resource = m::mock(JsonResource::class, ['resource' => $model])

tests/Pagination/CursorPaginatorLoadMorphCountTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ public function testCollectionLoadMorphCountCanChainOnThePaginator()
1919
$items = m::mock(Collection::class);
2020
$items->shouldReceive('loadMorphCount')->once()->with('parentable', $relations);
2121

22-
$p = (new class extends AbstractCursorPaginator {
22+
$p = (new class extends AbstractCursorPaginator
23+
{
2324
})->setCollection($items);
2425

2526
$this->assertSame($p, $p->loadMorphCount('parentable', $relations));

tests/Pagination/CursorPaginatorLoadMorphTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ public function testCollectionLoadMorphCanChainOnThePaginator()
1919
$items = m::mock(Collection::class);
2020
$items->shouldReceive('loadMorph')->once()->with('parentable', $relations);
2121

22-
$p = (new class extends AbstractCursorPaginator {
22+
$p = (new class extends AbstractCursorPaginator
23+
{
2324
})->setCollection($items);
2425

2526
$this->assertSame($p, $p->loadMorph('parentable', $relations));

tests/Pagination/PaginatorLoadMorphCountTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ public function testCollectionLoadMorphCountCanChainOnThePaginator()
1919
$items = m::mock(Collection::class);
2020
$items->shouldReceive('loadMorphCount')->once()->with('parentable', $relations);
2121

22-
$p = (new class extends AbstractPaginator {
22+
$p = (new class extends AbstractPaginator
23+
{
2324
})->setCollection($items);
2425

2526
$this->assertSame($p, $p->loadMorphCount('parentable', $relations));

tests/Pagination/PaginatorLoadMorphTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ public function testCollectionLoadMorphCanChainOnThePaginator()
1919
$items = m::mock(Collection::class);
2020
$items->shouldReceive('loadMorph')->once()->with('parentable', $relations);
2121

22-
$p = (new class extends AbstractPaginator {
22+
$p = (new class extends AbstractPaginator
23+
{
2324
})->setCollection($items);
2425

2526
$this->assertSame($p, $p->loadMorph('parentable', $relations));

0 commit comments

Comments
 (0)