Completed
Push — master ( 84dfb3...7a7a2b )
by Sherif
27s
created
src/Modules/Users/Http/Requests/StoreUser.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,10 +23,10 @@
 block discarded – undo
23 23
      */
24 24
     public function rules()
25 25
     {
26
-        $requiredOrNullable = request()->isMethod('PATCH') ? 'nullable' : 'required' . '';
26
+        $requiredOrNullable = request()->isMethod('PATCH') ? 'nullable' : 'required'.'';
27 27
         return [
28 28
             'name'     => 'nullable|string',
29
-            'email'    => $requiredOrNullable . '|email|unique:users,email,' . $this->route('id'),
29
+            'email'    => $requiredOrNullable.'|email|unique:users,email,'.$this->route('id'),
30 30
             'password' => 'nullable|min:6'
31 31
         ];
32 32
     }
Please login to merge, or discard this patch.
PushNotificationDevices/Http/Requests/StorePushNotificationDevice.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -23,10 +23,10 @@
 block discarded – undo
23 23
      */
24 24
     public function rules()
25 25
     {
26
-        $requiredOrNullable = request()->isMethod('PATCH') ? 'nullable' : 'required' . '';
26
+        $requiredOrNullable = request()->isMethod('PATCH') ? 'nullable' : 'required'.'';
27 27
         return [
28
-            'device_token' => $requiredOrNullable . '|string|max:255',
29
-            'user_id'      => $requiredOrNullable . '|exists:users,id'
28
+            'device_token' => $requiredOrNullable.'|string|max:255',
29
+            'user_id'      => $requiredOrNullable.'|exists:users,id'
30 30
         ];
31 31
     }
32 32
 }
Please login to merge, or discard this patch.
files/Handler.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -70,25 +70,25 @@
 block discarded – undo
70 70
     protected function getErrorHandlers()
