Passed
Push — master ( 3089dd...b3b4c7 )
by Arthur
39:50 queued 30:29
created
src/Modules/Auth0/Abstracts/AuthorizedHttpTest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -18,14 +18,14 @@  discard block
 block discarded – undo
18 18
 {
19 19
     use Auth0TestUser, UserTestRoles;
20 20
 
21
-    protected function http(string $method, string $route, array $payload = [], array $headers = []): TestResponse
21
+    protected function http(string $method, string $route, array $payload = [ ], array $headers = [ ]): TestResponse
22 22
     {
23
-        $headers['Authorization'] = 'Bearer '.$this->getUserAuth0Token()->id_token;
23
+        $headers[ 'Authorization' ] = 'Bearer '.$this->getUserAuth0Token()->id_token;
24 24
 
25 25
         return parent::http($method, $route, $payload, $headers);
26 26
     }
27 27
 
28
-    protected function httpNoAuth(string $method, string $route, array $payload = [], array $headers = []): TestResponse
28
+    protected function httpNoAuth(string $method, string $route, array $payload = [ ], array $headers = [ ]): TestResponse
29 29
     {
30 30
         return parent::http($method, $route, $payload, $headers);
31 31
     }
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 
38 38
     public function actingAs($user, $driver = null)
39 39
     {
40
-        if (! $user->is($this->getTestUser())) {
40
+        if (!$user->is($this->getTestUser())) {
41 41
             throw new \Foundation\Exceptions\Exception('cannot set another user for authorized http tests. Sync other roles/permissions instead.');
42 42
         }
43 43
         parent::actingAs($user, $driver);
Please login to merge, or discard this patch.
src/Modules/Notification/Http/Controllers/NotificationController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 
44 44
     public function read($id)
45 45
     {
46
-        if (! $this->service->find($id)->notifiable()->is(auth()->user())) {
46
+        if (!$this->service->find($id)->notifiable()->is(auth()->user())) {
47 47
             throw new NotFoundHttpException('notification not found');
48 48
         }
49 49
 
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 
57 57
     public function unread($id)
58 58
     {
59
-        if (! $this->service->find($id)->notifiable()->is(auth()->user())) {
59
+        if (!$this->service->find($id)->notifiable()->is(auth()->user())) {
60 60
             throw new NotFoundHttpException('notification not found');
61 61
         }
62 62
 
Please login to merge, or discard this patch.
src/Modules/User/Services/UserService.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -66,8 +66,8 @@
 block discarded – undo
66 66
 
67 67
     public function setRoles($id, array $roles): void
68 68
     {
69
-        if (! in_array(Role::MEMBER, $roles)) {
70
-            $roles[] = Role::MEMBER;
69
+        if (!in_array(Role::MEMBER, $roles)) {
70
+            $roles[ ] = Role::MEMBER;
71 71
         }
72 72
         $this->find($id)->syncRoles($roles);
73 73
     }
Please login to merge, or discard this patch.