Completed
Push — master ( 5050df...77fab1 )
by Sherif
01:58
created
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
Indentation   +45 added lines, -45 removed lines patch added patch discarded remove patch
@@ -5,51 +5,51 @@
 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
-        });
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 30
 
31
-        /**
32
-         * Create Default users.
33
-         */
34
-        \DB::table('users')->insertGetId(
35
-            [
36
-            'name'       => 'Admin',
37
-            'email'      => '[email protected]',
38
-            'password'   => bcrypt('123456'),
39
-            'confirmed'  => 1,
40
-            'created_at' => \DB::raw('NOW()'),
41
-            'updated_at' => \DB::raw('NOW()')
42
-            ]
43
-        );
44
-    }
31
+		/**
32
+		 * Create Default users.
33
+		 */
34
+		\DB::table('users')->insertGetId(
35
+			[
36
+			'name'       => 'Admin',
37
+			'email'      => '[email protected]',
38
+			'password'   => bcrypt('123456'),
39
+			'confirmed'  => 1,
40
+			'created_at' => \DB::raw('NOW()'),
41
+			'updated_at' => \DB::raw('NOW()')
42
+			]
43
+		);
44
+	}
45 45
 
46
-    /**
47
-     * Reverse the migrations.
48
-     *
49
-     * @return void
50
-     */
51
-    public function down()
52
-    {
53
-        Schema::dropIfExists('users');
54
-    }
46
+	/**
47
+	 * Reverse the migrations.
48
+	 *
49
+	 * @return void
50
+	 */
51
+	public function down()
52
+	{
53
+		Schema::dropIfExists('users');
54
+	}
55 55
 }
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('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.
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,
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,
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/InsertUser.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 InsertUser 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'     => 'nullable|string',
28
-            'email'    => 'required|email|unique:users,email,'.$this->get('id'),
29
-            'password' => 'nullable|min:6'
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
+			'name'     => 'nullable|string',
28
+			'email'    => 'required|email|unique:users,email,'.$this->get('id'),
29
+			'password' => 'nullable|min:6'
30
+		];
31
+	}
32 32
 }
Please login to merge, or discard this patch.