Completed
Push — master ( a0772e...0d52ea )
by Sherif
01:55
created
src/Modules/Core/Database/Factories/SettingFactory.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 $factory->define(App\Modules\Core\Setting::class, function (Faker\Generator $faker) {
4
-    return [
5
-        'name'       => $faker->randomElement(['Company Name', 'Title', 'Header Image']),
6
-        'value'      => $faker->word(),
7
-        'key'        => $faker->word(),
8
-        'created_at' => $faker->dateTimeBetween('-1 years', 'now'),
9
-        'updated_at' => $faker->dateTimeBetween('-1 years', 'now')
10
-    ];
4
+	return [
5
+		'name'       => $faker->randomElement(['Company Name', 'Title', 'Header Image']),
6
+		'value'      => $faker->word(),
7
+		'key'        => $faker->word(),
8
+		'created_at' => $faker->dateTimeBetween('-1 years', 'now'),
9
+		'updated_at' => $faker->dateTimeBetween('-1 years', 'now')
10
+	];
11 11
 });
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-$factory->define(App\Modules\Core\Setting::class, function (Faker\Generator $faker) {
3
+$factory->define(App\Modules\Core\Setting::class, function(Faker\Generator $faker) {
4 4
     return [
5 5
         'name'       => $faker->randomElement(['Company Name', 'Title', 'Header Image']),
6 6
         'value'      => $faker->word(),
Please login to merge, or discard this patch.
src/Modules/Core/Http/Middleware/SetRelations.php 1 patch
Indentation   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -9,43 +9,43 @@
 block discarded – undo
9 9
 
10 10
 class SetRelations
11 11
 {
12
-    protected $arr;
13
-    protected $route;
14
-    protected $config;
12
+	protected $arr;
13
+	protected $route;
14
+	protected $config;
15 15
     
16
-    /**
17
-     * Init new object.
18
-     *
19
-     * @param   Route  $route
20
-     * @param   Arr    $arr
21
-     * @param   Config $config
22
-     *
23
-     * @return  void
24
-     */
25
-    public function __construct(Route $route, Arr $arr, Config $config)
26
-    {
27
-        $this->arr = $arr;
28
-        $this->route = $route;
29
-        $this->config = $config->getConfig();
30
-    }
16
+	/**
17
+	 * Init new object.
18
+	 *
19
+	 * @param   Route  $route
20
+	 * @param   Arr    $arr
21
+	 * @param   Config $config
22
+	 *
23
+	 * @return  void
24
+	 */
25
+	public function __construct(Route $route, Arr $arr, Config $config)
26
+	{
27
+		$this->arr = $arr;
28
+		$this->route = $route;
29
+		$this->config = $config->getConfig();
30
+	}
31 31
 
32
-    /**
33
-     * Handle an incoming request.
34
-     *
35
-     * @param  \Illuminate\Http\Request  $request
36
-     * @param  \Closure  $next
37
-     * @return mixed
38
-     */
39
-    public function handle($request, Closure $next)
40
-    {
41
-        $routeActions       = explode('@', $this->route->currentRouteAction());
42
-        $modelName          = explode('\\', $routeActions[0]);
43
-        $modelName          = lcfirst(str_replace('Controller', '', end($modelName)));
44
-        $route              = explode('@', $this->route->currentRouteAction())[1];
45
-        $route              = $route !== 'index' ? $route : 'list';
46
-        $relations          = $this->arr->get($this->config['relations'], $modelName, false);
47
-        $request->relations = $relations && isset($relations[$route]) ? $relations[$route] : [];
32
+	/**
33
+	 * Handle an incoming request.
34
+	 *
35
+	 * @param  \Illuminate\Http\Request  $request
36
+	 * @param  \Closure  $next
37
+	 * @return mixed
38
+	 */
39
+	public function handle($request, Closure $next)
40
+	{
41
+		$routeActions       = explode('@', $this->route->currentRouteAction());
42
+		$modelName          = explode('\\', $routeActions[0]);
43
+		$modelName          = lcfirst(str_replace('Controller', '', end($modelName)));
44
+		$route              = explode('@', $this->route->currentRouteAction())[1];
45
+		$route              = $route !== 'index' ? $route : 'list';
46
+		$relations          = $this->arr->get($this->config['relations'], $modelName, false);
47
+		$request->relations = $relations && isset($relations[$route]) ? $relations[$route] : [];
48 48
 
49
-        return $next($request);
50
-    }
49
+		return $next($request);
50
+	}
51 51
 }
Please login to merge, or discard this patch.
src/Modules/Roles/Database/Factories/RoleFactory.php 2 patches
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.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-$factory->define(App\Modules\Roles\Role::class, function (Faker\Generator $faker) {
3
+$factory->define(App\Modules\Roles\Role::class, function(Faker\Generator $faker) {
4 4
     return [
5 5
         'name'       => $faker->unique->word(),
6 6
         'created_at' => $faker->dateTimeBetween('-1 years', 'now'),
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.
Database/Migrations/2016_06_01_000003_create_oauth_refresh_tokens_table.php 2 patches
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.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
      */
14 14
     public function up()
15 15
     {
16
-        Schema::create('oauth_refresh_tokens', function (Blueprint $table) {
16
+        Schema::create('oauth_refresh_tokens', function(Blueprint $table) {
17 17
             $table->string('id', 100)->primary();
18 18
             $table->string('access_token_id', 100);
19 19
             $table->boolean('revoked');
Please login to merge, or discard this patch.
src/Modules/Users/Http/Requests/AssignGroups.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 AssignRoles 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
-            'role_ids' => 'required|exists:roles,id',
28
-            'user_id'   => 'required|exists:users,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
+			'role_ids' => 'required|exists:roles,id',
28
+			'user_id'   => 'required|exists:users,id'
29
+		];
30
+	}
31 31
 }
Please login to merge, or discard this patch.
src/Modules/Permissions/Database/Factories/PermissionFactory.php 2 patches
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.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-$factory->define(App\Modules\Permissions\Permission::class, function (Faker\Generator $faker) {
3
+$factory->define(App\Modules\Permissions\Permission::class, function(Faker\Generator $faker) {
4 4
     return [
5 5
         'name'       => $faker->randomElement(['save', 'delete', 'find', 'paginate']),
6 6
         'model'      => $faker->randomElement(['users', 'roles', 'settings', 'notifications']),
Please login to merge, or discard this patch.