Completed
Push — master ( 456045...7e51b9 )
by Sherif
04:39
created
src/Modules/Notifications/Notifications/ConfirmEmail.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,6 +45,6 @@
 block discarded – undo
45 45
             ->subject('Email verification')
46 46
             ->line('Email verification')
47 47
             ->line('To validate your email click on the button below')
48
-            ->action('Verify your email', config('skeleton.confrim_email_url') . '/' . $notifiable->confirmation_code);
48
+            ->action('Verify your email', config('skeleton.confrim_email_url').'/'.$notifiable->confirmation_code);
49 49
     }
50 50
 }
51 51
\ No newline at end of file
Please login to merge, or discard this patch.
src/Modules/Acl/ModelObservers/AclUserObserver.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
     {
35 35
         if ($model->isDirty('blocked') && $model->blocked) 
36 36
         {
37
-            $model->tokens()->each(function($token){
37
+            $model->tokens()->each(function($token) {
38 38
 
39 39
                 \Core::users()->revokeAccessToken($token);
40 40
 
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
     /**
Please login to merge, or discard this patch.
src/Modules/Acl/Http/Controllers/UsersController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
      * to preform actions like (add, edit ... etc).
14 14
      * @var string
15 15
      */
16
-    protected $model               = 'users';
16
+    protected $model = 'users';
17 17
 
18 18
     /**
19 19
      * List of all route actions that the base api controller
@@ -27,14 +27,14 @@  discard block
 block discarded – undo
27 27
      * will skip login check for them.
28 28
      * @var array
29 29
      */
30
-    protected $skipLoginCheck      = ['login', 'loginSocial', 'register', 'sendreset', 'resetpassword', 'refreshtoken', 'confirmEmail', 'resendEmailConfirmation'];
30
+    protected $skipLoginCheck = ['login', 'loginSocial', 'register', 'sendreset', 'resetpassword', 'refreshtoken', 'confirmEmail', 'resendEmailConfirmation'];
31 31
 
32 32
     /**
33 33
      * The validations rules used by the base api controller
34 34
      * to check before add.
35 35
      * @var array
36 36
      */
37
-    protected $validationRules     = [
37
+    protected $validationRules = [
38 38
         'name'     => 'nullable|string', 
39 39
         'email'    => 'required|email|unique:users,email,{id}', 
40 40
         'password' => 'nullable|min:6'
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
         $this->validate($request, [
282 282
             'profile_picture' => 'nullable|string',
283 283
             'name'            => 'nullable|string', 
284
-            'email'           => 'required|email|unique:users,email,' . \Auth::id()
284
+            'email'           => 'required|email|unique:users,email,'.\Auth::id()
285 285
         ]);
286 286
 
287 287
         return \Response::json($this->repo->saveProfile($request->only('name', 'email', 'profile_picture')), 200);
Please login to merge, or discard this patch.
src/Modules/Acl/Repositories/UserRepository.php 1 patch
Spacing   +4 added lines, -4 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($userId, $groupIds)
82 82
     {
83
-        \DB::transaction(function () use ($userId, $groupIds) {
83
+        \DB::transaction(function() use ($userId, $groupIds) {
84 84
             $user = $this->find($userId);
85 85
             $user->groups()->detach();
86 86
             $user->groups()->attach($groupIds);
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
      */
251 251
     public function resetPassword($credentials)
252 252
     {
253
-        $response = \Password::reset($credentials, function ($user, $password) {
253
+        $response = \Password::reset($credentials, function($user, $password) {
254 254
             $user->password = $password;
255 255
             $user->save();
256 256
         });
Please login to merge, or discard this patch.
src/Modules/Core/Utl/Media.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -11,13 +11,13 @@  discard block
 block discarded – undo
11 11
      */
12 12
     public function uploadImage($image, $dir) 
13 13
     {
14
-       $imageName       =  str_slug('image' . uniqid() . time() . '_' . $image->getClientOriginalName());
15
-       $destinationPath = 'media' . DIRECTORY_SEPARATOR . $dir . DIRECTORY_SEPARATOR;
14
+       $imageName       = str_slug('image'.uniqid().time().'_'.$image->getClientOriginalName());
15
+       $destinationPath = 'media'.DIRECTORY_SEPARATOR.$dir.DIRECTORY_SEPARATOR;
16 16
 
17 17
        ! file_exists($destinationPath) ? \File::makeDirectory($destinationPath) : false;
18 18
        $image->move($destinationPath, $imageName);
19 19
 
20
-       return url($destinationPath . $imageName);
20
+       return url($destinationPath.$imageName);
21 21
     }
22 22
 
23 23
     /**
@@ -29,20 +29,20 @@  discard block
 block discarded – undo
29 29
      */
30 30
     public function uploadImageBas64($image, $dir) 
31 31
     {
32
-        if (! strlen($image)) 
32
+        if ( ! strlen($image)) 
33 33
         {
34 34
             return null;
35 35
         }
36 36
         
37
-        $imageName       = 'image' . uniqid() . time() . '.jpg';
38
-        $destinationPath = 'media' . DIRECTORY_SEPARATOR . $dir . DIRECTORY_SEPARATOR;
37
+        $imageName       = 'image'.uniqid().time().'.jpg';
38
+        $destinationPath = 'media'.DIRECTORY_SEPARATOR.$dir.DIRECTORY_SEPARATOR;
39 39
 
40 40
         ! file_exists($destinationPath) ? \File::makeDirectory($destinationPath) : false;
41 41
 
42
-        $base  = base64_decode(preg_replace('#^data:image/\w+;base64,#i', '', $image));
43
-        \Image::make($base)->save($destinationPath . $imageName);
42
+        $base = base64_decode(preg_replace('#^data:image/\w+;base64,#i', '', $image));
43
+        \Image::make($base)->save($destinationPath.$imageName);
44 44
 
45
-        return url($destinationPath . $imageName);
45
+        return url($destinationPath.$imageName);
46 46
     }
47 47
 
48 48
     /**
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
     public function deleteImage($path, $dir) 
56 56
     {   
57 57
         $arr      = explode('/', $path);
58
-        $path     = 'media' . DIRECTORY_SEPARATOR . $dir . DIRECTORY_SEPARATOR . end($arr);
58
+        $path     = 'media'.DIRECTORY_SEPARATOR.$dir.DIRECTORY_SEPARATOR.end($arr);
59 59
         if (\File::exists($path)) 
60 60
         {
61 61
             \File::delete($path);
Please login to merge, or discard this patch.