Completed
Push — master ( 7700d1...23cd67 )
by Mahmoud
03:21
created
app/Port/Test/PHPUnit/Abstracts/TestCase.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,6 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
app/Port/Test/PHPUnit/Traits/GeneralTestsHelpersTrait.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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)
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,6 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
app/Port/Test/PHPUnit/Traits/TestCaseTrait.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,6 @@
 block discarded – undo
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
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -418,7 +418,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
app/Port/Test/PHPUnit/Traits/TestingUserTrait.php 2 patches
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -5,8 +5,6 @@
 block discarded – undo
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
 /**
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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);
Please login to merge, or discard this patch.