71 71
     {
72 72
         return [
73
-            \Illuminate\Auth\AuthenticationException::class => function ($request, $exception) {
73
+            \Illuminate\Auth\AuthenticationException::class => function($request, $exception) {
74 74
                 Errors::unAuthorized();
75 75
             },
76
-            \Illuminate\Database\QueryException::class => function ($request, $exception) {
76
+            \Illuminate\Database\QueryException::class => function($request, $exception) {
77 77
                 Errors::dbQueryError();
78 78
             },
79
-            \predis\connection\connectionexception::class => function ($request, $exception) {
79
+            \predis\connection\connectionexception::class => function($request, $exception) {
80 80
                 Errors::redisNotRunning();
81 81
             },
82
-            \RedisException::class => function ($request, $exception) {
82
+            \RedisException::class => function($request, $exception) {
83 83
                 Errors::redisNotRunning();
84 84
             },
85
-            \GuzzleHttp\Exception\ClientException::class => function ($request, $exception) {
85
+            \GuzzleHttp\Exception\ClientException::class => function($request, $exception) {
86 86
                 Errors::connectionError();
87 87
             },
88
-            \Symfony\Component\HttpKernel\Exception\HttpException::class => function ($request, $exception) {
88
+            \Symfony\Component\HttpKernel\Exception\HttpException::class => function($request, $exception) {
89 89
                 return response()->json(['errors' => [$exception->getStatusCode() === 404 ? ($exception->getMessage() ?: 'not found') : $exception->getMessage()]], $exception->getStatusCode());
90 90
             },
91
-            \Illuminate\Validation\ValidationException::class => function ($request, $exception) {
91
+            \Illuminate\Validation\ValidationException::class => function($request, $exception) {
92 92
                 return response()->json(['errors' => $exception->errors()], 422);
93 93
             }
94 94
         ];
Please login to merge, or discard this patch.
src/Modules/Reporting/Providers/ModuleServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
         $this->loadViewsFrom(__DIR__.'/../Resources/Views', 'reporting');
18 18
 
19 19
         $this->loadMigrationsFrom(module_path('reporting', 'Database/Migrations', 'app'));
20
-        if (!$this->app->configurationIsCached()) {
20
+        if ( ! $this->app->configurationIsCached()) {
21 21
             $this->loadConfigsFrom(module_path('reporting', 'Config', 'app'));
22 22
         }
23 23
     }
Please login to merge, or discard this patch.
src/Modules/Roles/Providers/ModuleServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
         $this->loadViewsFrom(__DIR__.'/../Resources/Views', 'roles');
18 18
 
19 19
         $this->loadMigrationsFrom(module_path('roles', 'Database/Migrations', 'app'));
20
-        if (!$this->app->configurationIsCached()) {
20
+        if ( ! $this->app->configurationIsCached()) {
21 21
             $this->loadConfigsFrom(module_path('roles', 'Config', 'app'));
22 22
         }
23 23
     }
Please login to merge, or discard this patch.
src/Modules/Roles/Database/Seeds/RolesTableSeeder.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
          */
29 29
         AclUser::firstOrCreate([
30 30
             'email' => config('role.admin_email'),
31
-        ],[
31
+        ], [
32 32
             'name'       => 'Admin',
33 33
             'password'   => config('role.admin_password'),
34 34
             'confirmed'  => 1
@@ -37,12 +37,12 @@  discard block
 block discarded – undo
37 37
         /**
38 38
          * Assign default users to admin roles.
39 39
          */
40
-        $adminRoleId = Role::where('name', RoleEnum::ADMIN)->select('id')->first()->id;;
40
+        $adminRoleId = Role::where('name', RoleEnum::ADMIN)->select('id')->first()->id; ;
41 41
         $adminUserId = AclUser::where('email', '[email protected]')->select('id')->first()->id;
42 42
         \DB::table('role_user')->updateOrInsert([
43 43
             'user_id' => $adminUserId,
44 44
             'role_id' => $adminRoleId,
45
-        ],[]);
45
+        ], []);
46 46
 
47 47
         /**
48 48
          * Insert the permissions related to roles table.
Please login to merge, or discard this patch.
src/Modules/Users/Providers/ModuleServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
         $this->loadViewsFrom(__DIR__.'/../Resources/Views', 'users');
18 18
 
19 19
         $this->loadMigrationsFrom(module_path('users', 'Database/Migrations', 'app'));
20
-        if (!$this->app->configurationIsCached()) {
20
+        if ( ! $this->app->configurationIsCached()) {
21 21
             $this->loadConfigsFrom(module_path('users', 'Config', 'app'));
22 22
         }
23 23
     }
Please login to merge, or discard this patch.
src/Modules/Users/Http/Resources/AclUser.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
      */
19 19
     public function toArray($request)
20 20
     {
21
-        if (! $this->resource) {
21
+        if ( ! $this->resource) {
22 22
             return [];
23 23
         }
24 24
 
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
             'readNotifications' => NotificationResource::collection($this->whenLoaded('readNotifications')),
32 32
             'unreadNotifications' => NotificationResource::collection($this->whenLoaded('unreadNotifications')),
33 33
             'roles' => RoleResource::collection($this->whenLoaded('roles')),
34
-            'permissions' => $this->when($this->permissions, function () {
34
+            'permissions' => $this->when($this->permissions, function() {
35 35
                 return PermissionResource::collection($this->permissions);
36 36
             }),
37 37
             'oauthClients' => OauthClientResource::collection($this->whenLoaded('oauthClients')),
Please login to merge, or discard this patch.
src/Modules/Users/Routes/web.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
 |
12 12
 */
13 13
 
14
-Route::group(['prefix' => 'users'], function () {
14
+Route::group(['prefix' => 'users'], function() {
15 15
 
16 16
     Route::get('/confirm/email/{token}', 'UserController@confirmEmailPage')->name('confirm_email_page');
17 17
     Route::get('/reset/password/{token}', 'UserController@resetPasswordPage')->name('reset_password_page');
Please login to merge, or discard this patch.