@@ -36,7 +36,7 @@ |
||
| 36 | 36 | */ |
| 37 | 37 | public function apply($model, PrettusRepositoryInterface $repository) |
| 38 | 38 | { |
| 39 | - return $model->whereHas('roles', function ($q) { |
|
| 39 | + return $model->whereHas('roles', function($q) { |
|
| 40 | 40 | $q->where('name', $this->roles); |
| 41 | 41 | }); |
| 42 | 42 | } |
@@ -5,7 +5,6 @@ |
||
| 5 | 5 | use App\Port\Test\PHPUnit\Traits\CustomTestsHelpersTrait; |
| 6 | 6 | use App\Port\Test\PHPUnit\Traits\GeneralTestsHelpersTrait; |
| 7 | 7 | use App\Port\Test\PHPUnit\Traits\TestCaseTrait; |
| 8 | -use App\Port\Test\PHPUnit\Traits\TestingTrait; |
|
| 9 | 8 | use App\Port\Test\PHPUnit\Traits\TestingUserTrait; |
| 10 | 9 | use Faker\Generator; |
| 11 | 10 | use Illuminate\Contracts\Console\Kernel as LaravelKernel; |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | * |
| 71 | 71 | * Example: you give it ('users/{id}/stores', 100) it returns 'users/100/stores' |
| 72 | 72 | * |
| 73 | - * @param $endpoint |
|
| 73 | + * @param string $endpoint |
|
| 74 | 74 | * @param $id |
| 75 | 75 | * @param bool $skipEncoding |
| 76 | 76 | * @param string $replace |
@@ -192,7 +192,7 @@ discard block |
||
| 192 | 192 | } |
| 193 | 193 | |
| 194 | 194 | /** |
| 195 | - * @param $keys |
|
| 195 | + * @param string[] $keys |
|
| 196 | 196 | * @param $response |
| 197 | 197 | */ |
| 198 | 198 | public function assertResponseContainKeys($keys, $response) |
@@ -3,7 +3,6 @@ |
||
| 3 | 3 | namespace App\Port\Test\PHPUnit\Traits; |
| 4 | 4 | |
| 5 | 5 | use App; |
| 6 | -use Artisan; |
|
| 7 | 6 | use Dingo\Api\Http\Response as DingoAPIResponse; |
| 8 | 7 | use Illuminate\Http\Response; |
| 9 | 8 | use Illuminate\Http\UploadedFile; |
@@ -4,7 +4,6 @@ |
||
| 4 | 4 | |
| 5 | 5 | use App; |
| 6 | 6 | use Artisan; |
| 7 | -use Dingo\Api\Http\Response as DingoAPIResponse; |
|
| 8 | 7 | |
| 9 | 8 | /** |
| 10 | 9 | * Class TestCaseTrait |
@@ -418,7 +418,7 @@ |
||
| 418 | 418 | */ |
| 419 | 419 | public function overrideSubDomain($subDomain, $url = null) |
| 420 | 420 | { |
| 421 | - $url = ($url) ? : $this->baseUrl; |
|
| 421 | + $url = ($url) ?: $this->baseUrl; |
|
| 422 | 422 | |
| 423 | 423 | $info = parse_url($url); |
| 424 | 424 | |
@@ -5,8 +5,6 @@ |
||
| 5 | 5 | use App; |
| 6 | 6 | use App\Containers\Authentication\Tasks\ApiLoginThisUserObjectTask; |
| 7 | 7 | use App\Containers\User\Models\User; |
| 8 | -use Artisan; |
|
| 9 | -use Dingo\Api\Http\Response as DingoAPIResponse; |
|
| 10 | 8 | use Illuminate\Support\Facades\Hash; |
| 11 | 9 | |
| 12 | 10 | /** |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | public function createTestingUser($access = null, $userDetails = null) |
| 99 | 99 | { |
| 100 | 100 | // if no user detail provided, use the default details. |
| 101 | - $userDetails = $userDetails ? : [ |
|
| 101 | + $userDetails = $userDetails ?: [ |
|
| 102 | 102 | 'name' => 'Testing User', |
| 103 | 103 | 'email' => $this->faker->email, |
| 104 | 104 | 'password' => 'testing-pass', |
@@ -112,7 +112,7 @@ discard block |
||
| 112 | 112 | ]); |
| 113 | 113 | |
| 114 | 114 | // assign roles and permissions |
| 115 | - $user = $this->setupTestingUserAccess($user, $access ? : (isset($this->access) ? $this->access : null)); |
|
| 115 | + $user = $this->setupTestingUserAccess($user, $access ?: (isset($this->access) ? $this->access : null)); |
|
| 116 | 116 | |
| 117 | 117 | // log the user in |
| 118 | 118 | $user = App::make(ApiLoginThisUserObjectTask::class)->run($user); |