Completed
Push — master ( 5050df...77fab1 )
by Sherif
01:58
created
src/Modules/Permissions/Database/Seeds/PermissionsTableSeeder.php 1 patch
Indentation   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -6,34 +6,34 @@
 block discarded – undo
6 6
 
7 7
 class PermissionsTableSeeder extends Seeder
8 8
 {
9
-    /**
10
-     * Run the database seeds.
11
-     *
12
-     * @return void
13
-     */
14
-    public function run()
15
-    {
16
-        /**
17
-         * Insert the permissions related to permissions table.
18
-         */
19
-        \DB::table('permissions')->insert(
20
-            [
21
-                /**
22
-                 * Permissions model permissions.
23
-                 */
24
-                [
25
-                'name'       => 'index',
26
-                'model'      => 'permission',
27
-                'created_at' => \DB::raw('NOW()'),
28
-                'updated_at' => \DB::raw('NOW()')
29
-                ],
30
-                [
31
-                'name'       => 'find',
32
-                'model'      => 'permission',
33
-                'created_at' => \DB::raw('NOW()'),
34
-                'updated_at' => \DB::raw('NOW()')
35
-                ],
36
-            ]
37
-        );
38
-    }
9
+	/**
10
+	 * Run the database seeds.
11
+	 *
12
+	 * @return void
13
+	 */
14
+	public function run()
15
+	{
16
+		/**
17
+		 * Insert the permissions related to permissions table.
18
+		 */
19
+		\DB::table('permissions')->insert(
20
+			[
21
+				/**
22
+				 * Permissions model permissions.
23
+				 */
24
+				[
25
+				'name'       => 'index',
26
+				'model'      => 'permission',
27
+				'created_at' => \DB::raw('NOW()'),
28
+				'updated_at' => \DB::raw('NOW()')
29
+				],
30
+				[
31
+				'name'       => 'find',
32
+				'model'      => 'permission',
33
+				'created_at' => \DB::raw('NOW()'),
34
+				'updated_at' => \DB::raw('NOW()')
35
+				],
36
+			]
37
+		);
38
+	}
39 39
 }
Please login to merge, or discard this patch.
src/Modules/Permissions/Database/Seeds/PermissionsDatabaseSeeder.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -6,15 +6,15 @@
 block discarded – undo
6 6
 
7 7
 class PermissionsDatabaseSeeder extends Seeder
8 8
 {
9
-    /**
10
-     * Run the database seeds.
11
-     *
12
-     * @return void
13
-     */
14
-    public function run()
15
-    {
16
-        $this->call(ClearDataSeeder::class);
17
-        $this->call(PermissionsTableSeeder::class);
18
-        $this->call(AssignRelationsSeeder::class);
19
-    }
9
+	/**
10
+	 * Run the database seeds.
11
+	 *
12
+	 * @return void
13
+	 */
14
+	public function run()
15
+	{
16
+		$this->call(ClearDataSeeder::class);
17
+		$this->call(PermissionsTableSeeder::class);
18
+		$this->call(AssignRelationsSeeder::class);
19
+	}
20 20
 }
Please login to merge, or discard this patch.
src/Modules/OauthClients/OauthClient.php 1 patch
Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -6,28 +6,28 @@
 block discarded – undo
6 6
 
7 7
 class OauthClient extends Client
8 8
 {
9
-    protected $dates    = ['created_at', 'updated_at'];
10
-    protected $fillable = ['name', 'redirect', 'user_id', 'personal_access_client', 'password_client', 'revoked'];
11
-    public $searchable  = ['name'];
9
+	protected $dates    = ['created_at', 'updated_at'];
10
+	protected $fillable = ['name', 'redirect', 'user_id', 'personal_access_client', 'password_client', 'revoked'];
11
+	public $searchable  = ['name'];
12 12
     
13
-    public function getCreatedAtAttribute($value)
14
-    {
15
-        return \Carbon\Carbon::parse($value)->tz(\Session::get('time-zone'))->toDateTimeString();
16
-    }
13
+	public function getCreatedAtAttribute($value)
14
+	{
15
+		return \Carbon\Carbon::parse($value)->tz(\Session::get('time-zone'))->toDateTimeString();
16
+	}
17 17
 
18
-    public function getUpdatedAtAttribute($value)
19
-    {
20
-        return \Carbon\Carbon::parse($value)->tz(\Session::get('time-zone'))->toDateTimeString();
21
-    }
18
+	public function getUpdatedAtAttribute($value)
19
+	{
20
+		return \Carbon\Carbon::parse($value)->tz(\Session::get('time-zone'))->toDateTimeString();
21
+	}
22 22
     
23
-    public function user()
24
-    {
25
-        return $this->belongsTo('App\Modules\Users\AclUser');
26
-    }
23
+	public function user()
24
+	{
25
+		return $this->belongsTo('App\Modules\Users\AclUser');
26
+	}
27 27
     
28
-    public static function boot()
29
-    {
30
-        parent::boot();
31
-        OauthClient::observe(\App::make('App\Modules\OauthClients\ModelObservers\OauthClientObserver'));
32
-    }
28
+	public static function boot()
29
+	{
30
+		parent::boot();
31
+		OauthClient::observe(\App::make('App\Modules\OauthClients\ModelObservers\OauthClientObserver'));
32
+	}
33 33
 }
