Completed
Push — gocardless-upgrade ( ab99fa )
by Arthur
02:58
created
app/Http/Controllers/Auth/AuthController.php 2 patches
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
 
8 8
 class AuthController extends Controller {
9 9
 
10
-	/*
10
+    /*
11 11
 	|--------------------------------------------------------------------------
12 12
 	| Registration & Login Controller
13 13
 	|--------------------------------------------------------------------------
@@ -18,21 +18,21 @@  discard block
 block discarded – undo
18 18
 	|
19 19
 	*/
20 20
 
21
-	use AuthenticatesAndRegistersUsers;
21
+    use AuthenticatesAndRegistersUsers;
22 22
 
23
-	/**
24
-	 * Create a new authentication controller instance.
25
-	 *
26
-	 * @param  \Illuminate\Contracts\Auth\Guard  $auth
27
-	 * @param  \Illuminate\Contracts\Auth\Registrar  $registrar
28
-	 * @return void
29
-	 */
30
-	public function __construct(Guard $auth, Registrar $registrar)
31
-	{
32
-		$this->auth = $auth;
33
-		$this->registrar = $registrar;
23
+    /**
24
+     * Create a new authentication controller instance.
25
+     *
26
+     * @param  \Illuminate\Contracts\Auth\Guard  $auth
27
+     * @param  \Illuminate\Contracts\Auth\Registrar  $registrar
28
+     * @return void
29
+     */
30
+    public function __construct(Guard $auth, Registrar $registrar)
31
+    {
32
+        $this->auth = $auth;
33
+        $this->registrar = $registrar;
34 34
 
35
-		$this->middleware('guest', ['except' => 'getLogout']);
36
-	}
35
+        $this->middleware('guest', ['except' => 'getLogout']);
36
+    }
37 37
 
38 38
 }
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,8 @@
 block discarded – undo
5 5
 use Illuminate\Contracts\Auth\Registrar;
6 6
 use Illuminate\Foundation\Auth\AuthenticatesAndRegistersUsers;
7 7
 
