Completed
Push — master ( 30f758...6ad044 )
by Sherif
09:12
created
src/Modules/Core/Http/Controllers/ApiDocumentController.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -20,27 +20,27 @@  discard block
 block discarded – undo
20 20
 			],
21 21
 			[
22 22
 				'title'   => 'email equal [email protected] and user is blocked:',
23
-				'content' => ['and' => ['email' => '[email protected]','blocked' => 1]]
23
+				'content' => ['and' => ['email' => '[email protected]', 'blocked' => 1]]
24 24
 			],
25 25
 			[
26 26
 				'title'   => 'email equal [email protected] or user is blocked:',
27
-				'content' => ['or' => ['email' => '[email protected]','blocked' => 1]]
27
+				'content' => ['or' => ['email' => '[email protected]', 'blocked' => 1]]
28 28
 			],
29 29
 			[
30 30
 				'title'   => 'email contain John:',
31
-				'content' => ['email' => ['op' => 'like','val' => '%John%']]
31
+				'content' => ['email' => ['op' => 'like', 'val' => '%John%']]
32 32
 			],
33 33
 			[
34 34
 				'title'   => 'user created after 2016-10-25:',
35
-				'content' => ['created_at' => ['op' => '>','val' => '2016-10-25']]
35
+				'content' => ['created_at' => ['op' => '>', 'val' => '2016-10-25']]
36 36
 			],
37 37
 			[
38 38
 				'title'   => 'user created between 2016-10-20 and 2016-10-25:',
39
-				'content' => ['created_at' => ['op' => 'between','val1' => '2016-10-20','val2' => '2016-10-25']]
39
+				'content' => ['created_at' => ['op' => 'between', 'val1' => '2016-10-20', 'val2' => '2016-10-25']]
40 40
 			],
41 41
 			[
42 42
 				'title'   => 'user id in 1,2,3:',
43
-				'content' => ['id' => ['op' => 'in','val' => [1, 2, 3]]]
43
+				'content' => ['id' => ['op' => 'in', 'val' => [1, 2, 3]]]
44 44
 			],
45 45
 			[
46 46
 				'title'   => 'user name is null:',
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 			],
53 53
 			[
54 54
 				'title'   => 'user has group admin:',
55
-				'content' => ['groups' => ['op' => 'has','val' => ['name' => 'Admin']]]
55
+				'content' => ['groups' => ['op' => 'has', 'val' => ['name' => 'Admin']]]
56 56
 			]
57 57
 		];
58 58
 
Please login to merge, or discard this patch.
src/Modules/Core/Repositories/SettingRepository.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
      */
23 23
     public function saveMany(array $data)