Please login to merge, or discard this patch.
src/Modules/OauthClients/Repositories/OauthClientRepository.php 1 patch
Indentation   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -5,38 +5,38 @@
 block discarded – undo
5 5
 
6 6
 class OauthClientRepository extends BaseRepository
7 7
 {
8
-    /**
9
-     * Init new object.
10
-     *
11
-     * @param   OauthClient $model
12
-     * @return  void
13
-     */
14
-    public function __construct(OauthClient $model)
15
-    {
16
-        parent::__construct($model);
17
-    }
8
+	/**
9
+	 * Init new object.
10
+	 *
11
+	 * @param   OauthClient $model
12
+	 * @return  void
13
+	 */
14
+	public function __construct(OauthClient $model)
15
+	{
16
+		parent::__construct($model);
17
+	}
18 18
 
19
-    /**
20
-     * Revoke the given client.
21
-     *
22
-     * @param  integer  $clientId
23
-     * @return void
24
-     */
25
-    public function revoke($clientId)
26
-    {
27
-        $client = $this->find($clientId);
28
-        $client->tokens()->update(['revoked' => true]);
29
-        $this->save(['id'=> $clientId, 'revoked' => true]);
30
-    }
19
+	/**
20
+	 * Revoke the given client.
21
+	 *
22
+	 * @param  integer  $clientId
23
+	 * @return void
24
+	 */
25
+	public function revoke($clientId)
26
+	{
27
+		$client = $this->find($clientId);
28
+		$client->tokens()->update(['revoked' => true]);
29
+		$this->save(['id'=> $clientId, 'revoked' => true]);
30
+	}
31 31
 
32
-    /**
33
-     * Un revoke the given client.
34
-     *
35
-     * @param  integer  $clientId
36
-     * @return void
37
-     */
38
-    public function unRevoke($clientId)
39
-    {
40
-        $this->save(['id'=> $clientId, 'revoked' => false]);
41
-    }
32
+	/**
33
+	 * Un revoke the given client.
34
+	 *
35
+	 * @param  integer  $clientId
36
+	 * @return void
37
+	 */
38
+	public function unRevoke($clientId)
39
+	{
40
+		$this->save(['id'=> $clientId, 'revoked' => false]);
41
+	}
42 42
 }
Please login to merge, or discard this patch.
src/Modules/OauthClients/ModelObservers/OauthClientObserver.php 1 patch
Indentation   +49 added lines, -49 removed lines patch added patch discarded remove patch
@@ -8,53 +8,53 @@
 block discarded – undo
8 8
 class OauthClientObserver
9 9
 {
10 10
 
11
-    public function saving($model)
12
-    {
13
-        //
14
-    }
15
-
16
-    public function saved($model)
17
-    {
18
-        //
19
-    }
20
-
21
-    public function creating($model)
22
-    {
23
-        $model->secret = Str::random(40);
24
-    }
25
-
26
-    public function created($model)
27
-    {
28
-        //
29
-    }
30
-
31
-    public function updating($model)
32
-    {
33
-        //
34
-    }
35
-
36
-    public function updated($model)
37
-    {
38
-        //
39
-    }
40
-
41
-    public function deleting($model)
42
-    {
43
-        //
44
-    }
45
-
46
-    public function deleted($model)
47
-    {
48
-        //
49
-    }
50
-
51
-    public function restoring($model)
52
-    {
53
-        //
54
-    }
55
-
56
-    public function restored($model)
57
-    {
58
-        //
59
-    }
11
+	public function saving($model)
12
+	{
13
+		//
14
+	}
15
+
16
+	public function saved($model)
17
+	{
18
+		//
19
+	}
20
+
21
+	public function creating($model)
22
+	{
23
+		$model->secret = Str::random(40);
24
+	}
25
+
26
+	public function created($model)
27
+	{
28
+		//
29
+	}
30
+
31
+	public function updating($model)
32
+	{
33
+		//
34
+	}
35
+
36
+	public function updated($model)
37
+	{
38
+		//
39
+	}
40
+
41
+	public function deleting($model)
42
+	{
43
+		//
44
+	}
45
+
46
+	public function deleted($model)
47
+	{
48
+		//
49
+	}
50
+
51
+	public function restoring($model)
52
+	{
53
+		//
54
+	}
55
+
56
+	public function restored($model)
57
+	{
58
+		//
59
+	}
60 60
 }
