Completed
Push — master ( 8a761d...35b920 )
by Sherif
02:19
created
src/Modules/Permissions/Routes/api.php 3 patches
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -1,7 +1,5 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-use Illuminate\Http\Request;
4
-
5 3
 /*
6 4
 |--------------------------------------------------------------------------
7 5
 | API Routes
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,6 +15,6 @@
 block discarded – undo
15 15
 
16 16
 Route::group(['prefix' => 'permissions'], function () {
17 17
         
18
-    Route::get('/', 'PermissionController@index');
19
-    Route::get('/{id}', 'PermissionController@show');
18
+	Route::get('/', 'PermissionController@index');
19
+	Route::get('/{id}', 'PermissionController@show');
20 20
 });
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
 */
15 15
 
16
-Route::group(['prefix' => 'permissions'], function () {
16
+Route::group(['prefix' => 'permissions'], function() {
17 17
         
18 18
     Route::get('/', 'PermissionController@index');
19 19
     Route::get('/{id}', 'PermissionController@show');
Please login to merge, or discard this patch.
src/Modules/PushNotificationDevices/Routes/api.php 3 patches
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -1,7 +1,5 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-use Illuminate\Http\Request;
4
-
5 3
 /*
6 4
 |--------------------------------------------------------------------------
7 5
 | API Routes
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
 */
15 15
 
16
-Route::group(['prefix' => 'push/notification/devices'], function () {
16
+Route::group(['prefix' => 'push/notification/devices'], function() {
17 17
         
18 18
     Route::get('/', 'PushNotificationDeviceController@index');
19 19
     Route::get('{id}', 'PushNotificationDeviceController@show');
Please login to merge, or discard this patch.
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -15,11 +15,11 @@
 block discarded – undo
15 15
 
16 16
 Route::group(['prefix' => 'push/notification/devices'], function () {
17 17
         
18
-    Route::get('/', 'PushNotificationDeviceController@index');
19
-    Route::get('{id}', 'PushNotificationDeviceController@show');
20
-    Route::post('/', 'PushNotificationDeviceController@store');
21
-    Route::patch('{id}', 'PushNotificationDeviceController@update');
22
-    Route::delete('{id}', 'PushNotificationDeviceController@destroy');
23
-    Route::patch('restore/{id}', 'PushNotificationDeviceController@restore');
24
-    Route::post('register/device', 'PushNotificationDeviceController@registerDevice');
18
+	Route::get('/', 'PushNotificationDeviceController@index');
19
+	Route::get('{id}', 'PushNotificationDeviceController@show');
20
+	Route::post('/', 'PushNotificationDeviceController@store');
21
+	Route::patch('{id}', 'PushNotificationDeviceController@update');
22
+	Route::delete('{id}', 'PushNotificationDeviceController@destroy');
23
+	Route::patch('restore/{id}', 'PushNotificationDeviceController@restore');
24
+	Route::post('register/device', 'PushNotificationDeviceController@registerDevice');
25 25
 });
Please login to merge, or discard this patch.
src/Modules/Users/Routes/api.php 3 patches
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -1,7 +1,5 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-use Illuminate\Http\Request;
4
-
5 3
 /*
6 4
 |--------------------------------------------------------------------------
7 5
 | API Routes
Please login to merge, or discard this patch.
Indentation   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -15,29 +15,29 @@
 block discarded – undo
15 15
 
16 16
 Route::group(['prefix' => 'users'], function () {
17 17
     
18
-    Route::get('/', 'UserController@index');
19
-    Route::get('{id}', 'UserController@show');
20
-    Route::post('/', 'UserController@store');
21
-    Route::patch('{id}', 'UserController@update');
22
-    Route::delete('{id}', 'UserController@destroy');
23
-    Route::patch('restore/{id}', 'UserController@restore');
24
-    Route::patch('block/{id}', 'UserController@block');
25
-    Route::patch('unblock/{id}', 'UserController@unblock');
26
-    Route::patch('assign/roles/{id}', 'UserController@assignRoles');
18
+	Route::get('/', 'UserController@index');
19
+	Route::get('{id}', 'UserController@show');
20
+	Route::post('/', 'UserController@store');
21
+	Route::patch('{id}', 'UserController@update');
22
+	Route::delete('{id}', 'UserController@destroy');
23
+	Route::patch('restore/{id}', 'UserController@restore');
24
+	Route::patch('block/{id}', 'UserController@block');
25
+	Route::patch('unblock/{id}', 'UserController@unblock');
26
+	Route::patch('assign/roles/{id}', 'UserController@assignRoles');
27 27
 
28
-    Route::group(['prefix' => 'account'], function () {
28
+	Route::group(['prefix' => 'account'], function () {
29 29
 
30
-        Route::get('my', 'UserController@account');
31
-        Route::get('logout', 'UserController@logout');
32
-        Route::post('refresh/token', 'UserController@refreshToken');
33
-        Route::post('save', 'UserController@saveProfile');
34
-        Route::post('register', 'UserController@register');
35
-        Route::post('login', 'UserController@login');
36
-        Route::post('login/social', 'UserController@loginSocial');
37
-        Route::post('send/reset', 'UserController@sendReset');
38
-        Route::post('reset/password', 'UserController@resetPassword');
39
-        Route::post('change/password', 'UserController@changePassword');
40
-        Route::post('confirm/email', 'UserController@confirmEmail');
41
-        Route::post('resend/email/confirmation', 'UserController@resendEmailConfirmation');
42
-    });
30
+		Route::get('my', 'UserController@account');
31
+		Route::get('logout', 'UserController@logout');
32
+		Route::post('refresh/token', 'UserController@refreshToken');
33
+		Route::post('save', 'UserController@saveProfile');
34
+		Route::post('register', 'UserController@register');
35
+		Route::post('login', 'UserController@login');
36
+		Route::post('login/social', 'UserController@loginSocial');
37
+		Route::post('send/reset', 'UserController@sendReset');
38
+		Route::post('reset/password', 'UserController@resetPassword');
39
+		Route::post('change/password', 'UserController@changePassword');
40
+		Route::post('confirm/email', 'UserController@confirmEmail');
41
+		Route::post('resend/email/confirmation', 'UserController@resendEmailConfirmation');
42
+	});
43 43
 });
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
 |
14 14
 */
15 15
 
16
-Route::group(['prefix' => 'users'], function () {
16
+Route::group(['prefix' => 'users'], function() {
17 17
     
18 18
     Route::get('/', 'UserController@index');
19 19
     Route::get('{id}', 'UserController@show');
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
     Route::patch('unblock/{id}', 'UserController@unblock');
26 26
     Route::patch('assign/roles/{id}', 'UserController@assignRoles');
27 27
 
28
-    Route::group(['prefix' => 'account'], function () {
28
+    Route::group(['prefix' => 'account'], function() {
29 29
 
30 30
         Route::get('my', 'UserController@account');
31 31
         Route::get('logout', 'UserController@logout');
Please login to merge, or discard this patch.
src/Modules/Users/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\Users\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\Users\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('users', '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('users', '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('users', '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('users', '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('users', '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('users', 'Routes/api.php', 'app');
77 77
         });
78 78
     }
Please login to merge, or discard this patch.
src/Modules/Users/Database/Factories/UserFactory.php 2 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 $factory->define(App\Modules\Users\AclUser::class, function (Faker\Generator $faker) {
4
-    return [
5
-        'profile_picture' => 'http://lorempixel.com/400/200/',
6
-        'name'            => $faker->name(),
7
-        'email'           => $faker->safeEmail(),
8
-        'password'        => 123456,
9
-        'created_at'      => $faker->dateTimeBetween('-1 years', 'now'),
10
-        'updated_at'      => $faker->dateTimeBetween('-1 years', 'now')
11
-    ];
4
+	return [
5
+		'profile_picture' => 'http://lorempixel.com/400/200/',
6
+		'name'            => $faker->name(),
7
+		'email'           => $faker->safeEmail(),
8
+		'password'        => 123456,
9
+		'created_at'      => $faker->dateTimeBetween('-1 years', 'now'),
10
+		'updated_at'      => $faker->dateTimeBetween('-1 years', 'now')
11
+	];
12 12
 });
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\Users\AclUser::class, function (Faker\Generator $faker) {
3
+$factory->define(App\Modules\Users\AclUser::class, function(Faker\Generator $faker) {
4 4
     return [
5 5
         'profile_picture' => 'http://lorempixel.com/400/200/',
6 6
         'name'            => $faker->name(),
Please login to merge, or discard this patch.
src/Modules/Users/Database/Seeds/UsersDatabaseSeeder.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 UsersDatabaseSeeder 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(UsersTableSeeder::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(UsersTableSeeder::class);
18
+		$this->call(AssignRelationsSeeder::class);
19
+	}
20 20
 }
Please login to merge, or discard this patch.
src/Modules/Users/Database/Migrations/2015_12_20_124153_users.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
      */
13 13
     public function up()
14 14
     {
15
-        Schema::create('users', function (Blueprint $table) {
15
+        Schema::create('users', function(Blueprint $table) {
16 16
             $table->increments('id');
17 17
             $table->string('profile_picture', 150)->nullable();
18 18
             $table->string('name', 100)->nullable();
Please login to merge, or discard this patch.
Indentation   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -5,37 +5,37 @@
 block discarded – undo
5 5
 
6 6
 class Users extends Migration
7 7
 {
8
-    /**
9
-     * Run the migrations.
10
-     *
11
-     * @return void
12
-     */
13
-    public function up()
14
-    {
15
-        Schema::create('users', function (Blueprint $table) {
16
-            $table->increments('id');
17
-            $table->string('profile_picture', 150)->nullable();
18
-            $table->string('name', 100)->nullable();
19
-            $table->string('email')->unique();
20
-            $table->string('password', 60)->nullable();
21
-            $table->boolean('blocked')->default(0);
22
-            $table->boolean('confirmed')->default(0);
23
-            $table->string('confirmation_code')->nullable();
24
-            $table->string('locale', 2)->default('en');
25
-            $table->string('timezone', 50)->default('Africa/Cairo');
26
-            $table->softDeletes();
27
-            $table->rememberToken();
28
-            $table->timestamps();
29
-        });
30
-    }
8
+	/**
9
+	 * Run the migrations.
10
+	 *
11
+	 * @return void
12
+	 */
13
+	public function up()
14
+	{
15
+		Schema::create('users', function (Blueprint $table) {
16
+			$table->increments('id');
17
+			$table->string('profile_picture', 150)->nullable();
18
+			$table->string('name', 100)->nullable();
19
+			$table->string('email')->unique();
20
+			$table->string('password', 60)->nullable();
21
+			$table->boolean('blocked')->default(0);
22
+			$table->boolean('confirmed')->default(0);
23
+			$table->string('confirmation_code')->nullable();
24
+			$table->string('locale', 2)->default('en');
25
+			$table->string('timezone', 50)->default('Africa/Cairo');
26
+			$table->softDeletes();
27
+			$table->rememberToken();
28
+			$table->timestamps();
29
+		});
30
+	}
31 31
 
32
-    /**
33
-     * Reverse the migrations.
34
-     *
35
-     * @return void
36
-     */
37
-    public function down()
38
-    {
39
-        Schema::dropIfExists('users');
40
-    }
32
+	/**
33
+	 * Reverse the migrations.
34
+	 *
35
+	 * @return void
36
+	 */
37
+	public function down()
38
+	{
39
+		Schema::dropIfExists('users');
40
+	}
41 41
 }
Please login to merge, or discard this patch.
src/Modules/Users/Database/Migrations/2015_12_20_124154_password_resets.php 2 patches
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -5,27 +5,27 @@
 block discarded – undo
5 5
 
6 6
 class PasswordResets extends Migration
7 7
 {
8
-    /**
9
-     * Run the migrations.
10
-     *
11
-     * @return void
12
-     */
13
-    public function up()
14
-    {
15
-        Schema::create('password_resets', function (Blueprint $table) {
16
-            $table->string('email')->index();
17
-            $table->string('token')->index();
18
-            $table->timestamp('created_at');
19
-        });
20
-    }
8
+	/**
9
+	 * Run the migrations.
10
+	 *
11
+	 * @return void
12
+	 */
13
+	public function up()
14
+	{
15
+		Schema::create('password_resets', function (Blueprint $table) {
16
+			$table->string('email')->index();
17
+			$table->string('token')->index();
18
+			$table->timestamp('created_at');
19
+		});
20
+	}
21 21
 
22
-    /**
23
-     * Reverse the migrations.
24
-     *
25
-     * @return void
26
-     */
27
-    public function down()
28
-    {
29
-        Schema::dropIfExists('password_resets');
30
-    }
22
+	/**
23
+	 * Reverse the migrations.
24
+	 *
25
+	 * @return void
26
+	 */
27
+	public function down()
28
+	{
29
+		Schema::dropIfExists('password_resets');
30
+	}
31 31
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
      */
13 13
     public function up()
14 14
     {
15
-        Schema::create('password_resets', function (Blueprint $table) {
15
+        Schema::create('password_resets', function(Blueprint $table) {
16 16
             $table->string('email')->index();
17 17
             $table->string('token')->index();
18 18
             $table->timestamp('created_at');
Please login to merge, or discard this patch.
src/Modules/Users/Http/Resources/AclUser.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
      */
18 18
     public function toArray($request)
19 19
     {
20
-        if (! $this->resource) {
20
+        if ( ! $this->resource) {
21 21
             return [];
22 22
         }
23 23
 
Please login to merge, or discard this 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 ? url(\Storage::url($this->profile_picture)) : null,
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 ? url(\Storage::url($this->profile_picture)) : null,
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.