@@ -57,7 +57,7 @@ |
||
57 | 57 | return; |
58 | 58 | } |
59 | 59 | |
60 | - if ( ! $this->config->get('understand-laravel.log_types.exception_log.enabled')) |
|
60 | + if (!$this->config->get('understand-laravel.log_types.exception_log.enabled')) |
|
61 | 61 | { |
62 | 62 | return; |
63 | 63 | } |
@@ -19,7 +19,7 @@ |
||
19 | 19 | } |
20 | 20 | catch (\Exception $ex) |
21 | 21 | { |
22 | - if ( ! $this->silent) |
|
22 | + if (!$this->silent) |
|
23 | 23 | { |
24 | 24 | throw new \Understand\UnderstandLaravel5\Exceptions\HandlerException($ex->getMessage(), $ex->getCode(), $ex); |
25 | 25 | } |
@@ -10,7 +10,7 @@ |
||
10 | 10 | */ |
11 | 11 | public function __construct($message = '', $code = 0, $previous = null) |
12 | 12 | { |
13 | - $message = 'understand-laravel: ' . $message; |
|
13 | + $message = 'understand-laravel: '.$message; |
|
14 | 14 | |
15 | 15 | parent::__construct($message, $code, $previous); |
16 | 16 | } |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | { |
132 | 132 | if (!$responseArr) |
133 | 133 | { |
134 | - throw new HandlerException('Cannot create connection to ' . $this->apiUrl); |
|
134 | + throw new HandlerException('Cannot create connection to '.$this->apiUrl); |
|
135 | 135 | } |
136 | 136 | |
137 | 137 | if (isset($responseArr['error'])) |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | throw new HandlerException($responseArr['error']); |
140 | 140 | } |
141 | 141 | |
142 | - throw new HandlerException('Error. ' . ' Request data: ' . json_decode($requestData)); |
|
142 | + throw new HandlerException('Error. '.' Request data: '.json_decode($requestData)); |
|
143 | 143 | } |
144 | 144 | |
145 | 145 | } |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | */ |
200 | 200 | protected function getSessionId() |
201 | 201 | { |
202 | - if ( ! $this->session) |
|
202 | + if (!$this->session) |
|
203 | 203 | { |
204 | 204 | return null; |
205 | 205 | } |
@@ -219,7 +219,7 @@ discard block |
||
219 | 219 | */ |
220 | 220 | protected function getRouteName() |
221 | 221 | { |
222 | - if ( ! $this->router) |
|
222 | + if (!$this->router) |
|
223 | 223 | { |
224 | 224 | return null; |
225 | 225 | } |
@@ -234,23 +234,23 @@ discard block |
||
234 | 234 | */ |
235 | 235 | protected function getUrl() |
236 | 236 | { |
237 | - if ( ! $this->request) |
|
237 | + if (!$this->request) |
|
238 | 238 | { |
239 | 239 | return null; |
240 | 240 | } |
241 | 241 | |
242 | 242 | $url = $this->request->path(); |
243 | 243 | |
244 | - if ( ! starts_with($url, '/')) |
|
244 | + if (!starts_with($url, '/')) |
|
245 | 245 | { |
246 | - $url = '/' . $url; |
|
246 | + $url = '/'.$url; |
|
247 | 247 | } |
248 | 248 | |
249 | 249 | $queryString = $this->request->getQueryString(); |
250 | 250 | |
251 | 251 | if ($queryString) |
252 | 252 | { |
253 | - $url .= '?' . $queryString; |
|
253 | + $url .= '?'.$queryString; |
|
254 | 254 | } |
255 | 255 | |
256 | 256 | return $url; |
@@ -263,7 +263,7 @@ discard block |
||
263 | 263 | */ |
264 | 264 | protected function getRequestMethod() |
265 | 265 | { |
266 | - if ( ! $this->request) |
|
266 | + if (!$this->request) |
|
267 | 267 | { |
268 | 268 | return null; |
269 | 269 | } |
@@ -278,7 +278,7 @@ discard block |
||
278 | 278 | */ |
279 | 279 | protected function getServerIp() |
280 | 280 | { |
281 | - if ( ! $this->request) |
|
281 | + if (!$this->request) |
|
282 | 282 | { |
283 | 283 | return null; |
284 | 284 | } |
@@ -293,7 +293,7 @@ discard block |
||
293 | 293 | */ |
294 | 294 | protected function getClientIp() |
295 | 295 | { |
296 | - if ( ! $this->request) |
|
296 | + if (!$this->request) |
|
297 | 297 | { |
298 | 298 | return null; |
299 | 299 | } |
@@ -308,7 +308,7 @@ discard block |
||
308 | 308 | */ |
309 | 309 | protected function getClientUserAgent() |
310 | 310 | { |
311 | - if ( ! $this->request) |
|
311 | + if (!$this->request) |
|
312 | 312 | { |
313 | 313 | return null; |
314 | 314 | } |
@@ -334,7 +334,7 @@ discard block |
||
334 | 334 | */ |
335 | 335 | protected function getFromSession($key) |
336 | 336 | { |
337 | - if ( ! $this->session) |
|
337 | + if (!$this->session) |
|
338 | 338 | { |
339 | 339 | return null; |
340 | 340 | } |
@@ -110,9 +110,9 @@ discard block |
||
110 | 110 | */ |
111 | 111 | protected function formatMessage($message) |
112 | 112 | { |
113 | - if ( ! is_bool($message)) |
|
113 | + if (!is_bool($message)) |
|
114 | 114 | { |
115 | - return (string)$message; |
|
115 | + return (string) $message; |
|
116 | 116 | } |
117 | 117 | |
118 | 118 | // cast boolean values to "1" or "0" strings |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | } |
159 | 159 | catch (\Exception $ex) |
160 | 160 | { |
161 | - if (! $this->silent) |
|
161 | + if (!$this->silent) |
|
162 | 162 | { |
163 | 163 | throw new $ex; |
164 | 164 | } |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | */ |
90 | 90 | protected function stackTraceCallToString(array $trace) |
91 | 91 | { |
92 | - if (! isset($trace['type'])) |
|
92 | + if (!isset($trace['type'])) |
|
93 | 93 | { |
94 | 94 | return 'function'; |
95 | 95 | } |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | { |
116 | 116 | $params = []; |
117 | 117 | |
118 | - if (! isset($trace['args'])) |
|
118 | + if (!isset($trace['args'])) |
|
119 | 119 | { |
120 | 120 | return $params; |
121 | 121 | } |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | { |
125 | 125 | if (is_array($arg)) |
126 | 126 | { |
127 | - $params[] = 'array(' . count($arg) . ')'; |
|
127 | + $params[] = 'array('.count($arg).')'; |
|
128 | 128 | } |
129 | 129 | else if (is_object($arg)) |
130 | 130 | { |
@@ -132,19 +132,19 @@ discard block |
||
132 | 132 | } |
133 | 133 | else if (is_string($arg)) |
134 | 134 | { |
135 | - $params[] = 'string(' . $arg . ')'; |
|
135 | + $params[] = 'string('.$arg.')'; |
|
136 | 136 | } |
137 | 137 | else if (is_int($arg)) |
138 | 138 | { |
139 | - $params[] = 'int(' . $arg . ')'; |
|
139 | + $params[] = 'int('.$arg.')'; |
|
140 | 140 | } |
141 | 141 | else if (is_float($arg)) |
142 | 142 | { |
143 | - $params[] = 'float(' . $arg . ')'; |
|
143 | + $params[] = 'float('.$arg.')'; |
|
144 | 144 | } |
145 | 145 | else if (is_bool($arg)) |
146 | 146 | { |
147 | - $params[] = 'bool(' . ($arg ? 'true' : 'false') . ')'; |
|
147 | + $params[] = 'bool('.($arg ? 'true' : 'false').')'; |
|
148 | 148 | } |
149 | 149 | else if ($arg instanceof \__PHP_Incomplete_Class) |
150 | 150 | { |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | */ |
24 | 24 | public function boot() |
25 | 25 | { |
26 | - $configPath = __DIR__ . '/../../config/understand-laravel.php'; |
|
26 | + $configPath = __DIR__.'/../../config/understand-laravel.php'; |
|
27 | 27 | $this->publishes([$configPath => config_path('understand-laravel.php')], 'config'); |
28 | 28 | |
29 | 29 | if ($this->app['config']->get('understand-laravel.log_types.eloquent_log.enabled')) |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | */ |
61 | 61 | protected function registerConfig() |
62 | 62 | { |
63 | - $configPath = __DIR__ . '/../../config/understand-laravel.php'; |
|
63 | + $configPath = __DIR__.'/../../config/understand-laravel.php'; |
|
64 | 64 | $this->mergeConfigFrom($configPath, 'understand-laravel'); |
65 | 65 | } |
66 | 66 | |
@@ -196,7 +196,7 @@ discard block |
||
196 | 196 | return new Handlers\LaravelQueueHandler($inputToken, $apiUrl, $silent, $sslBundlePath); |
197 | 197 | } |
198 | 198 | |
199 | - throw new \ErrorException('understand-laravel handler misconfiguration:' . $handlerType); |
|
199 | + throw new \ErrorException('understand-laravel handler misconfiguration:'.$handlerType); |
|
200 | 200 | } |
201 | 201 | |
202 | 202 | /** |
@@ -282,7 +282,7 @@ discard block |
||
282 | 282 | } |
283 | 283 | else |
284 | 284 | { |
285 | - $log = (array)$message; |
|
285 | + $log = (array) $message; |
|
286 | 286 | $log['tags'] = ['laravel_log']; |
287 | 287 | } |
288 | 288 | |
@@ -319,7 +319,7 @@ discard block |
||
319 | 319 | { |
320 | 320 | $this->app['events']->listen($listenerName, function($model) use($modelLogger, $eventName) |
321 | 321 | { |
322 | - $modelLevelEventName = 'eloquent.' . $eventName . ': ' . get_class($model); |
|
322 | + $modelLevelEventName = 'eloquent.'.$eventName.': '.get_class($model); |
|
323 | 323 | |
324 | 324 | $modelLogger->logModelEvent($eventName, $model, $modelLevelEventName); |
325 | 325 | }); |
@@ -42,7 +42,7 @@ |
||
42 | 42 | public function logModelEvent($eventName, Model $model, $modelLevelEventName = null) |
43 | 43 | { |
44 | 44 | $log = [ |
45 | - 'message' => is_null($modelLevelEventName) ? null : (string)$modelLevelEventName, |
|
45 | + 'message' => is_null($modelLevelEventName) ? null : (string) $modelLevelEventName, |
|
46 | 46 | 'id' => (int) $model->id, |
47 | 47 | 'model_event' => $eventName, |
48 | 48 | 'model_name' => get_class($model), |