Completed
Push — master ( f30158...bfbb50 )
by Sherif
02:18
created
src/Modules/Roles/Database/Factories/RoleFactory.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 $factory->define(App\Modules\Roles\Role::class, function (Faker\Generator $faker) {
4
-    return [
5
-        'name'       => $faker->unique->word(),
6
-        'created_at' => $faker->dateTimeBetween('-1 years', 'now'),
7
-        'updated_at' => $faker->dateTimeBetween('-1 years', 'now')
8
-    ];
4
+	return [
5
+		'name'       => $faker->unique->word(),
6
+		'created_at' => $faker->dateTimeBetween('-1 years', 'now'),
7
+		'updated_at' => $faker->dateTimeBetween('-1 years', 'now')
8
+	];
9 9
 });
Please login to merge, or discard this patch.
src/Modules/Roles/Http/Requests/AssignPermissions.php 1 patch
Indentation   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -6,26 +6,26 @@
 block discarded – undo
6 6
 
7 7
 class AssignPermissions extends FormRequest
8 8
 {
9
-    /**
10
-     * Determine if the user is authorized to make this request.
11
-     *
12
-     * @return bool
13
-     */
14
-    public function authorize()
15
-    {
16
-        return true;
17
-    }
9
+	/**
10
+	 * Determine if the user is authorized to make this request.
11
+	 *
12
+	 * @return bool
13
+	 */
14
+	public function authorize()
15
+	{
16
+		return true;
17
+	}
18 18
 
19
-    /**
20
-     * Get the validation rules that apply to the request.
21
-     *
22
-     * @return array
23
-     */
24
-    public function rules()
25
-    {
26
-        return [
27
-            'permission_ids' => 'required|exists:permissions,id',
28
-            'role_id'       => 'required|array|exists:roles,id'
29
-        ];
30
-    }
19
+	/**
20
+	 * Get the validation rules that apply to the request.
21
+	 *
22
+	 * @return array
23
+	 */
24
+	public function rules()
25
+	{
26
+		return [
27
+			'permission_ids' => 'required|exists:permissions,id',
28
+			'role_id'       => 'required|array|exists:roles,id'
29
+		];
30
+	}
31 31
 }
Please login to merge, or discard this patch.
src/Modules/Roles/Http/Requests/UpdateRole.php 1 patch
Indentation   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -6,26 +6,26 @@
 block discarded – undo
6 6
 
7 7
 class UpdateRole extends FormRequest
8 8
 {
9
-    /**
10
-     * Determine if the user is authorized to make this request.
11
-     *
12
-     * @return bool
13
-     */
14
-    public function authorize()
15
-    {
16
-        return true;
17
-    }
9
+	/**
10
+	 * Determine if the user is authorized to make this request.
11
+	 *
12
+	 * @return bool
13
+	 */
14
+	public function authorize()
15
+	{
16
+		return true;
17
+	}
18 18
 
19
-    /**
20
-     * Get the validation rules that apply to the request.
21
-     *
22
-     * @return array
23
-     */
24
-    public function rules()
25
-    {
26
-        return [
27
-            'id'   => 'required|exists:roles,id',
28
-            'name' => 'required|string|max:100|unique:roles,name,'.$this->get('id')
29
-        ];
30
-    }
19
+	/**
20
+	 * Get the validation rules that apply to the request.
21
+	 *
22
+	 * @return array
23
+	 */
24
+	public function rules()
25
+	{
26
+		return [
27
+			'id'   => 'required|exists:roles,id',
28
+			'name' => 'required|string|max:100|unique:roles,name,'.$this->get('id')
29
+		];
30
+	}
31 31
 }
Please login to merge, or discard this patch.
src/Modules/Roles/Http/Requests/InsertRole.php 1 patch
Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -6,25 +6,25 @@
 block discarded – undo
6 6
 
7 7
 class InsertRole extends FormRequest
8 8
 {
9
-    /**
10
-     * Determine if the user is authorized to make this request.
11
-     *
12
-     * @return bool
13
-     */
14
-    public function authorize()
15
-    {
16
-        return true;
17
-    }
9
+	/**
10
+	 * Determine if the user is authorized to make this request.
11
+	 *
12
+	 * @return bool
13
+	 */
14
+	public function authorize()
15
+	{
16
+		return true;
17
+	}
18 18
 
19
-    /**
20
-     * Get the validation rules that apply to the request.
21
-     *
22
-     * @return array
23
-     */
24
-    public function rules()
25
-    {
26
-        return [
27
-            'name' => 'required|string|max:100|unique:roles,name,'.$this->get('id')
28
-        ];
29
-    }
19
+	/**
20
+	 * Get the validation rules that apply to the request.
21
+	 *
22
+	 * @return array
23
+	 */
24
+	public function rules()
25
+	{
26
+		return [
27
+			'name' => 'required|string|max:100|unique:roles,name,'.$this->get('id')
28
+		];
29
+	}
30 30
 }
