Skip to content

Commit ea3392f

Browse files
committed
refactor: clean up codes
1 parent 8f64236 commit ea3392f

File tree

3 files changed

+6
-10
lines changed

3 files changed

+6
-10
lines changed

contexts/CategoryManagement/Application/Coordinators/CategoryManagementCoordinator.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,17 @@
1111
use Contexts\CategoryManagement\Domain\Models\Category;
1212
use Contexts\CategoryManagement\Domain\Models\CategoryId;
1313
use Contexts\CategoryManagement\Domain\Models\CategoryStatus;
14+
use Contexts\CategoryManagement\Domain\Policies\GlobalPermissionPolicy;
1415
use Contexts\CategoryManagement\Domain\Repositories\CategoryRepository;
1516
use Contexts\Shared\Application\BaseCoordinator;
16-
use Illuminate\Contracts\Pagination\LengthAwarePaginator;
1717
use Contexts\Shared\Policies\CompositePolicy;
18-
use Contexts\CategoryManagement\Domain\Policies\GlobalPermissionPolicy;
18+
use Illuminate\Contracts\Pagination\LengthAwarePaginator;
1919

2020
class CategoryManagementCoordinator extends BaseCoordinator
2121
{
2222
public function __construct(
2323
private CategoryRepository $repository
24-
) {
25-
}
24+
) {}
2625

2726
public function create(CreateCategoryDTO $data): Category
2827
{

contexts/CategoryManagement/Domain/Policies/GlobalPermissionPolicy.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@
1010

1111
class GlobalPermissionPolicy implements BaseAuthorizationPolicy
1212
{
13-
public function __construct(private string $action)
14-
{
15-
}
13+
public function __construct(private string $action) {}
1614

1715
public static function canPerform(string $action)
1816
{

contexts/CategoryManagement/Infrastructure/Adapters/AuthorizationAdapter.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,14 @@
44

55
namespace Contexts\CategoryManagement\Infrastructure\Adapters;
66

7-
use Contexts\CategoryManagement\Domain\Gateway\AuthorizationGateway;
87
use Contexts\Authorization\Contracts\V1\Services\GlobalPermissionService;
8+
use Contexts\CategoryManagement\Domain\Gateway\AuthorizationGateway;
99

1010
class AuthorizationAdapter implements AuthorizationGateway
1111
{
1212
public function __construct(
1313
private GlobalPermissionService $globalPermissionService,
14-
) {
15-
}
14+
) {}
1615

1716
public function canPerformAction(string $action): bool
1817
{

0 commit comments

Comments
 (0)