Skip to content

Commit cbb2de2

Browse files
luisdalmolingithub-actions[bot]
authored andcommitted
Fix styling
1 parent 4c43f4d commit cbb2de2

13 files changed

+29
-33
lines changed

src/DescribeFilamentResourceTool.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ public function extractRelationshipsInfo(Resource $resource): array
115115
// Placeholder: Use manager class name as key.
116116
$relationName = $manager->getRelationshipName();
117117
$modelClass = $resource::getModel();
118-
$modelInstance = new $modelClass();
118+
$modelInstance = new $modelClass;
119119
$relation = $modelInstance->$relationName();
120120

121121
$relationships[$relationName] = [

tests/Feature/DescribeFilamentResourceToolTest.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
<?php
22

3-
use Tests\Feature\TestUserResource;
3+
use Kirschbaum\Loop\Filament\DescribeFilamentResourceTool;
44
use Tests\Feature\TestPostWithRelationsResource;
5+
use Tests\Feature\TestUserResource;
56
use Tests\Feature\TestUserWithRelationsResource;
6-
use Kirschbaum\Loop\Filament\DescribeFilamentResourceTool;
77

88
it('can instantiate the describe filament resource tool', function () {
9-
$tool = new DescribeFilamentResourceTool();
9+
$tool = new DescribeFilamentResourceTool;
1010

1111
expect($tool)->toBeInstanceOf(DescribeFilamentResourceTool::class);
1212
expect($tool->getName())->toBe('describe_filament_resource');
1313
});
1414

1515
it('can extract table schema using the tool', function () {
16-
$tool = new DescribeFilamentResourceTool();
16+
$tool = new DescribeFilamentResourceTool;
1717
$resource = app(TestUserResource::class);
1818

1919
$tableSchema = $tool->extractTableSchema($resource);
@@ -28,7 +28,7 @@
2828
});
2929

3030
it('can extract column properties through the tool', function () {
31-
$tool = new DescribeFilamentResourceTool();
31+
$tool = new DescribeFilamentResourceTool;
3232
$resource = app(TestUserResource::class);
3333

3434
$tableSchema = $tool->extractTableSchema($resource);
@@ -46,7 +46,7 @@
4646
});
4747

4848
it('can extract bulk actions through the tool', function () {
49-
$tool = new DescribeFilamentResourceTool();
49+
$tool = new DescribeFilamentResourceTool;
5050
$resource = app(TestUserResource::class);
5151

5252
$tableSchema = $tool->extractTableSchema($resource);
@@ -57,7 +57,7 @@
5757
});
5858

5959
it('can extract resource relationships through the tool', function () {
60-
$tool = new DescribeFilamentResourceTool();
60+
$tool = new DescribeFilamentResourceTool;
6161
$resource = app(TestUserWithRelationsResource::class);
6262

6363
$relationships = $tool->extractRelationshipsInfo($resource);
@@ -75,7 +75,7 @@
7575
});
7676

7777
it('can describe a complete resource using the tool', function () {
78-
$tool = new DescribeFilamentResourceTool();
78+
$tool = new DescribeFilamentResourceTool;
7979

8080
$result = $tool->describe(TestUserWithRelationsResource::class);
8181

@@ -95,7 +95,7 @@
9595
});
9696

9797
it('can extract different relationship types including belongsTo', function () {
98-
$tool = new DescribeFilamentResourceTool();
98+
$tool = new DescribeFilamentResourceTool;
9999
$resource = app(TestPostWithRelationsResource::class);
100100

101101
$relationships = $tool->extractRelationshipsInfo($resource);
@@ -113,7 +113,7 @@
113113
});
114114

115115
it('can describe a resource with mixed relationship types', function () {
116-
$tool = new DescribeFilamentResourceTool();
116+
$tool = new DescribeFilamentResourceTool;
117117

118118
$result = $tool->describe(TestPostWithRelationsResource::class);
119119

@@ -127,4 +127,4 @@
127127
expect($relationships)->toHaveKeys(['comments', 'category'])
128128
->and($relationships['comments']['type'])->toBe('HasMany')
129129
->and($relationships['category']['type'])->toBe('BelongsTo');
130-
});
130+
});

tests/Feature/TestCategory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ public function posts(): HasMany
2121
{
2222
return $this->hasMany(TestPost::class);
2323
}
24-
}
24+
}

tests/Feature/TestCategoryRelationManager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,4 @@ public function table(Table $table): Table
4949
]),
5050
]);
5151
}
52-
}
52+
}

tests/Feature/TestComment.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@ public function user(): BelongsTo
2727
{
2828
return $this->belongsTo(TestUser::class);
2929
}
30-
}
30+
}

tests/Feature/TestCommentsRelationManager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,4 @@ public function table(Table $table): Table
4646
]),
4747
]);
4848
}
49-
}
49+
}

tests/Feature/TestPost.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ public function category(): BelongsTo
3434
{
3535
return $this->belongsTo(TestCategory::class);
3636
}
37-
}
37+
}

tests/Feature/TestPostWithRelationsResource.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,4 @@ public static function getRelations(): array
6868
TestCategoryRelationManager::class,
6969
];
7070
}
71-
}
71+
}

tests/Feature/TestPostsRelationManager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,4 @@ public function table(Table $table): Table
4848
]),
4949
]);
5050
}
51-
}
51+
}

tests/Feature/TestUser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ public function comments(): HasMany
2626
{
2727
return $this->hasMany(TestComment::class);
2828
}
29-
}
29+
}

0 commit comments

Comments
 (0)