Completed
Push — master ( 2f51b9...5a5df7 )
by Corentin
23:21
created
app/Services/ExtendedValidationService.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -2,14 +2,14 @@
 block discarded – undo
2 2
 
3 3
 class ExtendedValidationService {
4 4
 	
5
-	public function validatePassword($field, $value, $params)
5
+    public function validatePassword($field, $value, $params)
6 6
     {
7
-		return (bool) preg_match("/^[a-zA-Z0-9\@\!\#\$\%\?]{5,50}$/", $value);
8
-	}
7
+        return (bool) preg_match("/^[a-zA-Z0-9\@\!\#\$\%\?]{5,50}$/", $value);
8
+    }
9 9
 
10
-	public function validateName($field, $value, $params)
10
+    public function validateName($field, $value, $params)
11 11
     {
12
-		return (bool) preg_match("/^[a-z A-Z0-9\-]{1,50}$/", $value);
13
-	}
12
+        return (bool) preg_match("/^[a-z A-Z0-9\-]{1,50}$/", $value);
13
+    }
14 14
 
15 15
 }
16 16
\ No newline at end of file
Please login to merge, or discard this patch.
app/Services/Registrar.php 1 patch
Indentation   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -6,34 +6,34 @@
 block discarded – undo
6 6
 
7 7
 class Registrar implements RegistrarContract {
8 8
 
9
-	/**
10
-	 * Get a validator for an incoming registration request.
11
-	 *
12
-	 * @param  array  $data
13
-	 * @return \Illuminate\Contracts\Validation\Validator
14
-	 */
15
-	public function validator(array $data)
16
-	{
17
-		return Validator::make($data, [
18
-			'name' => 'required|max:255',
19
-			'email' => 'required|email|max:255|unique:users',
20
-			'password' => 'required|confirmed|min:6',
21
-		]);
22
-	}
9
+    /**
10
+     * Get a validator for an incoming registration request.
11
+     *
12
+     * @param  array  $data
13
+     * @return \Illuminate\Contracts\Validation\Validator
14
+     */
15
+    public function validator(array $data)
16
+    {
17
+        return Validator::make($data, [
18
+            'name' => 'required|max:255',
19
+            'email' => 'required|email|max:255|unique:users',
20
+            'password' => 'required|confirmed|min:6',
21
+        ]);
22
+    }
23 23
 
24
-	/**
25
-	 * Create a new user instance after a valid registration.
26
-	 *
27
-	 * @param  array  $data
28
-	 * @return User
29
-	 */
30
-	public function create(array $data)
31
-	{
32
-		return User::create([
33
-			'name' => $data['name'],
34
-			'email' => $data['email'],
35
-			'password' => bcrypt($data['password']),
36
-		]);
37
-	}
24
+    /**
25
+     * Create a new user instance after a valid registration.
26
+     *
27
+     * @param  array  $data
28
+     * @return User
29
+     */
30
+    public function create(array $data)
31
+    {
32
+        return User::create([
33
+            'name' => $data['name'],
34
+            'email' => $data['email'],
35
+            'password' => bcrypt($data['password']),
36
+        ]);
37
+    }
38 38
 
39 39
 }
Please login to merge, or discard this patch.
app/User.php 2 patches
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -13,31 +13,31 @@
 block discarded – undo
13 13
 
14 14
 class User extends Model implements AuthenticatableContract, CanResetPasswordContract {
15 15
 
16
-	use Authenticatable, CanResetPassword, SoftDeletes;
16
+    use Authenticatable, CanResetPassword, SoftDeletes;
17 17
 
18
-	protected $table = 'users';
18
+    protected $table = 'users';
19 19
     public $timestamps = false;
20
-	protected $hidden = ['password_hash', 'remember_token'];
21
-	protected $dates = ['deleted_at'];
20
+    protected $hidden = ['password_hash', 'remember_token'];
21
+    protected $dates = ['deleted_at'];
22 22
     public $primaryKey = 'user_id';
23 23
 
24 24
     protected $guarded = ['user_id']; 
25 25
     
26 26
     public static $validationRules = [  'firstname'         => 'required|name',
27
-    									'lastname'          => 'required|name',
27
+                                        'lastname'          => 'required|name',
28 28
                                         'email'             => 'required|email|unique:users,email',
29 29
                                         'password'          => 'required|password',
30 30
                                         'repeat_password'   => 'same:password'];
31 31
     
32 32
     public function scopeActiveGroup($query) {
33 33
     	
34
-    	return $query->join('groups', 'groups.group_id', '=', 'users.group_id')
35
-		    			->where('groups.is_active', true);
36
-	}
34
+        return $query->join('groups', 'groups.group_id', '=', 'users.group_id')
35
+                        ->where('groups.is_active', true);
36
+    }
37 37
 	