8
-class AuthController extends Controller {
8
+class AuthController extends Controller
9
+{
9 10
 
10 11
 	/*
11 12
 	|--------------------------------------------------------------------------
Please login to merge, or discard this patch.
app/Http/Controllers/CCTVController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
                     'ContentType'   => 'image/jpg',
40 40
                     'ServerSideEncryption' => 'AES256',
41 41
                 ));
42
-            } catch(\Exception $e) {
42
+            } catch (\Exception $e) {
43 43
                 \Log::exception($e);
44 44
             }
45 45
             //Log::debug('Image saved :https://s3-eu-west-1.amazonaws.com/buildbrighton-bbms/'.$newFilename);
Please login to merge, or discard this patch.
app/Http/Controllers/Controller.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,6 +6,6 @@
 block discarded – undo
6 6
 
7 7
 abstract class Controller extends BaseController {
8 8
 
9
-	use DispatchesCommands, ValidatesRequests;
9
+    use DispatchesCommands, ValidatesRequests;
10 10
 
11 11
 }
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,8 @@
 block discarded – undo
4 4
 use Illuminate\Routing\Controller as BaseController;
5 5
 use Illuminate\Foundation\Validation\ValidatesRequests;
6 6
 
7
-abstract class Controller extends BaseController {
7
+abstract class Controller extends BaseController
8
+{
8 9
 
9 10
 	use DispatchesCommands, ValidatesRequests;
10 11
 
Please login to merge, or discard this patch.
app/Http/Controllers/EquipmentController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -225,7 +225,7 @@
 block discarded – undo
225 225
 
226 226
                 $equipment->addPhoto($newFilename);
227 227
 
228
-            } catch(\Exception $e) {
228
+            } catch (\Exception $e) {
229 229
                 \Log::error($e);
230 230
                 throw new ImageFailedException($e->getMessage());
231 231
             }
Please login to merge, or discard this patch.
app/Http/Controllers/KeyFobController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@
 block discarded – undo
69 69
         $fob = KeyFob::findOrFail($id);
70 70
         $fob->markLost();
71 71
         \Notification::success("Key Fob marked as lost/broken");
72
-        return \Redirect::route('account.show',$fob->user_id);
72
+        return \Redirect::route('account.show', $fob->user_id);
73 73
     }
74 74
 
75 75
 
Please login to merge, or discard this patch.
app/Http/Controllers/PaymentController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -265,11 +265,11 @@  discard block
 block discarded – undo
265 265
     {
266 266
         $user = User::findWithPermission($userId);
267 267
 
268
-        if ( ! \Auth::user()->hasRole('admin') &&  ! \Auth::user()->hasRole('finance')) {
268
+        if ( ! \Auth::user()->hasRole('admin') && ! \Auth::user()->hasRole('finance')) {
269 269
             throw new \BB\Exceptions\AuthenticationException;
270 270
         }
271 271
 
272
-        \Log::debug('Manual payment endpoint getting hit. account/{id}/payment. paymentController@store '.json_encode(\Input::all()));
272
+        \Log::debug('Manual payment endpoint getting hit. account/{id}/payment. paymentController@store ' . json_encode(\Input::all()));
273 273
 
274 274
         $reason = \Input::get('reason');
275 275
 
@@ -407,7 +407,7 @@  discard block
 block discarded – undo
407 407
     {
408 408
         $payment = $this->paymentRepository->getById($paymentId);
409 409
 
410
-        switch($request->get('change')) {
410
+        switch ($request->get('change')) {
411 411
             case 'assign-unknown-to-user':
412 412
                 $newUserId = $request->get('user_id');
413 413
                 try {
Please login to merge, or discard this patch.
app/Http/Controllers/ReminderController.php 3 patches
Indentation   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -9,16 +9,16 @@  discard block
 block discarded – undo
9 9
 class ReminderController extends Controller
10 10
 {
11 11
 
12
-	/**
13
-	 * Display the password reminder view.
14
-	 *
15
-	 * @return Response
16
-	 */
17
-	public function create()
18
-	{
12
+    /**
13
+     * Display the password reminder view.
14
+     *
15
+     * @return Response
16
+     */
17
+    public function create()
18
+    {
19 19
 
20 20
         return view('password.create');
21
-	}
21
+    }
22 22
 
23 23
     /**
24 24
      * Handle a POST request to remind a user of their password.
@@ -26,8 +26,8 @@  discard block
 block discarded – undo
26 26
      * @param Request $request
27 27
      * @return \Illuminate\Http\RedirectResponse|null
28 28
      */
29
-	public function store(Request $request)
30
-	{
29
+    public function store(Request $request)
30
+    {
31 31
         $validator = app('Illuminate\Contracts\Validation\Factory')->make($request->all(), ['email' => 'required|email']);
32 32
         if ($validator->fails()) {
33 33
             throw new FormValidationException('Error', $validator->errors());
@@ -39,31 +39,31 @@  discard block
 block discarded – undo
39 39
         });
40 40
 
41 41
         switch ($response) {
42
-			case Password::INVALID_USER:
42
+            case Password::INVALID_USER:
43 43
                 \Notification::error(trans($response));
44 44
                 return redirect()->back();
45 45
 
46
-			case Password::RESET_LINK_SENT:
46
+            case Password::RESET_LINK_SENT:
47 47
                 \Notification::success(trans($response));
48 48
                 return redirect()->back();
49
-		}
50
-	}
51
-
52
-	/**
53
-	 * Display the password reset view for the given token.
54
-	 *
55
-	 * @param  string  $token
56
-	 * @return Response
57
-	 */
58
-	public function getReset($token = null)
59
-	{
49
+        }
50
+    }
51
+
52
+    /**
53
+     * Display the password reset view for the given token.
54
+     *
55
+     * @param  string  $token
56
+     * @return Response
57
+     */
58
+    public function getReset($token = null)
59
+    {
60 60
         if (is_null($token))
61 61
         {
62 62
             throw new NotFoundHttpException;
63 63
         }
64 64
 
65 65
         return view('password.reset')->with('token', $token);
66
-	}
66
+    }
67 67
 
68 68
     /**
69 69
      * Handle a POST request to reset a user's password.
@@ -71,8 +71,8 @@  discard block
 block discarded – undo
71 71
      * @param Request $request
72 72
      * @return \Illuminate\Http\RedirectResponse|null
73 73
      */
