Completed
Push — master ( f99d3b...b819b4 )
by Sherif
02:03
created
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.
src/Modules/Users/Http/Requests/SaveProfile.php 1 patch
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -6,27 +6,27 @@
 block discarded – undo
6 6
 
7 7
 class SaveProfile 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
-            'profile_picture' => 'nullable|string',
28
-            'name'            => 'nullable|string',
29
-            'email'           => 'required|email|unique:users,email,'.\Auth::id()
30
-        ];
31
-    }
19
+	/**
20
+	 * Get the validation rules that apply to the request.
21
+	 *
22
+	 * @return array
23
+	 */
24
+	public function rules()
25
+	{
26
+		return [
27
+			'profile_picture' => 'nullable|string',
28
+			'name'            => 'nullable|string',
29
+			'email'           => 'required|email|unique:users,email,'.\Auth::id()
30
+		];
31
+	}
32 32
 }
Please login to merge, or discard this patch.
src/Modules/Users/Http/Requests/SendReset.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 SendReset 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
-            'email' => 'required|email'
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
+			'email' => 'required|email'
28
+		];
29
+	}
30 30
 }
Please login to merge, or discard this patch.
src/Modules/Users/Http/Requests/RefreshToken.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 RefreshToken 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
-            'refresh_token' => 'required',
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
+			'refresh_token' => 'required',
28
+		];
29
+	}
30 30
 }
Please login to merge, or discard this patch.
src/Modules/Users/Http/Requests/ChangePassword.php 1 patch
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -6,27 +6,27 @@
 block discarded – undo
6 6
 
7 7
 class ChangePassword 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
-            'old_password'          => 'required',
28
-            'password'              => 'required|confirmed|min:6',
29
-            'password_confirmation' => 'required'
30
-        ];
31
-    }
19
+	/**
20
+	 * Get the validation rules that apply to the request.
21
+	 *
22
+	 * @return array
23
+	 */
24
+	public function rules()
25
+	{
26
+		return [
27
+			'old_password'          => 'required',
28
+			'password'              => 'required|confirmed|min:6',
29
+			'password_confirmation' => 'required'
30
+		];
31
+	}
32 32
 }
Please login to merge, or discard this patch.
src/Modules/Users/Http/Requests/ResendEmailConfirmation.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 ResendEmailConfirmation 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
-            'email' => 'required|exists:users,email'
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
+			'email' => 'required|exists:users,email'
28
+		];
29
+	}
30 30
 }
Please login to merge, or discard this patch.
src/Modules/Users/Http/Requests/ResetPassword.php 1 patch
Indentation   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -6,28 +6,28 @@
 block discarded – undo
6 6
 
7 7
 class ResetPassword 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
-            'token'                 => 'required',
28
-            'email'                 => 'required|email',
29
-            'password'              => 'required|confirmed|min:6',
30
-            'password_confirmation' => 'required',
31
-        ];
32
-    }
19
+	/**
20
+	 * Get the validation rules that apply to the request.
21
+	 *
22
+	 * @return array
23
+	 */
24
+	public function rules()
25
+	{
26
+		return [
27
+			'token'                 => 'required',
28
+			'email'                 => 'required|email',
29
+			'password'              => 'required|confirmed|min:6',
30
+			'password_confirmation' => 'required',
31
+		];
32
+	}
33 33
 }
Please login to merge, or discard this patch.