Completed
Pull Request — master (#1)
by
unknown
02:48 queued 20s
created
src/Modules/Core/Database/Seeds/AssignRelationsSeeder.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
 		/**
19 19
 		 * Assign the permissions to the admin group.
20 20
 		 */
21
-		\DB::table('permissions')->orderBy('created_at', 'asc')->whereIn('model', ['settings'])->each(function ($permission) use ($adminGroupId) {
21
+		\DB::table('permissions')->orderBy('created_at', 'asc')->whereIn('model', ['settings'])->each(function($permission) use ($adminGroupId) {
22 22
 			\DB::table('groups_permissions')->insert(
23 23
 				[
24 24
 				'permission_id' => $permission->id,
Please login to merge, or discard this patch.
src/Modules/Core/Database/Migrations/2016_01_24_123630_settings.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -12,10 +12,10 @@
 block discarded – undo
12 12
 	 */
13 13
 	public function up()
14 14
 	{
15
-		Schema::create('settings', function (Blueprint $table) {
15
+		Schema::create('settings', function(Blueprint $table) {
16 16
 			$table->increments('id');
17
-			$table->string('name',100);
18
-			$table->string('key',100)->unique();
17
+			$table->string('name', 100);
18
+			$table->string('key', 100)->unique();
19 19
 			$table->text('value')->nullable();
20 20
 			$table->softDeletes();
21 21
 			$table->timestamps();
Please login to merge, or discard this patch.
src/Modules/Acl/AclPermission.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
     
31 31
 	public function groups()
32 32
 	{
33
-		return $this->belongsToMany('\App\Modules\Acl\AclGroup','groups_permissions','permission_id','group_id')->whereNull('groups_permissions.deleted_at')->withTimestamps();
33
+		return $this->belongsToMany('\App\Modules\Acl\AclGroup', 'groups_permissions', 'permission_id', 'group_id')->whereNull('groups_permissions.deleted_at')->withTimestamps();
34 34
 	}
35 35
 
36 36
 	public static function boot()
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 2 patches
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.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -97,8 +97,7 @@
 block discarded – undo
97 97
 				}
98 98
 
99 99
 				$tokens[] = $device->device_token;
100
-			} 
101
-			catch (\Exception $e) 
100
+			} catch (\Exception $e) 
102 101
 			{
103 102
 				$device->forceDelete();
104 103
 			}
Please login to merge, or discard this patch.
src/Modules/Acl/Providers/RouteServiceProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 		Route::group([
55 55
 			'middleware' => 'web',
56 56
 			'namespace'  => $this->namespace,
57
-		], function ($router) {
57
+		], function($router) {
58 58
 			require module_path('acl', 'Routes/web.php');
59 59
 		});
60 60
 	}
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 			'middleware' => 'api',
73 73
 			'namespace'  => $this->namespace,
74 74
 			'prefix'     => 'api',
75
-		], function ($router) {
75
+		], function($router) {
76 76
 			require module_path('acl', 'Routes/api.php');
77 77
 		});
78 78
 	}
Please login to merge, or discard this patch.
src/Modules/Acl/AclGroup.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 block discarded – undo
3 3
 use Illuminate\Database\Eloquent\Model;
4 4
 use Illuminate\Database\Eloquent\SoftDeletes;
5 5
 
6
-class AclGroup extends Model{
6
+class AclGroup extends Model {
7 7
 
8 8
 	use SoftDeletes;
9 9
 	protected $table    = 'groups';
@@ -30,12 +30,12 @@  discard block
 block discarded – undo
30 30
 
31 31
 	public function users()
32 32
 	{
33
-		return $this->belongsToMany('\App\Modules\Acl\AclUser','users_groups','group_id','user_id')->whereNull('users_groups.deleted_at')->withTimestamps();
33
+		return $this->belongsToMany('\App\Modules\Acl\AclUser', 'users_groups', 'group_id', 'user_id')->whereNull('users_groups.deleted_at')->withTimestamps();
34 34
 	}
35 35
 
36 36
 	public function permissions()
37 37
 	{
38
-		return $this->belongsToMany('\App\Modules\Acl\AclPermission','groups_permissions','group_id','permission_id')->whereNull('groups_permissions.deleted_at')->withTimestamps();
38
+		return $this->belongsToMany('\App\Modules\Acl\AclPermission', 'groups_permissions', 'group_id', 'permission_id')->whereNull('groups_permissions.deleted_at')->withTimestamps();
39 39
 	}
40 40
 
41 41
 	public static function boot()
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/Http/Controllers/GroupsController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,14 +13,14 @@
 block discarded – undo
13 13
 	 * to preform actions like (add, edit ... etc).
14 14
 	 * @var string
15 15
 	 */
16
-	protected $model               = 'groups';
16
+	protected $model = 'groups';
17 17
 
18 18
 	/**
19 19
 	 * The validations rules used by the base api controller
20 20
 	 * to check before add.
21 21
 	 * @var array
22 22
 	 */
23
-	protected $validationRules  = [
23
+	protected $validationRules = [
24 24
 	'name' => 'required|string|max:100|unique:groups,name,{id}'
25 25
 	];
26 26
 
Please login to merge, or discard this patch.