24 24
     {
25
-    	\DB::transaction(function () use ($data) {
25
+    	\DB::transaction(function() use ($data) {
26 26
     		foreach ($data as $key => $value) 
27 27
     		{
28 28
     			$this->save($value);
Please login to merge, or discard this patch.
src/Modules/Acl/Repositories/UserRepository.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
         $user        = \Core::users()->find(\Auth::id(), $relations);
29 29
         foreach ($user->groups()->get() as $group)
30 30
         {
31
-            $group->permissions->each(function ($permission) use (&$permissions){
31
+            $group->permissions->each(function($permission) use (&$permissions){
32 32
                 $permissions[$permission->model][$permission->id] = $permission->name;
33 33
             });
34 34
         }
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
         $user        = $user ?: $this->find(\Auth::id(), ['groups.permissions']);
52 52
         $permissions = [];
53 53
 
54
-        $user->groups->pluck('permissions')->each(function ($permission) use (&$permissions, $model){
54
+        $user->groups->pluck('permissions')->each(function($permission) use (&$permissions, $model){
55 55
             $permissions = array_merge($permissions, $permission->where('model', $model)->pluck('name')->toArray()); 
56 56
         });
57 57
         
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
      */
81 81
     public function assignGroups($user_id, $group_ids)
82 82
     {
83
-        \DB::transaction(function () use ($user_id, $group_ids) {
83
+        \DB::transaction(function() use ($user_id, $group_ids) {
84 84
             $user = $this->find($user_id);
85 85
             $user->groups()->detach();
86 86
             $user->groups()->attach($group_ids);
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
         {
116 116
             \ErrorHandler::userIsBlocked();
117 117
         }
118
-        else if (! env('DISABLE_CONFIRM_EMAIL') && ! $user->confirmed)
118
+        else if ( ! env('DISABLE_CONFIRM_EMAIL') && ! $user->confirmed)
119 119
         {
120 120
             \ErrorHandler::emailNotConfirmed();
121 121
         }
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
      */
249 249
     public function resetPassword($credentials)
250 250
     {
251
-        $response = \Password::reset($credentials, function ($user, $password) {
251
+        $response = \Password::reset($credentials, function($user, $password) {
252 252
             $user->password = $password;
253 253
             $user->save();
254 254
         });
Please login to merge, or discard this patch.
src/Modules/Acl/AclUser.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
     use SoftDeletes, HasApiTokens;
11 11
     protected $table    = 'users';
12 12
     protected $dates    = ['created_at', 'updated_at', 'deleted_at'];
13
-    protected $hidden   = ['password', 'remember_token','deleted_at'];
13
+    protected $hidden   = ['password', 'remember_token', 'deleted_at'];
14 14
     protected $guarded  = ['id'];
15 15
     protected $fillable = ['profile_picture', 'name', 'email', 'password'];
16 16
     public $searchable  = ['name', 'email'];
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
 
68 68
     public function groups()
69 69
     {
70
-        return $this->belongsToMany('\App\Modules\Acl\AclGroup','users_groups','user_id','group_id')->whereNull('users_groups.deleted_at')->withTimestamps();
70
+        return $this->belongsToMany('\App\Modules\Acl\AclGroup', 'users_groups', 'user_id', 'group_id')->whereNull('users_groups.deleted_at')->withTimestamps();
71 71
     }
72 72
 
73 73
     public function oauthClients()
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
      */
115 115
     public function receivesBroadcastNotificationsOn()
116 116
     {
117
-        return 'users.' . $this->id;
117
+        return 'users.'.$this->id;
118 118
     }
119 119
     
120 120
     public static function boot()
Please login to merge, or discard this patch.
src/Modules/Core/Console/Commands/GenerateDoc.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
             if ($route) 
46 46
             {
47 47
                 $actoinArray = explode('@', $route['action']);
48
-                if(array_get($actoinArray, 1, false))
48
+                if (array_get($actoinArray, 1, false))
49 49
                 {
50 50
                     $controller       = $actoinArray[0];
51 51
                     $method           = $actoinArray[1];
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
                     $route['response'] = $this->getResponseObject($classProperties['model'], $route['name'], $route['returnDocBlock']);
65 65
 
66 66
                     preg_match('/api\/([^#]+)\//iU', $route['uri'], $module);
67
-                    $docData['modules'][$module[1]][substr($route['prefix'], strlen('/api/' . $module[1] . '/') - 1)][] = $route;
67
+                    $docData['modules'][$module[1]][substr($route['prefix'], strlen('/api/'.$module[1].'/') - 1)][] = $route;
68 68
 
69 69
                     $this->getModels($classProperties['model'], $docData);   
70 70
                 }
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
      */
83 83
     protected function getRoutes()
84 84
     {
85
-        return collect(\Route::getRoutes())->map(function ($route) {
85
+        return collect(\Route::getRoutes())->map(function($route) {
86 86
             if (strpos($route->uri(), 'api') !== false) 
87 87
             {
88 88
                 return [
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
         ];
115 115
 
116 116
 
117
-        if (! $skipLoginCheck || ! in_array($method, $skipLoginCheck)) 
117
+        if ( ! $skipLoginCheck || ! in_array($method, $skipLoginCheck)) 
118 118
         {
119 119
             $route['headers']['Authorization'] = 'Bearer {token}';
120 120
         }
@@ -168,16 +168,16 @@  discard block
 block discarded – undo
168 168
                 }
169 169
                 else
170 170
                 {
171
-                    $route['body'] = eval('return ' . str_replace(',\'.$request->get(\'id\')', ',{id}\'', $match[1]) . ';');
171
+                    $route['body'] = eval('return '.str_replace(',\'.$request->get(\'id\')', ',{id}\'', $match[1]).';');
172 172
                 }
173 173
 
174 174
                 foreach ($route['body'] as &$rule) 
175 175
                 {
176
-                    if(strpos($rule, 'unique'))
176
+                    if (strpos($rule, 'unique'))
177 177
                     {
178 178
                         $rule = substr($rule, 0, strpos($rule, 'unique') + 6);
179 179
                     }
180
-                    elseif(strpos($rule, 'exists'))
180
+                    elseif (strpos($rule, 'exists'))
181 181
                     {
182 182
                         $rule = substr($rule, 0, strpos($rule, 'exists') - 1);
183 183
                     }
@@ -250,10 +250,10 @@  discard block
 block discarded – undo
250 250
             $model      = factory($modelClass)->make();
251 251
             $modelArr   = $model->toArray();
252 252
 
253
-            if ( $model->trans && ! $model->trans->count()) 
253
+            if ($model->trans && ! $model->trans->count()) 
254 254
             {
255 255
                 $modelArr['trans'] = [
256
-                    'en' => factory($modelClass . 'Translation')->make()->toArray()
256
+                    'en' => factory($modelClass.'Translation')->make()->toArray()
257 257
                 ];
258 258
             }
259 259
 
Please login to merge, or discard this patch.