Please login to merge, or discard this patch.
src/Modules/Roles/Http/Resources/Role.php 1 patch
Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -8,25 +8,25 @@
 block discarded – undo
8 8
 
9 9
 class Role extends JsonResource
10 10
 {
11
-    /**
12
-     * Transform the resource into an array.
13
-     *
14
-     * @param Request $request
15
-     * @return array
16
-     */
17
-    public function toArray($request)
18
-    {
19
-        if (! $this->resource) {
20
-            return [];
21
-        }
11
+	/**
12
+	 * Transform the resource into an array.
13
+	 *
14
+	 * @param Request $request
15
+	 * @return array
16
+	 */
17
+	public function toArray($request)
18
+	{
19
+		if (! $this->resource) {
20
+			return [];
21
+		}
22 22
 
23
-        return [
24
-            'id' => $this->id,
25
-            'name' => $this->name,
26
-            'users' => UserResource::collection($this->whenLoaded('users')),
27
-            'permissions' => PermissionResource::collection($this->whenLoaded('permissions')),
28
-            'created_at' => $this->created_at,
29
-            'updated_at' => $this->updated_at,
30
-        ];
31
-    }
23
+		return [
24
+			'id' => $this->id,
25
+			'name' => $this->name,
26
+			'users' => UserResource::collection($this->whenLoaded('users')),
27
+			'permissions' => PermissionResource::collection($this->whenLoaded('permissions')),
28
+			'created_at' => $this->created_at,
29
+			'updated_at' => $this->updated_at,
30
+		];
31
+	}
32 32
 }
Please login to merge, or discard this patch.
Database/Migrations/2016_06_01_000003_create_oauth_refresh_tokens_table.php 1 patch
Indentation   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -6,30 +6,30 @@
 block discarded – undo
6 6
 
7 7
 class CreateOauthRefreshTokensTable extends Migration
8 8
 {
9
-    /**
10
-     * Run the migrations.
11
-     *
12
-     * @return void
13
-     */
14
-    public function up()
15
-    {
16
-        Schema::create('oauth_refresh_tokens', function (Blueprint $table) {
17
-            $table->string('id', 100)->primary();
18
-            $table->string('access_token_id', 100);
19
-            $table->boolean('revoked');
20
-            $table->dateTime('expires_at')->nullable();
9
+	/**
10
+	 * Run the migrations.
11
+	 *
12
+	 * @return void
13
+	 */
14
+	public function up()
15
+	{
16
+		Schema::create('oauth_refresh_tokens', function (Blueprint $table) {
17
+			$table->string('id', 100)->primary();
18
+			$table->string('access_token_id', 100);
19
+			$table->boolean('revoked');
20
+			$table->dateTime('expires_at')->nullable();
21 21
 
22
-            $table->foreign('access_token_id')->references('id')->on('oauth_access_tokens');
23
-        });
24
-    }
22
+			$table->foreign('access_token_id')->references('id')->on('oauth_access_tokens');
23
+		});
24
+	}
25 25
 
26
-    /**
27
-     * Reverse the migrations.
28
-     *
29
-     * @return void
30
-     */
31
-    public function down()
32
-    {
33
-        Schema::drop('oauth_refresh_tokens');
34
-    }
26
+	/**
27
+	 * Reverse the migrations.
28
+	 *
29
+	 * @return void
30
+	 */
31
+	public function down()
32
+	{
33
+		Schema::drop('oauth_refresh_tokens');
34
+	}
35 35
 }
Please login to merge, or discard this patch.
src/Modules/Users/Http/Resources/AclUser.php 1 patch
Indentation   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -9,32 +9,32 @@
 block discarded – undo
9 9
 
10 10
 class AclUser extends JsonResource
