@@ -44,6 +44,6 @@ |
||
| 44 | 44 | $router->post('admins/create', [ |
| 45 | 45 | 'uses' => 'Controller@createAdmin', |
| 46 | 46 | 'middleware' => [ |
| 47 | - 'api.auth', |
|
| 47 | + 'api.auth', |
|
| 48 | 48 | ], |
| 49 | 49 | ]); |
@@ -13,16 +13,16 @@ |
||
| 13 | 13 | class AdminsCriteria extends Criteria |
| 14 | 14 | { |
| 15 | 15 | |
| 16 | - /** |
|
| 17 | - * @param $model |
|
| 18 | - * @param \Prettus\Repository\Contracts\RepositoryInterface $repository |
|
| 19 | - * |
|
| 20 | - * @return mixed |
|
| 21 | - */ |
|
| 22 | - public function apply($model, PrettusRepositoryInterface $repository) |
|
| 23 | - { |
|
| 16 | + /** |
|
| 17 | + * @param $model |
|
| 18 | + * @param \Prettus\Repository\Contracts\RepositoryInterface $repository |
|
| 19 | + * |
|
| 20 | + * @return mixed |
|
| 21 | + */ |
|
| 22 | + public function apply($model, PrettusRepositoryInterface $repository) |
|
| 23 | + { |
|
| 24 | 24 | return $model->whereHas('roles', function ($q) { |
| 25 | - $q->where('name', 'admin'); |
|
| 25 | + $q->where('name', 'admin'); |
|
| 26 | 26 | }); |
| 27 | - } |
|
| 27 | + } |
|
| 28 | 28 | } |
@@ -21,7 +21,7 @@ |
||
| 21 | 21 | */ |
| 22 | 22 | public function apply($model, PrettusRepositoryInterface $repository) |
| 23 | 23 | { |
| 24 | - return $model->whereHas('roles', function ($q) { |
|
| 24 | + return $model->whereHas('roles', function($q) { |
|
| 25 | 25 | $q->where('name', 'admin'); |
| 26 | 26 | }); |
| 27 | 27 | } |
@@ -54,12 +54,12 @@ |
||
| 54 | 54 | return $this->response->paginator($users, new UserTransformer()); |
| 55 | 55 | } |
| 56 | 56 | |
| 57 | - /** |
|
| 58 | - * @param \App\Containers\User\UI\API\Requests\ListAllUsersRequest $request |
|
| 59 | - * @param \App\Containers\User\Actions\ListAndSearchUsersAction $action |
|
| 60 | - * |
|
| 61 | - * @return \Dingo\Api\Http\Response |
|
| 62 | - */ |
|
| 57 | + /** |
|
| 58 | + * @param \App\Containers\User\UI\API\Requests\ListAllUsersRequest $request |
|
| 59 | + * @param \App\Containers\User\Actions\ListAndSearchUsersAction $action |
|
| 60 | + * |
|
| 61 | + * @return \Dingo\Api\Http\Response |
|
| 62 | + */ |
|
| 63 | 63 | public function listAllAdmins(ListAllUsersRequest $request, ListAndSearchUsersAction $action) |
| 64 | 64 | { |
| 65 | 65 | $users = $action->run(true, true); |
@@ -4,7 +4,6 @@ |
||
| 4 | 4 | |
| 5 | 5 | use App\Containers\Authorization\Models\Permission; |
| 6 | 6 | use App\Containers\Authorization\Models\Role; |
| 7 | -use App\Containers\User\Models\User; |
|
| 8 | 7 | use App\Port\Test\PHPUnit\Abstracts\TestCase; |
| 9 | 8 | |
| 10 | 9 | /** |
@@ -3,10 +3,7 @@ |
||
| 3 | 3 | namespace App\Containers\Order\UI\API\Tests\Functional; |
| 4 | 4 | |
| 5 | 5 | use App\Containers\Order\Models\Order; |
| 6 | -use App\Containers\Invoice\Models\Invoice; |
|
| 7 | -use App\Containers\User\Models\User; |
|
| 8 | 6 | use App\Port\Test\PHPUnit\Abstracts\TestCase; |
| 9 | -use Vinkla\Hashids\Facades\Hashids; |
|
| 10 | 7 | |
| 11 | 8 | /** |
| 12 | 9 | * Class FindPermissionByNameTest. |
@@ -3,10 +3,7 @@ |
||
| 3 | 3 | namespace App\Containers\Order\UI\API\Tests\Functional; |
| 4 | 4 | |
| 5 | 5 | use App\Containers\Order\Models\Order; |
| 6 | -use App\Containers\Invoice\Models\Invoice; |
|
| 7 | -use App\Containers\User\Models\User; |
|
| 8 | 6 | use App\Port\Test\PHPUnit\Abstracts\TestCase; |
| 9 | -use Vinkla\Hashids\Facades\Hashids; |
|
| 10 | 7 | |
| 11 | 8 | /** |
| 12 | 9 | * Class FindRoleByNameTest. |
@@ -2,7 +2,6 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace App\Containers\Authorization\UI\API\Tests\Functional; |
| 4 | 4 | |
| 5 | -use App\Containers\Authorization\Models\User; |
|
| 6 | 5 | use App\Port\Test\PHPUnit\Abstracts\TestCase; |
| 7 | 6 | |
| 8 | 7 | /** |
@@ -4,7 +4,6 @@ |
||
| 4 | 4 | |
| 5 | 5 | use App; |
| 6 | 6 | use App\Port\Foundation\Portals\Facade\PortButler; |
| 7 | -use DB; |
|
| 8 | 7 | use File; |
| 9 | 8 | |
| 10 | 9 | /** |
@@ -49,7 +49,7 @@ |
||
| 49 | 49 | |
| 50 | 50 | private function loadMigrations($directory) |
| 51 | 51 | { |
| 52 | - App::afterResolving('migrator', function ($migrator) use ($directory) { |
|
| 52 | + App::afterResolving('migrator', function($migrator) use ($directory) { |
|
| 53 | 53 | foreach ((array)$directory as $path) { |
| 54 | 54 | $migrator->path($path); |
| 55 | 55 | } |
@@ -113,7 +113,7 @@ |
||
| 113 | 113 | /** |
| 114 | 114 | * @param \Symfony\Component\Finder\SplFileInfo $file |
| 115 | 115 | * |
| 116 | - * @return mixed |
|
| 116 | + * @return string |
|
| 117 | 117 | */ |
| 118 | 118 | private function getRouteFileNameWithoutExtension(SplFileInfo $file) |
| 119 | 119 | { |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | $apiVersionNumber = $this->getRouteFileVersionNumber($file); |
| 55 | 55 | |
| 56 | 56 | $this->apiRouter->version('v' . $apiVersionNumber, |
| 57 | - function (DingoApiRouter $router) use ($file, $containerPath, $containersNamespace) { |
|
| 57 | + function(DingoApiRouter $router) use ($file, $containerPath, $containersNamespace) { |
|
| 58 | 58 | |
| 59 | 59 | $controllerNamespace = $containersNamespace . '\\Containers\\' . basename($containerPath) . '\\UI\API\Controllers'; |
| 60 | 60 | |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | 'limit' => Config::get('hello.api.limit'), |
| 68 | 68 | // The API limit expiry time. |
| 69 | 69 | 'expires' => Config::get('hello.api.limit_expires'), |
| 70 | - ], function ($router) use ($file) { |
|
| 70 | + ], function($router) use ($file) { |
|
| 71 | 71 | |
| 72 | 72 | require $file->getPathname(); |
| 73 | 73 | |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | $this->webRouter->group([ |
| 102 | 102 | 'middleware' => ['web'], |
| 103 | 103 | 'namespace' => $controllerNamespace, |
| 104 | - ], function (LaravelRouter $router) use ($file) { |
|
| 104 | + ], function(LaravelRouter $router) use ($file) { |
|
| 105 | 105 | require $file->getPathname(); |
| 106 | 106 | }); |
| 107 | 107 | } |