Please login to merge, or discard this patch.
src/Modules/OauthClients/Routes/api.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
 |
12 12
 */
13 13
 
14
-Route::group(['prefix' => 'oauth/clients'], function () {
14
+Route::group(['prefix' => 'oauth/clients'], function() {
15 15
         
16 16
     Route::get('/', 'OauthClientController@index');
17 17
     Route::get('/{id}', 'OauthClientController@find');
Please login to merge, or discard this patch.
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -13,10 +13,10 @@
 block discarded – undo
13 13
 
14 14
 Route::group(['prefix' => 'oauth/clients'], function () {
15 15
         
16
-    Route::get('/', 'OauthClientController@index');
17
-    Route::get('/{id}', 'OauthClientController@find');
18
-    Route::post('/', 'OauthClientController@insert');
19
-    Route::put('/', 'OauthClientController@update');
20
-    Route::get('revoke/{id}', 'OauthClientController@revoke');
21
-    Route::get('unrevoke/{id}', 'OauthClientController@unRevoke');
16
+	Route::get('/', 'OauthClientController@index');
17
+	Route::get('/{id}', 'OauthClientController@find');
18
+	Route::post('/', 'OauthClientController@insert');
19
+	Route::put('/', 'OauthClientController@update');
20
+	Route::get('revoke/{id}', 'OauthClientController@revoke');
21
+	Route::get('unrevoke/{id}', 'OauthClientController@unRevoke');
22 22
 });
Please login to merge, or discard this patch.
src/Modules/OauthClients/Providers/ModuleServiceProvider.php 1 patch
Indentation   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -6,27 +6,27 @@
 block discarded – undo
6 6
 
7 7
 class ModuleServiceProvider extends ServiceProvider
8 8
 {
9
-    /**
10
-     * Bootstrap the module services.
11
-     *
12
-     * @return void
13
-     */
14
-    public function boot()
15
-    {
16
-        $this->loadTranslationsFrom(__DIR__.'/../Resources/Lang', 'oauth-clients');
17
-        $this->loadViewsFrom(__DIR__.'/../Resources/Views', 'oauth-clients');
9
+	/**
10
+	 * Bootstrap the module services.
11
+	 *
12
+	 * @return void
13
+	 */
14
+	public function boot()
15
+	{
16
+		$this->loadTranslationsFrom(__DIR__.'/../Resources/Lang', 'oauth-clients');
17
+		$this->loadViewsFrom(__DIR__.'/../Resources/Views', 'oauth-clients');
18 18
 
19
-        $this->loadMigrationsFrom(module_path('oauth-clients', 'Database/Migrations', 'app'));
20
-        $this->loadFactoriesFrom(module_path('oauth-clients', 'Database/Factories', 'app'));
21
-    }
19
+		$this->loadMigrationsFrom(module_path('oauth-clients', 'Database/Migrations', 'app'));
20
+		$this->loadFactoriesFrom(module_path('oauth-clients', 'Database/Factories', 'app'));
21
+	}
22 22
 
23
-    /**
24
-     * Register the module services.
25
-     *
26
-     * @return void
27
-     */
28
-    public function register()
29
-    {
30
-        $this->app->register(RouteServiceProvider::class);
31
-    }
23
+	/**
24
+	 * Register the module services.
25
+	 *
26
+	 * @return void
27
+	 */
28
+	public function register()
29
+	{
30
+		$this->app->register(RouteServiceProvider::class);
31
+	}
32 32
 }
Please login to merge, or discard this patch.
src/Modules/OauthClients/Providers/RouteServiceProvider.php 2 patches
Indentation   +62 added lines, -62 removed lines patch added patch discarded remove patch
@@ -7,73 +7,73 @@
 block discarded – undo
7 7
 
8 8
 class RouteServiceProvider extends ServiceProvider
9 9
 {
10
-    /**
11
-     * This namespace is applied to your controller routes.
12
-     *
13
-     * In addition, it is set as the URL generator's root namespace.
14
-     *
15
-     * @var string
16
-     */
17
-    protected $namespace = 'App\Modules\OauthClients\Http\Controllers';
10
+	/**
11
+	 * This namespace is applied to your controller routes.
12
+	 *
13
+	 * In addition, it is set as the URL generator's root namespace.
14
+	 *
15
+	 * @var string
16
+	 */
17
+	protected $namespace = 'App\Modules\OauthClients\Http\Controllers';
18 18
 
19
-    /**
20
-     * Define your route model bindings, pattern filters, etc.
21
-     *
22
-     * @return void
23
-     */
24
-    public function boot()
25
-    {
26
-        //
19
+	/**
20
+	 * Define your route model bindings, pattern filters, etc.
21
+	 *
22
+	 * @return void
23
+	 */
24
+	public function boot()
25
+	{
26
+		//
27 27
 
28
-        parent::boot();
29
-    }
28
+		parent::boot();
29
+	}
30 30
 
31
-    /**
32
-     * Define the routes for the module.
33
-     *
34
-     * @return void
35
-     */
36
-    public function map()
37
-    {
38
-        $this->mapWebRoutes();
31
+	/**
32
+	 * Define the routes for the module.
33
+	 *
34
+	 * @return void
35
+	 */
36
+	public function map()
37
+	{
38
+		$this->mapWebRoutes();
39 39
 
40
-        $this->mapApiRoutes();
40
+		$this->mapApiRoutes();
41 41
 
42
-        //
43
-    }
42
+		//
43
+	}
44 44
 
45
-    /**
46
-     * Define the "web" routes for the module.
47
-     *
48
-     * These routes all receive session state, CSRF protection, etc.
49
-     *
50
-     * @return void
51
-     */
52
-    protected function mapWebRoutes()
53
-    {
54
-        Route::group([
55
-            'middleware' => 'web',
56
-            'namespace'  => $this->namespace,
57
-        ], function ($router) {
58
-            require module_path('oauth-clients', 'Routes/web.php', 'app');
59
-        });
60
-    }
45
+	/**
46
+	 * Define the "web" routes for the module.
47
+	 *
48
+	 * These routes all receive session state, CSRF protection, etc.
49
+	 *
50
+	 * @return void
51
+	 */
52
+	protected function mapWebRoutes()
53
+	{
54
+		Route::group([
55
+			'middleware' => 'web',
56
+			'namespace'  => $this->namespace,
57
+		], function ($router) {
58
+			require module_path('oauth-clients', 'Routes/web.php', 'app');
59
+		});
60
+	}
61 61
 
62
-    /**
63
-     * Define the "api" routes for the module.
64
-     *
65
-     * These routes are typically stateless.
66
-     *
67
-     * @return void
68
-     */
69
-    protected function mapApiRoutes()
70
-    {
71
-        Route::group([
72
-            'middleware' => 'api',
73
-            'namespace'  => $this->namespace,
74
-            'prefix'     => 'api',
75
-        ], function ($router) {
76
-            require module_path('oauth-clients', 'Routes/api.php', 'app');
77
-        });
78
-    }
62
+	/**
63
+	 * Define the "api" routes for the module.
64
+	 *
65
+	 * These routes are typically stateless.
66
+	 *
67
+	 * @return void
68
+	 */
69
+	protected function mapApiRoutes()
70
+	{
71
+		Route::group([
72
+			'middleware' => 'api',
73
+			'namespace'  => $this->namespace,
74
+			'prefix'     => 'api',
75
+		], function ($router) {
76
+			require module_path('oauth-clients', 'Routes/api.php', 'app');
77
+		});
78
+	}
79 79
 }
Please login to merge, or discard this 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('oauth-clients', 'Routes/web.php', 'app');
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('oauth-clients', 'Routes/api.php', 'app');
77 77
         });
78 78
     }
Please login to merge, or discard this patch.
src/Modules/OauthClients/Database/Factories/OauthClientFactory.php 2 patches
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,15 +1,15 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 $factory->define(App\Modules\OauthClients\OauthClient::class, function (Faker\Generator $faker) {
4
-    return [
5
-        'user_id'                => $faker->randomDigit(),
6
-        'name'                   => $faker->name(),
7
-        'secret'                 => \Illuminate\Support\Str::random(40),
8
-        'redirect'               => $faker->url(),
9
-        'personal_access_client' => 0,
10
-        'password_client'        => 0,
11
-        'revoked'                => $faker->boolean(),
12
-        'created_at'             => $faker->dateTimeBetween('-1 years', 'now'),
13
-        'updated_at'             => $faker->dateTimeBetween('-1 years', 'now')
14
-    ];
4
+	return [
5
+		'user_id'                => $faker->randomDigit(),
6
+		'name'                   => $faker->name(),
7
+		'secret'                 => \Illuminate\Support\Str::random(40),
8
+		'redirect'               => $faker->url(),
9
+		'personal_access_client' => 0,
10
+		'password_client'        => 0,
11
+		'revoked'                => $faker->boolean(),
12
+		'created_at'             => $faker->dateTimeBetween('-1 years', 'now'),
13
+		'updated_at'             => $faker->dateTimeBetween('-1 years', 'now')
14
+	];
15 15
 });
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\OauthClients\OauthClient::class, function (Faker\Generator $faker) {
3
+$factory->define(App\Modules\OauthClients\OauthClient::class, function(Faker\Generator $faker) {
4 4
     return [
5 5
         'user_id'                => $faker->randomDigit(),
6 6
         'name'                   => $faker->name(),
Please login to merge, or discard this patch.