Skip to content

Commit

Permalink
Apply php-cs-fixer changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mattamon authored and github-actions[bot] committed Apr 3, 2024
1 parent e928601 commit 3c40bd5
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
15 changes: 7 additions & 8 deletions src/Controller/Api/V1/Assets/CollectionController.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?php
declare(strict_types=1);

/**
* Pimcore
*
Expand Down Expand Up @@ -31,25 +32,23 @@ public function __construct(
SerializerInterface $serializer,
private readonly AssetQueryProviderInterface $assetQueryProvider,
private readonly AssetSearchServiceInterface $assetSearchService,
)
{
) {
parent::__construct($serializer);
}

#[Route('/v1/assets', name: 'pimcore_studio_api_v1_asets', methods: ['GET'])]
public function getAssets(#[MapQueryString] Collection $collection): JsonResponse
{

$assetQuery = $this->getAssetQuery()
->setPage($collection->getPage())
->setPageSize($collection->getPageSize());

$assetQuery = $this->getAssetQuery()
->setPage($collection->getPage())
->setPageSize($collection->getPageSize());

return $this->jsonLd($this->assetSearchService->searchAssets($assetQuery));
return $this->jsonLd($this->assetSearchService->searchAssets($assetQuery));
}

private function getAssetQuery(): AssetQuery
{
return $this->assetQueryProvider->createAssetQuery();
}
}
}
6 changes: 3 additions & 3 deletions src/Controller/Api/V1/Assets/GetController.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?php
declare(strict_types=1);

/**
* Pimcore
*
Expand All @@ -26,8 +27,7 @@ final class GetController extends AbstractApiController
public function __construct(
SerializerInterface $serializer,
private readonly AssetSearchServiceInterface $assetSearchService,
)
{
) {
parent::__construct($serializer);
}

Expand All @@ -36,4 +36,4 @@ public function getAssets(int $id): JsonResponse
{
return $this->jsonLd($this->assetSearchService->getAssetById($id));
}
}
}
1 change: 1 addition & 0 deletions src/Controller/Api/V1/TranslationController.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?php
declare(strict_types=1);

/**
* Pimcore
*
Expand Down
6 changes: 3 additions & 3 deletions src/Dto/Collection.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?php
declare(strict_types=1);

/**
* Pimcore
*
Expand All @@ -20,8 +21,7 @@
public function __construct(
private int $page = 1,
private int $pageSize = 10
)
{
) {
}

public function getPage(): int
Expand All @@ -33,4 +33,4 @@ public function getPageSize(): int
{
return $this->pageSize;
}
}
}

0 comments on commit 3c40bd5

Please sign in to comment.