Completed
Push — master ( 6ca47f...d686bf )
by Arthur
41s queued 24s
created
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/ExpensesController.php 3 patches
Indentation   +49 added lines, -49 removed lines patch added patch discarded remove patch
@@ -33,8 +33,8 @@  discard block
 block discarded – undo
33 33
      * @return Response
34 34
      * @throws \BB\Exceptions\AuthenticationException
35 35
      */
36
-	public function index()
37
-	{
36
+    public function index()
37
+    {
38 38
         $userId       = \Request::get('user_id', '');
39 39
         $sortBy       = \Request::get('sortBy', 'created_at');
40 40
         $direction    = \Request::get('direction', 'desc');
@@ -49,18 +49,18 @@  discard block
 block discarded – undo
49 49
         $expenses = $this->expenseRepository->getPaginated(compact('sortBy', 'direction'));
50 50
 
51 51
         return \View::make('expenses.index')->with('expenses', $expenses);
52
-	}
52
+    }
53 53
 
54 54
 
55
-	/**
56
-	 * Show the form for creating a new resource.
57
-	 *
58
-	 * @return Response
59
-	 */
60
-	public function create()
61
-	{
62
-		//
63
-	}
55
+    /**
56
+     * Show the form for creating a new resource.
57
+     *
58
+     * @return Response
59
+     */
60
+    public function create()
61
+    {
62
+        //
63
+    }
64 64
 
65 65
 
66 66
     /**
@@ -70,9 +70,9 @@  discard block
 block discarded – undo
70 70
      * @throws ImageFailedException
71 71
      * @throws \BB\Exceptions\FormValidationException
72 72
      */
73
-	public function store()
74
-	{
75
-		$data = \Request::only(['user_id', 'category', 'description', 'amount', 'expense_date', 'file']);
73
+    public function store()
74
+    {
75
+        $data = \Request::only(['user_id', 'category', 'description', 'amount', 'expense_date', 'file']);
76 76
 
77 77
         $this->expenseValidator->validate($data);
78 78
 
@@ -107,31 +107,31 @@  discard block
 block discarded – undo
107 107
         event(new NewExpenseSubmitted($expense));
108 108
 
109 109
         return \Response::json($expense, 201);
110
-	}
110
+    }
111 111
 
112 112
 
113
-	/**
114
-	 * Display the specified resource.
115
-	 *
116
-	 * @param  int  $id
117
-	 * @return Response
118
-	 */
119
-	public function show($id)
120
-	{
121
-		return \BB\Entities\Expense::findOrFail($id);
122
-	}
113
+    /**
114
+     * Display the specified resource.
115
+     *
116
+     * @param  int  $id
117
+     * @return Response
118
+     */
119
+    public function show($id)
120
+    {
121
+        return \BB\Entities\Expense::findOrFail($id);
122
+    }
123 123
 
124 124
 
125
-	/**
126
-	 * Show the form for editing the specified resource.
127
-	 *
128
-	 * @param  int  $id
129
-	 * @return Response
130
-	 */
131
-	public function edit($id)
132
-	{
133
-		//
134
-	}
125
+    /**
126
+     * Show the form for editing the specified resource.
127
+     *
128
+     * @param  int  $id
129
+     * @return Response
130
+     */
131
+    public function edit($id)
132
+    {
133
+        //
134
+    }
135 135
 
136 136
 
137 137
     /**
@@ -141,8 +141,8 @@  discard block
 block discarded – undo
141 141
      * @return Response
142 142
      * @throws \BB\Exceptions\AuthenticationException
143 143
      */
144
-	public function update($id)
145
-	{
144
+    public function update($id)
145
+    {
146 146
         /**
147 147
         if (\Request::ajax()) {
148 148
             $data = \Request::only(['category', 'description', 'amount', 'expense_date']);
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
 
153 153
             return $expense;
154 154
         }
155
-        */
155
+         */
156 156
 
157 157
         if ( ! \Auth::user()->hasRole('admin')) {
158 158
             throw new \BB\Exceptions\AuthenticationException();
@@ -167,20 +167,20 @@  discard block
 block discarded – undo
167 167
         }
168 168
 
169 169
         return \Redirect::route('expenses.index');
170
-	}
170
+    }
171 171
 
172 172
 
173
-	/**
174
-	 * Remove the specified resource from storage.
175
-	 *
176
-	 * @param  int  $id
177
-	 * @return Response
178
-	 */
179
-	public function destroy($id)
180
-	{
173
+    /**
174
+     * Remove the specified resource from storage.
175
+     *
176
+     * @param  int  $id
177
+     * @return Response
178
+     */
179
+    public function destroy($id)
180
+    {
181 181
         //$expense = \BB\Entities\Expense::findOrFail($id);
182 182
         //$expense->delete();
183
-	}
183
+    }
184 184
 
185 185
 
186 186
 }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -83,13 +83,13 @@
 block discarded – undo
