Skip to content

Commit

Permalink
add phpdocs
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohammad-Alavi committed Oct 1, 2021
1 parent d27b4ea commit 64981c5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,25 @@

namespace App\Containers\AppSection\Authorization\UI\API\Controllers;

use Apiato\Core\Exceptions\CoreInternalErrorException;
use Apiato\Core\Exceptions\InvalidTransformerException;
use App\Containers\AppSection\Authorization\Actions\GetAllPermissionsAction;
use App\Containers\AppSection\Authorization\UI\API\Requests\GetAllPermissionsRequest;
use App\Containers\AppSection\Authorization\UI\API\Transformers\PermissionTransformer;
use App\Ship\Parents\Controllers\ApiController;
use Prettus\Repository\Exceptions\RepositoryException;

class GetAllPermissionsController extends ApiController
{
/**
* @throws InvalidTransformerException
* @throws CoreInternalErrorException
* @throws RepositoryException
*/
public function getAllPermissions(GetAllPermissionsRequest $request): array
{
$permissions = app(GetAllPermissionsAction::class)->run($request);

return $this->transform($permissions, PermissionTransformer::class);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,25 @@

namespace App\Containers\AppSection\Authorization\UI\API\Controllers;

use Apiato\Core\Exceptions\CoreInternalErrorException;
use Apiato\Core\Exceptions\InvalidTransformerException;
use App\Containers\AppSection\Authorization\Actions\GetAllRolesAction;
use App\Containers\AppSection\Authorization\UI\API\Requests\GetAllRolesRequest;
use App\Containers\AppSection\Authorization\UI\API\Transformers\RoleTransformer;
use App\Ship\Parents\Controllers\ApiController;
use Prettus\Repository\Exceptions\RepositoryException;

class GetAllRolesController extends ApiController
{
/**
* @throws InvalidTransformerException
* @throws CoreInternalErrorException
* @throws RepositoryException
*/
public function getAllRoles(GetAllRolesRequest $request): array
{
$roles = app(GetAllRolesAction::class)->run($request);

return $this->transform($roles, RoleTransformer::class);
}
}

0 comments on commit 64981c5

Please sign in to comment.