Completed
Push — master ( 91df31...876b8b )
by Sherif
01:12
created
src/Modules/OauthClients/Providers/ModuleServiceProvider.php 2 patches
Indentation   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -6,29 +6,29 @@
 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
-        if (!$this->app->configurationIsCached()) {
21
-            $this->loadConfigsFrom(module_path('oauth-clients', 'Config', 'app'));
22
-        }
23
-    }
19
+		$this->loadMigrationsFrom(module_path('oauth-clients', 'Database/Migrations', 'app'));
20
+		if (!$this->app->configurationIsCached()) {
21
+			$this->loadConfigsFrom(module_path('oauth-clients', 'Config', 'app'));
22
+		}
23
+	}
24 24
 
25
-    /**
26
-     * Register the module services.
27
-     *
28
-     * @return void
29
-     */
30
-    public function register()
31
-    {
32
-        $this->app->register(RouteServiceProvider::class);
33
-    }
25
+	/**
26
+	 * Register the module services.
27
+	 *
28
+	 * @return void
29
+	 */
30
+	public function register()
31
+	{
32
+		$this->app->register(RouteServiceProvider::class);
33
+	}
34 34
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
         $this->loadViewsFrom(__DIR__.'/../Resources/Views', 'oauth-clients');
18 18
 
19 19
         $this->loadMigrationsFrom(module_path('oauth-clients', 'Database/Migrations', 'app'));
20
-        if (!$this->app->configurationIsCached()) {
20
+        if ( ! $this->app->configurationIsCached()) {
21 21
             $this->loadConfigsFrom(module_path('oauth-clients', 'Config', 'app'));
22 22
         }
23 23
     }
Please login to merge, or discard this patch.
Migrations/2016_06_01_000005_create_oauth_personal_access_clients_table.php 2 patches
Indentation   +46 added lines, -46 removed lines patch added patch discarded remove patch
@@ -6,54 +6,54 @@
 block discarded – undo
6 6
 
7 7
 class CreateOauthPersonalAccessClientsTable extends Migration
8 8
 {
9
-    /**
10
-     * The database schema.
11
-     *
12
-     * @var \Illuminate\Database\Schema\Builder
13
-     */
14
-    protected $schema;
9
+	/**
10
+	 * The database schema.
11
+	 *
12
+	 * @var \Illuminate\Database\Schema\Builder
13
+	 */
14
+	protected $schema;
15 15
 
16
-    /**
17
-     * Create a new migration instance.
18
-     *
19
-     * @return void
20
-     */
21
-    public function __construct()
22
-    {
23
-        $this->schema = Schema::connection($this->getConnection());
24
-    }
16
+	/**
17
+	 * Create a new migration instance.
18
+	 *
19
+	 * @return void
20
+	 */
21
+	public function __construct()
22
+	{
23
+		$this->schema = Schema::connection($this->getConnection());
24
+	}
25 25
 
26
-    /**
27
-     * Run the migrations.
28
-     *
29
-     * @return void
30
-     */
31
-    public function up()
32
-    {
33
-        $this->schema->create('oauth_personal_access_clients', function (Blueprint $table) {
34
-            $table->bigIncrements('id');
35
-            $table->unsignedBigInteger('client_id');
36
-            $table->timestamps();
37
-        });
38
-    }
26
+	/**
27
+	 * Run the migrations.
28
+	 *
29
+	 * @return void
30
+	 */
31
+	public function up()
32
+	{
33
+		$this->schema->create('oauth_personal_access_clients', function (Blueprint $table) {
34
+			$table->bigIncrements('id');
35
+			$table->unsignedBigInteger('client_id');
36
+			$table->timestamps();
37
+		});
38
+	}
39 39
 
40
-    /**
41
-     * Reverse the migrations.
42
-     *
43
-     * @return void
44
-     */
45
-    public function down()
46
-    {
47
-        $this->schema->dropIfExists('oauth_personal_access_clients');
48
-    }
40
+	/**
41
+	 * Reverse the migrations.
42
+	 *
43
+	 * @return void
44
+	 */
45
+	public function down()
46
+	{
47
+		$this->schema->dropIfExists('oauth_personal_access_clients');
48
+	}
49 49
 
50
-    /**
51
-     * Get the migration connection name.
52
-     *
53
-     * @return string|null
54
-     */
55
-    public function getConnection()
56
-    {
57
-        return config('passport.storage.database.connection');
58
-    }
50
+	/**
51
+	 * Get the migration connection name.
52
+	 *
53
+	 * @return string|null
54
+	 */
55
+	public function getConnection()
56
+	{
57
+		return config('passport.storage.database.connection');
58
+	}
59 59
 }
