@@ -126,7 +126,7 @@ |
||
126 | 126 | /** |
127 | 127 | * Add a photo name to the photos array |
128 | 128 | * |
129 | - * @param $fileName |
|
129 | + * @param string $fileName |
|
130 | 130 | */ |
131 | 131 | public function addPhoto($fileName) |
132 | 132 | { |
@@ -58,6 +58,9 @@ |
||
58 | 58 | return $record; |
59 | 59 | } |
60 | 60 | |
61 | + /** |
|
62 | + * @param string $fobId |
|
63 | + */ |
|
61 | 64 | public static function lookupPartialTag($fobId) |
62 | 65 | { |
63 | 66 | $record = self::where('key_id', 'LIKE', '%' . strtoupper($fobId) . '%')->active()->first(); |
@@ -18,6 +18,9 @@ |
||
18 | 18 | return $this->belongsToMany('\BB\Entities\User')->withTimestamps(); |
19 | 19 | } |
20 | 20 | |
21 | + /** |
|
22 | + * @param string $name |
|
23 | + */ |
|
21 | 24 | public static function findByName($name) { |
22 | 25 | $role = self::where('name', $name)->first(); |
23 | 26 | if ($role) { |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | /** |
42 | 42 | * Record the start of a new session |
43 | 43 | * |
44 | - * @return \Illuminate\Http\Response |
|
44 | + * @return \Illuminate\Http\JsonResponse |
|
45 | 45 | * |
46 | 46 | * @SWG\Post( |
47 | 47 | * path="/acs/activity", |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | /** |
81 | 81 | * Update an ongoing activity |
82 | 82 | * |
83 | - * @return \Illuminate\Http\Response |
|
83 | + * @return \Illuminate\Http\JsonResponse |
|
84 | 84 | * |
85 | 85 | * @SWG\Put( |
86 | 86 | * path="/acs/activity/{activityId}", |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | /** |
104 | 104 | * Show the form for creating a new resource. |
105 | 105 | * |
106 | - * @return \Illuminate\Http\Response |
|
106 | + * @return \Illuminate\Http\JsonResponse |
|
107 | 107 | * |
108 | 108 | * @SWG\Delete( |
109 | 109 | * path="/acs/activity/{activityId}", |
@@ -73,7 +73,7 @@ |
||
73 | 73 | |
74 | 74 | |
75 | 75 | return response()->json([ |
76 | - 'activityId' => isset($activityId)? $activityId: null, |
|
76 | + 'activityId' => isset($activityId) ? $activityId : null, |
|
77 | 77 | 'user' => [ |
78 | 78 | 'id' => $keyFob->user->id, |
79 | 79 | 'name' => $keyFob->user->name, |
@@ -66,7 +66,7 @@ |
||
66 | 66 | /** |
67 | 67 | * Store a newly created resource in storage. |
68 | 68 | * |
69 | - * @return Response |
|
69 | + * @return \Illuminate\Http\JsonResponse |
|
70 | 70 | * @throws ImageFailedException |
71 | 71 | * @throws \BB\Exceptions\FormValidationException |
72 | 72 | */ |
@@ -83,13 +83,13 @@ |
||
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 | } |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | * Locate a users active session |
63 | 63 | * @param integer $userId |
64 | 64 | * @param string $deviceKey |
65 | - * @return integer|false |
|
65 | + * @return integer |
|
66 | 66 | */ |
67 | 67 | public function findActiveUserSession($userId, $deviceKey) |
68 | 68 | { |
@@ -76,8 +76,8 @@ discard block |
||
76 | 76 | |
77 | 77 | /** |
78 | 78 | * Return an existing active session for the device, if any |
79 | - * @param $deviceKey |
|
80 | - * @return integer|false |
|
79 | + * @param string $deviceKey |
|
80 | + * @return integer |
|
81 | 81 | */ |
82 | 82 | public function findActiveDeviceSession($deviceKey) |
83 | 83 | { |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | |
133 | 133 | /** |
134 | 134 | * Return records that have been checked over |
135 | - * @param $deviceKey |
|
135 | + * @param string $deviceKey |
|
136 | 136 | * @return mixed |
137 | 137 | */ |
138 | 138 | public function getFinishedForEquipment($deviceKey) |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | /** |
144 | 144 | * @param string $deviceKey |
145 | 145 | * @param bool $billedTime |
146 | - * @param null $reason |
|
146 | + * @param string $reason |
|
147 | 147 | * @return int |
148 | 148 | */ |
149 | 149 | public function getTotalTime($deviceKey, $billedTime = null, $reason = null) |
@@ -167,7 +167,7 @@ |
||
167 | 167 | } |
168 | 168 | }); |
169 | 169 | |
170 | - return (int) ($totalTime / 60); |
|
170 | + return (int)($totalTime / 60); |
|
171 | 171 | } |
172 | 172 | |
173 | 173 | /** |
@@ -33,28 +33,28 @@ |
||
33 | 33 | { |
34 | 34 | |
35 | 35 | $schedule->command('bb:calculate-proposal-votes')->hourly() |
36 | - ->then( function () { $this->pingIfProduction('http://beats.envoyer.io/heartbeat/U6l211ROnnZR1vI'); } ); |
|
36 | + ->then(function () { $this->pingIfProduction('http://beats.envoyer.io/heartbeat/U6l211ROnnZR1vI'); } ); |
|
37 | 37 | |
38 | 38 | $schedule->command('bb:check-memberships')->dailyAt('06:00') |
39 | - ->then( function () { $this->pingIfProduction('http://beats.envoyer.io/heartbeat/76TWKkWBBpaIyOe'); } ); |
|
39 | + ->then(function () { $this->pingIfProduction('http://beats.envoyer.io/heartbeat/76TWKkWBBpaIyOe'); } ); |
|
40 | 40 | |
41 | 41 | $schedule->command('bb:fix-equipment-log')->hourly() |
42 | - ->then( function () { $this->pingIfProduction('http://beats.envoyer.io/heartbeat/nxi4SJkwZpIAkBv'); } ); |
|
42 | + ->then(function () { $this->pingIfProduction('http://beats.envoyer.io/heartbeat/nxi4SJkwZpIAkBv'); } ); |
|
43 | 43 | |
44 | 44 | $schedule->command('bb:calculate-equipment-fees')->dailyAt('02:00') |
45 | - ->then( function () { $this->pingIfProduction('http://beats.envoyer.io/heartbeat/tFdRdkUoqSa8X66'); } ); |
|
45 | + ->then(function () { $this->pingIfProduction('http://beats.envoyer.io/heartbeat/tFdRdkUoqSa8X66'); } ); |
|
46 | 46 | |
47 | 47 | $schedule->command('bb:update-balances')->dailyAt('03:00') |
48 | - ->then( function () { $this->pingIfProduction('http://beats.envoyer.io/heartbeat/TSmoQANsHU9jbtU'); } ); |
|
48 | + ->then(function () { $this->pingIfProduction('http://beats.envoyer.io/heartbeat/TSmoQANsHU9jbtU'); } ); |
|
49 | 49 | |
50 | 50 | $schedule->command('bb:create-todays-sub-charges')->dailyAt('01:00') |
51 | - ->then( function () { $this->pingIfProduction('http://beats.envoyer.io/heartbeat/wSIUR1E2wjVBzPg'); } ); |
|
51 | + ->then(function () { $this->pingIfProduction('http://beats.envoyer.io/heartbeat/wSIUR1E2wjVBzPg'); } ); |
|
52 | 52 | |
53 | 53 | $schedule->command('bb:bill-members')->dailyAt('01:30') |
54 | - ->then( function () { $this->pingIfProduction('http://beats.envoyer.io/heartbeat/nxAz59P6LXlu2P1'); } ); |
|
54 | + ->then(function () { $this->pingIfProduction('http://beats.envoyer.io/heartbeat/nxAz59P6LXlu2P1'); } ); |
|
55 | 55 | |
56 | 56 | $schedule->command('device:check-online')->everyTenMinutes() |
57 | - ->then( function () { $this->pingIfProduction('http://beats.envoyer.io/heartbeat/WU4zql7LwZs1CzT'); } ); |
|
57 | + ->then(function () { $this->pingIfProduction('http://beats.envoyer.io/heartbeat/WU4zql7LwZs1CzT'); } ); |
|
58 | 58 | } |
59 | 59 | |
60 | 60 | protected function pingIfProduction($url) |
@@ -46,7 +46,7 @@ |
||
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 |
@@ -20,7 +20,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 | } |