83 83
                 $ext = \Input::file('file')->guessClientExtension();
84 84
                 $mimeType = \Input::file('file')->getMimeType();
85 85
 
86
-                $newFilename = \App::environment().'/expenses/' . str_random() . '.' . $ext;
86
+                $newFilename = \App::environment() . '/expenses/' . str_random() . '.' . $ext;
87 87
 
88 88
                 Storage::put($newFilename, file_get_contents($filePath), 'public');
89 89
 
90 90
                 $data['file'] = $newFilename;
91 91
 
92
-            } catch(\Exception $e) {
92
+            } catch (\Exception $e) {
93 93
                 \Log::error($e);
94 94
                 throw new ImageFailedException($e->getMessage());
95 95
             }
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,8 @@
 block discarded – undo
6 6
 use Illuminate\Support\Facades\Response;
7 7
 use Illuminate\Support\Facades\Storage;
8 8
 
9
-class ExpensesController extends Controller {
9
+class ExpensesController extends Controller
10
+{
10 11
 
11 12
     /**
12 13
      * @var \BB\Validators\ExpenseValidator
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.
app/Http/Middleware/BrandingHeaders.php 2 patches
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -4,21 +4,21 @@
 block discarded – undo
4 4
 
5 5
 class BrandingHeaders {
6 6
 
7
-	/**
8
-	 * Handle an incoming request.
9
-	 *
10
-	 * @param  \Illuminate\Http\Request  $request
11
-	 * @param  \Closure  $next
12
-	 * @return mixed
13
-	 */
14
-	public function handle($request, Closure $next)
15
-	{
7
+    /**
8
+     * Handle an incoming request.
9
+     *
10
+     * @param  \Illuminate\Http\Request  $request
11
+     * @param  \Closure  $next
12
+     * @return mixed
13
+     */
14
+    public function handle($request, Closure $next)
15
+    {
16 16
         //Don't add the header to acs requests
17 17
         if ((strpos($request->path(), 'access-control/') === 0) || ($request->path() === 'acs') || ($request->path() === 'acs/spark')) {
18 18
             return $next($request);
19 19
         }
20 20
 
21
-		return $next($request)->header('Built-By', 'arthurguy.co.uk');
22
-	}
21
+        return $next($request)->header('Built-By', 'arthurguy.co.uk');
22
+    }
23 23
 
24 24
 }
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,8 @@
 block discarded – undo
2 2
 
3 3
 use Closure;
4 4
 
5
-class BrandingHeaders {
5
+class BrandingHeaders
6
+{
6 7
 
7 8
 	/**
8 9
 	 * Handle an incoming request.
Please login to merge, or discard this patch.
app/Http/Middleware/RedirectIfAuthenticated.php 2 patches
Indentation   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -6,39 +6,39 @@
 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
-	 * @return void
21
-	 */
22
-	public function __construct(Guard $auth)
23
-	{
24
-		$this->auth = $auth;
25
-	}
16
+    /**
17
+     * Create a new filter instance.
18
+     *
19
+     * @param  Guard  $auth
20
+     * @return void
21
+     */
22
+    public function __construct(Guard $auth)
23
+    {
24
+        $this->auth = $auth;
25
+    }
26 26
 
27
-	/**
28
-	 * Handle an incoming request.
29
-	 *
30
-	 * @param  \Illuminate\Http\Request  $request
31
-	 * @param  \Closure  $next
32
-	 * @return mixed
33
-	 */
34
-	public function handle($request, Closure $next)
35
-	{
36
-		if ($this->auth->check())
37
-		{
38
-			return new RedirectResponse(url('/home'));
39
-		}
27
+    /**
28
+     * Handle an incoming request.
29
+     *
30
+     * @param  \Illuminate\Http\Request  $request
31
+     * @param  \Closure  $next
32
+     * @return mixed
33
+     */
34
+    public function handle($request, Closure $next)
35
+    {
36
+        if ($this->auth->check())
37
+        {
38
+            return new RedirectResponse(url('/home'));
39
+        }
40 40
 
41
-		return $next($request);
42
-	}
41
+        return $next($request);
42
+    }
43 43
 
44 44
 }
Please login to merge, or discard this patch.
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -4,7 +4,8 @@  discard block
 block discarded – undo
4 4
 use Illuminate\Contracts\Auth\Guard;
5 5
 use Illuminate\Http\RedirectResponse;
6 6
 
7
-class RedirectIfAuthenticated {
7
+class RedirectIfAuthenticated
8
+{
8 9
 
9 10
 	/**
10 11
 	 * The Guard implementation.
@@ -33,8 +34,7 @@  discard block
 block discarded – undo
33 34
 	 */
34 35
 	public function handle($request, Closure $next)
35 36
 	{
36
-		if ($this->auth->check())
37
-		{
37
+		if ($this->auth->check()) {
38 38
 			return new RedirectResponse(url('/home'));
39 39
 		}
40 40
 
Please login to merge, or discard this patch.