11 11
 {
12
-    /**
13
-     * Transform the resource into an array.
14
-     *
15
-     * @param Request $request
16
-     * @return array
17
-     */
18
-    public function toArray($request)
19
-    {
20
-        if (! $this->resource) {
21
-            return [];
22
-        }
12
+	/**
13
+	 * Transform the resource into an array.
14
+	 *
15
+	 * @param Request $request
16
+	 * @return array
17
+	 */
18
+	public function toArray($request)
19
+	{
20
+		if (! $this->resource) {
21
+			return [];
22
+		}
23 23
 
24
-        return [
25
-            'id' => $this->id,
26
-            'name' => $this->name,
27
-            'email' => $this->email,
28
-            'profilePicture' => $this->profile_picture,
29
-            'notifications' => NotificationResource::collection($this->whenLoaded('notifications')),
30
-            'readNotifications' => NotificationResource::collection($this->whenLoaded('readNotifications')),
31
-            'unreadNotifications' => NotificationResource::collection($this->whenLoaded('unreadNotifications')),
32
-            'roles' => RoleResource::collection($this->whenLoaded('roles')),
33
-            'oauthClients' => OauthClientResource::collection($this->whenLoaded('oauthClients')),
34
-            'locale' => $this->locale,
35
-            'timezone' => $this->timezone,
36
-            'created_at' => $this->created_at,
37
-            'updated_at' => $this->updated_at,
38
-        ];
39
-    }
24
+		return [
25
+			'id' => $this->id,
26
+			'name' => $this->name,
27
+			'email' => $this->email,
28
+			'profilePicture' => $this->profile_picture,
29
+			'notifications' => NotificationResource::collection($this->whenLoaded('notifications')),
30
+			'readNotifications' => NotificationResource::collection($this->whenLoaded('readNotifications')),
31
+			'unreadNotifications' => NotificationResource::collection($this->whenLoaded('unreadNotifications')),
32
+			'roles' => RoleResource::collection($this->whenLoaded('roles')),
33
+			'oauthClients' => OauthClientResource::collection($this->whenLoaded('oauthClients')),
34
+			'locale' => $this->locale,
35
+			'timezone' => $this->timezone,
36
+			'created_at' => $this->created_at,
37
+			'updated_at' => $this->updated_at,
38
+		];
39
+	}
40 40
 }
Please login to merge, or discard this patch.
src/Modules/Permissions/Database/Factories/PermissionFactory.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 $factory->define(App\Modules\Permissions\Permission::class, function (Faker\Generator $faker) {
4
-    return [
5
-        'name'       => $faker->randomElement(['save', 'delete', 'find', 'paginate']),
6
-        'model'      => $faker->randomElement(['users', 'roles', 'settings', 'notifications']),
7
-        'created_at' => $faker->dateTimeBetween('-1 years', 'now'),
8
-        'updated_at' => $faker->dateTimeBetween('-1 years', 'now')
9
-    ];
4
+	return [
5
+		'name'       => $faker->randomElement(['save', 'delete', 'find', 'paginate']),
6
+		'model'      => $faker->randomElement(['users', 'roles', 'settings', 'notifications']),
7
+		'created_at' => $faker->dateTimeBetween('-1 years', 'now'),
8
+		'updated_at' => $faker->dateTimeBetween('-1 years', 'now')
9
+	];
10 10
 });
Please login to merge, or discard this patch.
src/Modules/Permissions/Http/Resources/Permission.php 1 patch
Indentation   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -7,24 +7,24 @@
 block discarded – undo
7 7
 
8 8
 class Permission extends JsonResource
9 9
 {
10
-    /**
11
-     * Transform the resource into an array.
12
-     *
13
-     * @param Request $request
14
-     * @return array
15
-     */
16
-    public function toArray($request)
17
-    {
18
-        if (! $this->resource) {
19
-            return [];
20
-        }
10
+	/**
11
+	 * Transform the resource into an array.
12
+	 *
13
+	 * @param Request $request
14
+	 * @return array
15
+	 */
16
+	public function toArray($request)
17
+	{
18
+		if (! $this->resource) {
19
+			return [];
20
+		}
21 21
 
22
-        return [
23
-            'id' => $this->id,
24
-            'name' => $this->name,
25
-            'roles' => RoleResource::collection($this->whenLoaded('roles')),
26
-            'created_at' => $this->created_at,
27
-            'updated_at' => $this->updated_at,
28
-        ];
29
-    }
22
+		return [
23
+			'id' => $this->id,
24
+			'name' => $this->name,
25
+			'roles' => RoleResource::collection($this->whenLoaded('roles')),
26
+			'created_at' => $this->created_at,
27
+			'updated_at' => $this->updated_at,
28
+		];
29
+	}
30 30
 }
Please login to merge, or discard this patch.