74
-	public function postReset(Request $request)
75
-	{
74
+    public function postReset(Request $request)
75
+    {
76 76
         $credentials = $request->only(
77 77
             'email', 'password', 'password_confirmation', 'token'
78 78
         );
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
             throw new FormValidationException('Error', $validator->errors());
34 34
         }
35 35
 
36
-        $response = Password::sendResetLink($request->only('email'), function(Message $message)
36
+        $response = Password::sendResetLink($request->only('email'), function (Message $message)
37 37
         {
38 38
             $message->subject('Reset your password');
39 39
         });
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
         //We aren't using a confirm password box so this can be faked
90 90
         $credentials['password_confirmation'] = $credentials['password'];
91 91
 
92
-        $response = Password::reset($credentials, function($user, $password) {
92
+        $response = Password::reset($credentials, function ($user, $password) {
93 93
             $user->password = $password;
94 94
 
95 95
             $user->save();
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -33,8 +33,7 @@  discard block
 block discarded – undo
33 33
             throw new FormValidationException('Error', $validator->errors());
34 34
         }
35 35
 
36
-        $response = Password::sendResetLink($request->only('email'), function(Message $message)
37
-        {
36
+        $response = Password::sendResetLink($request->only('email'), function(Message $message) {
38 37
             $message->subject('Reset your password');
39 38
         });
40 39
 
@@ -57,8 +56,7 @@  discard block
 block discarded – undo
57 56
 	 */
58 57
 	public function getReset($token = null)
59 58
 	{
60
-        if (is_null($token))
61
-        {
59
+        if (is_null($token)) {
62 60
             throw new NotFoundHttpException;
63 61
         }
64 62
 
Please login to merge, or discard this patch.
app/Http/Controllers/SessionController.php 1 patch
Indentation   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -16,27 +16,27 @@  discard block
 block discarded – undo
16 16
     }
17 17
 
18 18
 
19
-	/**
20
-	 * Show the form for creating a new resource.
21
-	 *
22
-	 * @return Response
23
-	 */
24
-	public function create()
25
-	{
19
+    /**
20
+     * Show the form for creating a new resource.
21
+     *
22
+     * @return Response
23
+     */
24
+    public function create()
25
+    {
26 26
         if ( ! Auth::guest()) {
27 27
             return redirect()->to('account/' . \Auth::id());
28 28
         }
29 29
         return \View::make('session.create');
30
-	}
30
+    }
31 31
 
32 32
 
33
-	/**
34
-	 * Store a newly created resource in storage.
35
-	 *
36
-	 * @return \Illuminate\Http\RedirectResponse
37
-	 */
38
-	public function store()
39
-	{
33
+    /**
34
+     * Store a newly created resource in storage.
35
+     *
36
+     * @return \Illuminate\Http\RedirectResponse
37
+     */
38
+    public function store()
39
+    {
40 40
         $input = \Input::only('email', 'password');
41 41
 
42 42
         $this->loginForm->validate($input);
@@ -47,23 +47,23 @@  discard block
 block discarded – undo
47 47
 
48 48
         \Notification::error("Invalid login details");
49 49
         return redirect()->back()->withInput();
50
-	}
50
+    }
51 51
 
52 52
 
53
-	/**
54
-	 * Remove the specified resource from storage.
55
-	 *
56
-	 * @param  int  $id
57
-	 * @return \Illuminate\Http\RedirectResponse
58
-	 */
59
-	public function destroy($id = null)
60
-	{
53
+    /**
54
+     * Remove the specified resource from storage.
55
+     *
56
+     * @param  int  $id
57
+     * @return \Illuminate\Http\RedirectResponse
58
+     */
59
+    public function destroy($id = null)
60
+    {
61 61
         Auth::logout();
62 62
 
63 63
         \Notification::success('Logged Out');
64 64
 
65 65
         return redirect()->home();
66
-	}
66
+    }
67 67
 
68 68
     /**
69 69
      * @param Request $request
Please login to merge, or discard this patch.
app/Http/Middleware/Authenticate.php 2 patches
Indentation   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -5,46 +5,46 @@
 block discarded – undo
5 5
 
6 6
 class Authenticate {
7 7
 
8
-	/**
9
-	 * The Guard implementation.
10
-	 *
11
-	 * @var Guard
12
-	 */
13
-	protected $auth;
8
+    /**
9
+     * The Guard implementation.
10
+     *
11
+     * @var Guard
12
+     */
13
+    protected $auth;
14 14
 
15
-	/**
16
-	 * Create a new filter instance.
17
-	 *
18
-	 * @param  Guard  $auth
19
-	 * @return void
20
-	 */
21
-	public function __construct(Guard $auth)
22
-	{
23
-		$this->auth = $auth;
24
-	}
15
+    /**
16
+     * Create a new filter instance.
17
+     *
18
+     * @param  Guard  $auth
19
+     * @return void
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->guest())
36
-		{
37
-			if ($request->ajax())
38
-			{
39
-				return response('Unauthorized.', 401);
40
-			}
41
-			else
42
-			{
43
-				return redirect()->guest('auth/login');
44
-			}
45
-		}
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->guest())
36
+        {
37
+            if ($request->ajax())
38
+            {
39
+                return response('Unauthorized.', 401);
40
+            }
41
+            else
42
+            {
43
+                return redirect()->guest('auth/login');
44
+            }
45
+        }
46 46
 
47
-		return $next($request);
48
-	}
47
+        return $next($request);
48
+    }
49 49
 
50 50
 }
Please login to merge, or discard this patch.
Braces   +5 added lines, -8 removed lines patch added patch discarded remove patch
@@ -3,7 +3,8 @@  discard block
 block discarded – undo
3 3
 use Closure;
4 4
 use Illuminate\Contracts\Auth\Guard;
5 5
 
6
-class Authenticate {
6
+class Authenticate
7
+{
7 8
 
8 9
 	/**
9 10
 	 * The Guard implementation.
@@ -32,14 +33,10 @@  discard block
 block discarded – undo
32 33
 	 */
33 34
 	public function handle($request, Closure $next)
34 35
 	{
35
-		if ($this->auth->guest())
36
-		{
37
-			if ($request->ajax())
38
-			{
36
+		if ($this->auth->guest()) {
37
+			if ($request->ajax()) {
39 38
 				return response('Unauthorized.', 401);
40
-			}
41
-			else
42
-			{
39
+			} else {
43 40
 				return redirect()->guest('auth/login');
44 41
 			}
45 42
 		}
Please login to merge, or discard this patch.