Please login to merge, or discard this 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 up()
32 32
     {
33
-        $this->schema->create('oauth_personal_access_clients', function (Blueprint $table) {
33
+        $this->schema->create('oauth_personal_access_clients', function(Blueprint $table) {
34 34
             $table->bigIncrements('id');
35 35
             $table->unsignedBigInteger('client_id');
36 36
             $table->timestamps();
Please login to merge, or discard this patch.
Database/Migrations/2016_06_01_000003_create_oauth_refresh_tokens_table.php 2 patches
Indentation   +47 added lines, -47 removed lines patch added patch discarded remove patch
@@ -6,55 +6,55 @@
 block discarded – undo
6 6
 
7 7
 class CreateOauthRefreshTokensTable extends Migration
8 8
 {
9
-    /**
10
-     * The database schema.
11
-     *
12
-     * @var \Illuminate\Database\Schema\Builder
13
-     */
14
-    protected $schema;
9
+	/**
10
+	 * The database schema.
11
+	 *
12
+	 * @var \Illuminate\Database\Schema\Builder
13
+	 */
14
+	protected $schema;
15 15
 
16
-    /**
17
-     * Create a new migration instance.
18
-     *
19
-     * @return void
20
-     */
21
-    public function __construct()
22
-    {
23
-        $this->schema = Schema::connection($this->getConnection());
24
-    }
16
+	/**
17
+	 * Create a new migration instance.
18
+	 *
19
+	 * @return void
20
+	 */
21
+	public function __construct()
22
+	{
23
+		$this->schema = Schema::connection($this->getConnection());
24
+	}
25 25
 
26
-    /**
27
-     * Run the migrations.
28
-     *
29
-     * @return void
30
-     */
31
-    public function up()
32
-    {
33
-        $this->schema->create('oauth_refresh_tokens', function (Blueprint $table) {
34
-            $table->string('id', 100)->primary();
35
-            $table->string('access_token_id', 100)->index();
36
-            $table->boolean('revoked');
37
-            $table->dateTime('expires_at')->nullable();
38
-        });
39
-    }
26
+	/**
27
+	 * Run the migrations.
28
+	 *
29
+	 * @return void
30
+	 */
31
+	public function up()
32
+	{
33
+		$this->schema->create('oauth_refresh_tokens', function (Blueprint $table) {
34
+			$table->string('id', 100)->primary();
35
+			$table->string('access_token_id', 100)->index();
36
+			$table->boolean('revoked');
37
+			$table->dateTime('expires_at')->nullable();
38
+		});
39
+	}
40 40
 
41
-    /**
42
-     * Reverse the migrations.
43
-     *
44
-     * @return void
45
-     */
46
-    public function down()
47
-    {
48
-        $this->schema->dropIfExists('oauth_refresh_tokens');
49
-    }
41
+	/**
42
+	 * Reverse the migrations.
43
+	 *
44
+	 * @return void
45
+	 */
46
+	public function down()
47
+	{
48
+		$this->schema->dropIfExists('oauth_refresh_tokens');
49
+	}
50 50
 
51
-    /**
52
-     * Get the migration connection name.
53
-     *
54
-     * @return string|null
55
-     */
56
-    public function getConnection()
57
-    {
58
-        return config('passport.storage.database.connection');
59
-    }
51
+	/**
52
+	 * Get the migration connection name.
53
+	 *
54
+	 * @return string|null
55
+	 */
56
+	public function getConnection()
57
+	{
58
+		return config('passport.storage.database.connection');
59
+	}
60 60
 }
Please login to merge, or discard this 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 up()
32 32
     {
33
-        $this->schema->create('oauth_refresh_tokens', function (Blueprint $table) {
33
+        $this->schema->create('oauth_refresh_tokens', function(Blueprint $table) {
34 34
             $table->string('id', 100)->primary();
35 35
             $table->string('access_token_id', 100)->index();
36 36
             $table->boolean('revoked');
Please login to merge, or discard this patch.
Database/Migrations/2016_06_01_000004_create_oauth_clients_table.php 2 patches
Indentation   +53 added lines, -53 removed lines patch added patch discarded remove patch
@@ -6,61 +6,61 @@
 block discarded – undo
6 6
 
7 7
 class CreateOauthClientsTable extends Migration
8 8
 {
9
-    /**
10
-     * The database schema.
11
-     *
12
-     * @var \Illuminate\Database\Schema\Builder
13
-     */
14
-    protected $schema;
9
+	/**
10
+	 * The database schema.
11
+	 *
12
+	 * @var \Illuminate\Database\Schema\Builder
13
+	 */
14
+	protected $schema;
15 15
 
16
-    /**
17
-     * Create a new migration instance.
18
-     *
19
-     * @return void
20
-     */
21
-    public function __construct()
22
-    {
23
-        $this->schema = Schema::connection($this->getConnection());
24
-    }
16
+	/**
17
+	 * Create a new migration instance.
18
+	 *
19
+	 * @return void
20
+	 */
21
+	public function __construct()
22
+	{
23
+		$this->schema = Schema::connection($this->getConnection());
24
+	}
25 25
 
26
-    /**
27
-     * Get the migration connection name.
28
-     *
29
-     * @return string|null
30
-     */
31
-    public function getConnection()
32
-    {
33
-        return config('passport.storage.database.connection');
34
-    }
26
+	/**
27
+	 * Get the migration connection name.
28
+	 *
29
+	 * @return string|null
30
+	 */
31
+	public function getConnection()
32
+	{
33
+		return config('passport.storage.database.connection');
34
+	}
35 35
 
36
-    /**
37
-     * Run the migrations.
38
-     *
39
-     * @return void
40
-     */
41
-    public function up()
42
-    {
43
-        $this->schema->create('oauth_clients', function (Blueprint $table) {
44
-            $table->bigIncrements('id');
45
-            $table->unsignedBigInteger('user_id')->nullable()->index();
46
-            $table->string('name');
47
-            $table->string('secret', 100)->nullable();
48
-            $table->string('provider')->nullable();
49
-            $table->text('redirect');
50
-            $table->boolean('personal_access_client');
51
-            $table->boolean('password_client');
52
-            $table->boolean('revoked');
53
-            $table->timestamps();
54
-        });
55
-    }
36
+	/**
37
+	 * Run the migrations.
38
+	 *
39
+	 * @return void
40
+	 */
41
+	public function up()
42
+	{
43
+		$this->schema->create('oauth_clients', function (Blueprint $table) {
44
+			$table->bigIncrements('id');
45
+			$table->unsignedBigInteger('user_id')->nullable()->index();
46
+			$table->string('name');
47
+			$table->string('secret', 100)->nullable();
48
+			$table->string('provider')->nullable();
49
+			$table->text('redirect');
50
+			$table->boolean('personal_access_client');
51
+			$table->boolean('password_client');
52
+			$table->boolean('revoked');
53
+			$table->timestamps();
54
+		});
55
+	}
56 56
 
57
-    /**
58
-     * Reverse the migrations.
59
-     *
60
-     * @return void
61
-     */
62
-    public function down()
63
-    {
64
-        $this->schema->dropIfExists('oauth_clients');
65
-    }
57
+	/**
58
+	 * Reverse the migrations.
59
+	 *
60
+	 * @return void
61
+	 */
62
+	public function down()
63
+	{
64
+		$this->schema->dropIfExists('oauth_clients');
65
+	}
66 66
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
      */
41 41
     public function up()
42 42
     {
43
-        $this->schema->create('oauth_clients', function (Blueprint $table) {
43
+        $this->schema->create('oauth_clients', function(Blueprint $table) {
44 44
             $table->bigIncrements('id');
45 45
             $table->unsignedBigInteger('user_id')->nullable()->index();
46 46
             $table->string('name');
Please login to merge, or discard this patch.
Database/Migrations/2016_06_01_000002_create_oauth_access_tokens_table.php 2 patches
Indentation   +51 added lines, -51 removed lines patch added patch discarded remove patch
@@ -6,59 +6,59 @@
 block discarded – undo
6 6
 
7 7
 class CreateOauthAccessTokensTable extends Migration
8 8
 {
9
-    /**
10
-     * The database schema.
11
-     *
12
-     * @var \Illuminate\Database\Schema\Builder
13
-     */
14
-    protected $schema;
9
+	/**
10
+	 * The database schema.
11
+	 *
12
+	 * @var \Illuminate\Database\Schema\Builder
13
+	 */
14
+	protected $schema;
15 15
 
16
-    /**
17
-     * Create a new migration instance.
18
-     *
19
-     * @return void
20
-     */
21
-    public function __construct()
22
-    {
23
-        $this->schema = Schema::connection($this->getConnection());
24
-    }
16
+	/**
17
+	 * Create a new migration instance.
18
+	 *
19
+	 * @return void
20
+	 */
21
+	public function __construct()
22
+	{
23
+		$this->schema = Schema::connection($this->getConnection());
24
+	}
25 25
 
26
-    /**
27
-     * Run the migrations.
28
-     *
29
-     * @return void
30
-     */
31
-    public function up()
32
-    {
33
-        $this->schema->create('oauth_access_tokens', function (Blueprint $table) {
34
-            $table->string('id', 100)->primary();
35
-            $table->unsignedBigInteger('user_id')->nullable()->index();
36
-            $table->unsignedBigInteger('client_id');
37
-            $table->string('name')->nullable();
38
-            $table->text('scopes')->nullable();
39
-            $table->boolean('revoked');
40
-            $table->timestamps();
41
-            $table->dateTime('expires_at')->nullable();
42
-        });
43
-    }
26
+	/**
27
+	 * Run the migrations.
28
+	 *
29
+	 * @return void
30
+	 */
31
+	public function up()
32
+	{
33
+		$this->schema->create('oauth_access_tokens', function (Blueprint $table) {
34
+			$table->string('id', 100)->primary();
35
+			$table->unsignedBigInteger('user_id')->nullable()->index();
36
+			$table->unsignedBigInteger('client_id');
37
+			$table->string('name')->nullable();
38
+			$table->text('scopes')->nullable();
39
+			$table->boolean('revoked');
40
+			$table->timestamps();
41
+			$table->dateTime('expires_at')->nullable();
42
+		});
43
+	}
44 44
 
45
-    /**
46
-     * Reverse the migrations.
47
-     *
48
-     * @return void
49
-     */
50
-    public function down()
51
-    {
52
-        $this->schema->dropIfExists('oauth_access_tokens');
53
-    }
45
+	/**
46
+	 * Reverse the migrations.
47
+	 *
48
+	 * @return void
49
+	 */
50
+	public function down()
51
+	{
52
+		$this->schema->dropIfExists('oauth_access_tokens');
53
+	}
54 54
 
55
-    /**
56
-     * Get the migration connection name.
57
-     *
58
-     * @return string|null
59
-     */
60
-    public function getConnection()
61
-    {
62
-        return config('passport.storage.database.connection');
63
-    }
55
+	/**
56
+	 * Get the migration connection name.
57
+	 *
58
+	 * @return string|null
59
+	 */
60
+	public function getConnection()
61
+	{
62
+		return config('passport.storage.database.connection');
63
+	}
64 64
 }
Please login to merge, or discard this 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 up()
32 32
     {
33
-        $this->schema->create('oauth_access_tokens', function (Blueprint $table) {
33
+        $this->schema->create('oauth_access_tokens', function(Blueprint $table) {
34 34
             $table->string('id', 100)->primary();
35 35
             $table->unsignedBigInteger('user_id')->nullable()->index();
36 36
             $table->unsignedBigInteger('client_id');
Please login to merge, or discard this patch.
Database/Migrations/2016_06_01_000001_create_oauth_auth_codes_table.php 2 patches
Indentation   +49 added lines, -49 removed lines patch added patch discarded remove patch
@@ -6,57 +6,57 @@
 block discarded – undo
6 6
 
7 7
 class CreateOauthAuthCodesTable extends Migration
8 8
 {
9
-    /**
10
-     * The database schema.
11
-     *
12
-     * @var \Illuminate\Database\Schema\Builder
13
-     */
14
-    protected $schema;
9
+	/**
10
+	 * The database schema.
11
+	 *
12
+	 * @var \Illuminate\Database\Schema\Builder
13
+	 */
14
+	protected $schema;
15 15
 
16
-    /**
17
-     * Create a new migration instance.
18
-     *
19
-     * @return void
20
-     */
21
-    public function __construct()
22
-    {
23
-        $this->schema = Schema::connection($this->getConnection());
24
-    }
16
+	/**
17
+	 * Create a new migration instance.
18
+	 *
19
+	 * @return void
20
+	 */
21
+	public function __construct()
22
+	{
23
+		$this->schema = Schema::connection($this->getConnection());
24
+	}
25 25
 
26
-    /**
27
-     * Run the migrations.
28
-     *
29
-     * @return void
30
-     */
31
-    public function up()
32
-    {
33
-        $this->schema->create('oauth_auth_codes', function (Blueprint $table) {
34
-            $table->string('id', 100)->primary();
35
-            $table->unsignedBigInteger('user_id')->index();
36
-            $table->unsignedBigInteger('client_id');
37
-            $table->text('scopes')->nullable();
38
-            $table->boolean('revoked');
39
-            $table->dateTime('expires_at')->nullable();
40
-        });
41
-    }
26
+	/**
27
+	 * Run the migrations.
28
+	 *
29
+	 * @return void
30
+	 */
31
+	public function up()
32
+	{
33
+		$this->schema->create('oauth_auth_codes', function (Blueprint $table) {
34
+			$table->string('id', 100)->primary();
35
+			$table->unsignedBigInteger('user_id')->index();
36
+			$table->unsignedBigInteger('client_id');
37
+			$table->text('scopes')->nullable();
38
+			$table->boolean('revoked');
39
+			$table->dateTime('expires_at')->nullable();
40
+		});
41
+	}
42 42
 
43
-    /**
44
-     * Reverse the migrations.
45
-     *
46
-     * @return void
47
-     */
48
-    public function down()
49
-    {
50
-        $this->schema->dropIfExists('oauth_auth_codes');
51
-    }
43
+	/**
44
+	 * Reverse the migrations.
45
+	 *
46
+	 * @return void
47
+	 */
48
+	public function down()
49
+	{
50
+		$this->schema->dropIfExists('oauth_auth_codes');
51
+	}
52 52
 
53
-    /**
54
-     * Get the migration connection name.
55
-     *
56
-     * @return string|null
57
-     */
58
-    public function getConnection()
59
-    {
60
-        return config('passport.storage.database.connection');
61
-    }
53
+	/**
54
+	 * Get the migration connection name.
55
+	 *
56
+	 * @return string|null
57
+	 */
58
+	public function getConnection()
59
+	{
60
+		return config('passport.storage.database.connection');
61
+	}
62 62
 }
Please login to merge, or discard this 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 up()
32 32
     {
33
-        $this->schema->create('oauth_auth_codes', function (Blueprint $table) {
33
+        $this->schema->create('oauth_auth_codes', function(Blueprint $table) {
34 34
             $table->string('id', 100)->primary();
35 35
             $table->unsignedBigInteger('user_id')->index();
36 36
             $table->unsignedBigInteger('client_id');
Please login to merge, or discard this patch.
src/Modules/OauthClients/Database/Factories/OauthClientFactory.php 1 patch
Indentation   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -8,30 +8,30 @@
 block discarded – undo
8 8
 
9 9
 class OauthClientFactory extends Factory
10 10
 {
11
-    /**
12
-     * The name of the factory's corresponding model.
13
-     *
14
-     * @var string
15
-     */
16
-    protected $model = OauthClient::class;
11
+	/**
12
+	 * The name of the factory's corresponding model.
13
+	 *
14
+	 * @var string
15
+	 */
16
+	protected $model = OauthClient::class;
17 17
 
18
-    /**
19
-     * Define the model's default state.
20
-     *
21
-     * @return array
22
-     */
23
-    public function definition()
24
-    {
25
-        return [
26
-            'user_id'                => $this->faker->randomDigit(),
27
-            'name'                   => $this->faker->name(),
28
-            'secret'                 => Str::random(40),
29
-            'redirect'               => $this->faker->url(),
30
-            'personal_access_client' => 0,
31
-            'password_client'        => 0,
32
-            'revoked'                => $this->faker->boolean(),
33
-            'created_at'             => $this->faker->dateTimeBetween('-1 years', 'now'),
34
-            'updated_at'             => $this->faker->dateTimeBetween('-1 years', 'now')
35
-        ];
36
-    }
18
+	/**
19
+	 * Define the model's default state.
20
+	 *
21
+	 * @return array
22
+	 */
23
+	public function definition()
24
+	{
25
+		return [
26
+			'user_id'                => $this->faker->randomDigit(),
27
+			'name'                   => $this->faker->name(),
28
+			'secret'                 => Str::random(40),
29
+			'redirect'               => $this->faker->url(),
30
+			'personal_access_client' => 0,
31
+			'password_client'        => 0,
32
+			'revoked'                => $this->faker->boolean(),
33
+			'created_at'             => $this->faker->dateTimeBetween('-1 years', 'now'),
34
+			'updated_at'             => $this->faker->dateTimeBetween('-1 years', 'now')
35
+		];
36
+	}
37 37
 }
Please login to merge, or discard this patch.