Completed
Pull Request — master (#237)
by
unknown
04:56 queued 02:55
created
app/Entities/ACSNode.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
     public function heartbeatWarning()
47 47
     {
48 48
         //If the last heartbeat was more than an hour ago there is an issue
49
-        if ( $this->monitor_heartbeat && ($this->last_heartbeat < Carbon::now()->subHour())) {
49
+        if ($this->monitor_heartbeat && ($this->last_heartbeat < Carbon::now()->subHour())) {
50 50
             return true;
51 51
         }
52 52
 
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
@@ -2,6 +2,6 @@
 block discarded – undo
2 2
 
3 3
 abstract class Event {
4 4
 
5
-	//
5
+    //
6 6
 
7 7
 }
Please login to merge, or discard this patch.
app/Exceptions/Handler.php 2 patches
Indentation   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -9,43 +9,43 @@  discard block
 block discarded – undo
9 9
 
10 10
 class Handler extends ExceptionHandler {
11 11
 
12
-	/**
13
-	 * A list of the exception types that should not be reported.
14
-	 *
15
-	 * @var array
16
-	 */
17
-	protected $dontReport = [
12
+    /**
13
+     * A list of the exception types that should not be reported.
14
+     *
15
+     * @var array
16
+     */
17
+    protected $dontReport = [
18 18
         HttpException::class,
19 19
         NotFoundHttpException::class,
20 20
         ModelNotFoundException::class,
21 21
         MethodNotAllowedHttpException::class,
22 22
         FormValidationException::class,
23 23
         AuthenticationException::class,         //These are logged separately below
24
-	];
24
+    ];
25 25
 
26
-	/**
27
-	 * Report or log an exception.
28
-	 *
29
-	 * This is a great spot to send exceptions to Sentry, Bugsnag, etc.
30
-	 *
31
-	 * @param  \Exception  $e
32
-	 * @return void
33
-	 */
34
-	public function report(Exception $e)
35
-	{
26
+    /**
27
+     * Report or log an exception.
28
+     *
29
+     * This is a great spot to send exceptions to Sentry, Bugsnag, etc.
30
+     *
31
+     * @param  \Exception  $e
32
+     * @return void
33
+     */
34
+    public function report(Exception $e)
35
+    {
36 36
         //The parent will log exceptions that aren't of the types above
37
-		parent::report($e);
38
-	}
37
+        parent::report($e);
38
+    }
39 39
 
40
-	/**
41
-	 * Render an exception into an HTTP response.
42
-	 *
43
-	 * @param  \Illuminate\Http\Request  $request
44
-	 * @param  \Exception  $e
45
-	 * @return \Illuminate\Http\Response
46
-	 */
47
-	public function render($request, Exception $e)
48
-	{
40
+    /**
41
+     * Render an exception into an HTTP response.
42
+     *
43
+     * @param  \Illuminate\Http\Request  $request
44
+     * @param  \Exception  $e
45
+     * @return \Illuminate\Http\Response
46
+     */
47
+    public function render($request, Exception $e)
48
+    {
49 49
         if ($e instanceof FormValidationException) {
50 50
             if ($request->wantsJson()) {
51 51
                 return \Response::json($e->getErrors(), 422);
@@ -92,8 +92,8 @@  discard block
 block discarded – undo
92 92
                 return \Response::json(['error' => $e->getMessage()], $e->getStatusCode());
93 93
             }
94 94
         }
95
-		return parent::render($request, $e);
96
-	}
95
+        return parent::render($request, $e);
96
+    }
97 97
 
98 98
     /**
99 99
      * Render an exception using Whoops.
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
         ModelNotFoundException::class,
21 21
         MethodNotAllowedHttpException::class,
22 22
         FormValidationException::class,
23
-        AuthenticationException::class,         //These are logged separately below
23
+        AuthenticationException::class, //These are logged separately below
24 24
 	];
25 25
 
26 26
 	/**
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
         }
64 64
 
65 65
         if ($e instanceof NotImplementedException) {
66
-            \Notification::error("NotImplementedException: ".$e->getMessage());
66
+            \Notification::error("NotImplementedException: " . $e->getMessage());
67 67
             \Log::warning($e);
68 68
             return redirect()->back()->withInput();
69 69
         }
@@ -72,8 +72,8 @@  discard block
 block discarded – undo
72 72
             if ($request->wantsJson()) {
73 73
                 return \Response::json(['error' => $e->getMessage()], 403);
74 74
             }
75
-            $userString = \Auth::guest() ? "A guest": \Auth::user()->name;
76
-            \Log::warning($userString." tried to access something they weren't supposed to.");
75
+            $userString = \Auth::guest() ? "A guest" : \Auth::user()->name;
76
+            \Log::warning($userString . " tried to access something they weren't supposed to.");
77 77
 
78 78
             return \Response::view('errors.403', [], 403);
79 79
         }
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
             $e = new HttpException(404, $e->getMessage());
83 83
         }
84 84
 
85
-        if (config('app.debug') && $this->shouldReport($e) && !$request->wantsJson())
85
+        if (config('app.debug') && $this->shouldReport($e) && ! $request->wantsJson())
86 86
         {
87 87
             return $this->renderExceptionWithWhoops($e);
88 88
         }
Please login to merge, or discard this patch.
app/Http/Controllers/ACSSparkController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
     function __construct(ACSNodeRepository $acsNodeRepository, KeyFobAccess $keyFobAccess, PaymentRepository $paymentRepository)
25 25
     {
26 26
         $this->acsNodeRepository = $acsNodeRepository;
27
-        $this->keyFobAccess     = $keyFobAccess;
27
+        $this->keyFobAccess = $keyFobAccess;
28 28
         $this->paymentRepository = $paymentRepository;
29 29
     }
30 30
 
Please login to merge, or discard this patch.
app/Http/Controllers/Auth/AuthController.php 1 patch
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.
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 1 patch
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.
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 2 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.