38
-	public function scopeFromGroup($query) {
38
+    public function scopeFromGroup($query) {
39 39
 	
40
-		return $query->where('group_id', Session::get('groupID') );
41
-	}
40
+        return $query->where('group_id', Session::get('groupID') );
41
+    }
42 42
 
43 43
 }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 
24 24
     protected $guarded = ['user_id']; 
25 25
     
26
-    public static $validationRules = [  'firstname'         => 'required|name',
26
+    public static $validationRules = ['firstname'         => 'required|name',
27 27
     									'lastname'          => 'required|name',
28 28
                                         'email'             => 'required|email|unique:users,email',
29 29
                                         'password'          => 'required|password',
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 	
38 38
 	public function scopeFromGroup($query) {
39 39
 	
40
-		return $query->where('group_id', Session::get('groupID') );
40
+		return $query->where('group_id', Session::get('groupID'));
41 41
 	}
42 42
 
43 43
 }
Please login to merge, or discard this patch.
app/Events/Event.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,6 +4,6 @@
 block discarded – undo
4 4
 
5 5
 abstract class Request extends FormRequest {
6 6
 
7
-	//
7
+    //
8 8
 
9 9
 }
Please login to merge, or discard this patch.
app/Http/Middleware/RedirectIfAuthenticated.php 1 patch
Indentation   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -6,38 +6,38 @@
 block discarded – undo
6 6
 
7 7
 class RedirectIfAuthenticated {
8 8
 
9
-	/**
10
-	 * The Guard implementation.
11
-	 *
12
-	 * @var Guard
13
-	 */
14
-	protected $auth;
9
+    /**
10
+     * The Guard implementation.
11
+     *
12
+     * @var Guard
13
+     */
14
+    protected $auth;
15 15
 
16
-	/**
17
-	 * Create a new filter instance.
18
-	 *
19
-	 * @param  Guard  $auth
20
-	 */
21
-	public function __construct(Guard $auth)
22
-	{
23
-		$this->auth = $auth;
24
-	}
16
+    /**
17
+     * Create a new filter instance.
18
+     *
19
+     * @param  Guard  $auth
20
+     */
21
+    public function __construct(Guard $auth)
22
+    {
23
+        $this->auth = $auth;
24
+    }
25 25
 
26
-	/**
27
-	 * Handle an incoming request.
28
-	 *
29
-	 * @param  \Illuminate\Http\Request  $request
30
-	 * @param  \Closure  $next
31
-	 * @return mixed
32
-	 */
33
-	public function handle($request, Closure $next)
34
-	{
35
-		if ($this->auth->check())
36
-		{
37
-			return new RedirectResponse(url('/app'));
38
-		}
26
+    /**
27
+     * Handle an incoming request.
28
+     *
29
+     * @param  \Illuminate\Http\Request  $request
30
+     * @param  \Closure  $next
31
+     * @return mixed
32
+     */
33
+    public function handle($request, Closure $next)
34
+    {
35
+        if ($this->auth->check())
36
+        {
37
+            return new RedirectResponse(url('/app'));
38
+        }
39 39
 
40
-		return $next($request);
41
-	}
40
+        return $next($request);
41
+    }
42 42
 
43 43
 }
Please login to merge, or discard this patch.
app/Repositories/Repository.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
     {
13 13
         $model = $app->make($this->getModelName());
14 14
 
15
-        if( !$model instanceof Model ) {
15
+        if (!$model instanceof Model) {
16 16
             throw new RepositoryException('Model must be an instance of Illuminate\\Database\\Eloquent\\Model');
17 17
         }
18 18
 
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 
59 59
     public function validateID($id)
60 60
     {
61
-        if( (bool) preg_match('/^[0-9]{1,10}$/', $id) === false )
61
+        if ((bool) preg_match('/^[0-9]{1,10}$/', $id) === false)
62 62
         {
63 63
             throw new RepositoryException('Parameter must be a positive integer', RepositoryException::INCORRECT_PARAMETER);
64 64
         }
Please login to merge, or discard this patch.