@@ -157,7 +157,7 @@ discard block |
||
| 157 | 157 | } |
| 158 | 158 | |
| 159 | 159 | /** |
| 160 | - * @param $relativePath |
|
| 160 | + * @param string|null $relativePath |
|
| 161 | 161 | * @param $line |
| 162 | 162 | * @param int $linesAround |
| 163 | 163 | * @return array|void |
@@ -217,7 +217,7 @@ discard block |
||
| 217 | 217 | * Return stack trace file |
| 218 | 218 | * |
| 219 | 219 | * @param array $trace |
| 220 | - * @return mixed |
|
| 220 | + * @return string|null |
|
| 221 | 221 | */ |
| 222 | 222 | protected function getStackTraceFile(array $trace) |
| 223 | 223 | { |
@@ -120,8 +120,7 @@ discard block |
||
| 120 | 120 | if (strpos($trace['file'], $this->projectRoot . 'vendor' . DIRECTORY_SEPARATOR) === 0) |
| 121 | 121 | { |
| 122 | 122 | unset($stackTrace[$index]); |
| 123 | - } |
|
| 124 | - else |
|
| 123 | + } else |
|
| 125 | 124 | { |
| 126 | 125 | $vendorExcluded = true; |
| 127 | 126 | } |
@@ -215,10 +214,8 @@ discard block |
||
| 215 | 214 | } |
| 216 | 215 | |
| 217 | 216 | return $codeLines; |
| 218 | - } |
|
| 219 | - catch (\Throwable $e) |
|
| 220 | - {} |
|
| 221 | - catch (\Exception $e) |
|
| 217 | + } catch (\Throwable $e) |
|
| 218 | + {} catch (\Exception $e) |
|
| 222 | 219 | {} |
| 223 | 220 | } |
| 224 | 221 | |
@@ -294,32 +291,25 @@ discard block |
||
| 294 | 291 | if (is_array($arg)) |
| 295 | 292 | { |
| 296 | 293 | $params[] = 'array(' . count($arg) . ')'; |
| 297 | - } |
|
| 298 | - else if (is_object($arg)) |
|
| 294 | + } else if (is_object($arg)) |
|
| 299 | 295 | { |
| 300 | 296 | $params[] = get_class($arg); |
| 301 | - } |
|
| 302 | - else if (is_string($arg)) |
|
| 297 | + } else if (is_string($arg)) |
|
| 303 | 298 | { |
| 304 | 299 | $params[] = 'string(' . $arg . ')'; |
| 305 | - } |
|
| 306 | - else if (is_int($arg)) |
|
| 300 | + } else if (is_int($arg)) |
|
| 307 | 301 | { |
| 308 | 302 | $params[] = 'int(' . $arg . ')'; |
| 309 | - } |
|
| 310 | - else if (is_float($arg)) |
|
| 303 | + } else if (is_float($arg)) |
|
| 311 | 304 | { |
| 312 | 305 | $params[] = 'float(' . $arg . ')'; |
| 313 | - } |
|
| 314 | - else if (is_bool($arg)) |
|
| 306 | + } else if (is_bool($arg)) |
|
| 315 | 307 | { |
| 316 | 308 | $params[] = 'bool(' . ($arg ? 'true' : 'false') . ')'; |
| 317 | - } |
|
| 318 | - else if ($arg instanceof \__PHP_Incomplete_Class) |
|
| 309 | + } else if ($arg instanceof \__PHP_Incomplete_Class) |
|
| 319 | 310 | { |
| 320 | 311 | $params[] = 'object(__PHP_Incomplete_Class)'; |
| 321 | - } |
|
| 322 | - else |
|
| 312 | + } else |
|
| 323 | 313 | { |
| 324 | 314 | $params[] = gettype($arg); |
| 325 | 315 | } |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | protected $app; |
| 88 | 88 | |
| 89 | 89 | /** |
| 90 | - * @return void |
|
| 90 | + * @return Application |
|
| 91 | 91 | */ |
| 92 | 92 | public function __construct() |
| 93 | 93 | { |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | /** |
| 109 | 109 | * Set session store |
| 110 | 110 | * |
| 111 | - * @param type $service |
|
| 111 | + * @param SessionStore $service |
|
| 112 | 112 | */ |
| 113 | 113 | public function setSessionStore(SessionStore $service) |
| 114 | 114 | { |
@@ -157,7 +157,6 @@ discard block |
||
| 157 | 157 | * Register a custom HTML macro. |
| 158 | 158 | * |
| 159 | 159 | * @param string $name |
| 160 | - * @param mixed $macro |
|
| 161 | 160 | * @return void |
| 162 | 161 | */ |
| 163 | 162 | public function extend($name, $provider) |
@@ -168,7 +167,7 @@ discard block |
||
| 168 | 167 | /** |
| 169 | 168 | * Set token provider |
| 170 | 169 | * |
| 171 | - * @param UniqueProcessIdentifier $tokenProvider |
|
| 170 | + * @param TokenProvider $tokenProvider |
|
| 172 | 171 | */ |
| 173 | 172 | public function setTokenProvider(TokenProvider $tokenProvider) |
| 174 | 173 | { |
@@ -430,10 +430,8 @@ discard block |
||
| 430 | 430 | { |
| 431 | 431 | return $userId; |
| 432 | 432 | } |
| 433 | - } |
|
| 434 | - catch (\Throwable $e) |
|
| 435 | - {} |
|
| 436 | - catch (\Exception $e) |
|
| 433 | + } catch (\Throwable $e) |
|
| 434 | + {} catch (\Exception $e) |
|
| 437 | 435 | {} |
| 438 | 436 | |
| 439 | 437 | try |
@@ -442,10 +440,8 @@ discard block |
||
| 442 | 440 | { |
| 443 | 441 | return $user->id; |
| 444 | 442 | } |
| 445 | - } |
|
| 446 | - catch (\Throwable $e) |
|
| 447 | - {} |
|
| 448 | - catch (\Exception $e) |
|
| 443 | + } catch (\Throwable $e) |
|
| 444 | + {} catch (\Exception $e) |
|
| 449 | 445 | {} |
| 450 | 446 | |
| 451 | 447 | try |
@@ -454,10 +450,8 @@ discard block |
||
| 454 | 450 | { |
| 455 | 451 | return $user->id; |
| 456 | 452 | } |
| 457 | - } |
|
| 458 | - catch (\Throwable $e) |
|
| 459 | - {} |
|
| 460 | - catch (\Exception $e) |
|
| 453 | + } catch (\Throwable $e) |
|
| 454 | + {} catch (\Exception $e) |
|
| 461 | 455 | {} |
| 462 | 456 | } |
| 463 | 457 | |
@@ -28,7 +28,6 @@ discard block |
||
| 28 | 28 | /** |
| 29 | 29 | * @param FieldProvider $fieldProvider |
| 30 | 30 | * @param BaseHandler $handler |
| 31 | - * @param bool $silent |
|
| 32 | 31 | */ |
| 33 | 32 | public function __construct(FieldProvider $fieldProvider, BaseHandler $handler) |
| 34 | 33 | { |
@@ -144,7 +143,6 @@ discard block |
||
| 144 | 143 | /** |
| 145 | 144 | * Send data to storage |
| 146 | 145 | * |
| 147 | - * @param array $requestData |
|
| 148 | 146 | * @return mixed |
| 149 | 147 | */ |
| 150 | 148 | protected function send(array $event) |
@@ -152,12 +152,10 @@ |
||
| 152 | 152 | try |
| 153 | 153 | { |
| 154 | 154 | return $this->handler->handle($event); |
| 155 | - } |
|
| 156 | - catch (\Throwable $e) |
|
| 155 | + } catch (\Throwable $e) |
|
| 157 | 156 | { |
| 158 | 157 | return false; |
| 159 | - } |
|
| 160 | - catch (\Exception $ex) |
|
| 158 | + } catch (\Exception $ex) |
|
| 161 | 159 | { |
| 162 | 160 | return false; |
| 163 | 161 | } |
@@ -90,8 +90,7 @@ |
||
| 90 | 90 | ]; |
| 91 | 91 | |
| 92 | 92 | $log = $this->encoder->setCurrentStackTrace($log); |
| 93 | - } |
|
| 94 | - else |
|
| 93 | + } else |
|
| 95 | 94 | { |
| 96 | 95 | $log = (array)$message; |
| 97 | 96 | $log = $this->encoder->setCurrentStackTrace($log); |
@@ -45,8 +45,7 @@ |
||
| 45 | 45 | $log = [ |
| 46 | 46 | 'message' => $message |
| 47 | 47 | ]; |
| 48 | - } |
|
| 49 | - else |
|
| 48 | + } else |
|
| 50 | 49 | { |
| 51 | 50 | $log = (array)$message; |
| 52 | 51 | } |
@@ -237,8 +237,7 @@ discard block |
||
| 237 | 237 | { |
| 238 | 238 | $this->handleEvent($level, $message, $context); |
| 239 | 239 | }); |
| 240 | - } |
|
| 241 | - else |
|
| 240 | + } else |
|
| 242 | 241 | { |
| 243 | 242 | // starting from L5.4 MessageLogged event class was introduced |
| 244 | 243 | // https://github.com/laravel/framework/commit/57c82d095c356a0fe0f9381536afec768cdcc072 |
@@ -268,8 +267,7 @@ discard block |
||
| 268 | 267 | 'time' => $time, |
| 269 | 268 | ]); |
| 270 | 269 | }); |
| 271 | - } |
|
| 272 | - else |
|
| 270 | + } else |
|
| 273 | 271 | { |
| 274 | 272 | // https://laravel.com/api/5.3/Illuminate/Database/Events/QueryExecuted.html |
| 275 | 273 | $this->app['events']->listen('Illuminate\Database\Events\QueryExecuted', function($event) |
@@ -304,8 +302,7 @@ discard block |
||
| 304 | 302 | unset($context['exception']); |
| 305 | 303 | |
| 306 | 304 | $this->app['understand.exceptionLogger']->logError($level, $exception, $context); |
| 307 | - } |
|
| 308 | - else |
|
| 305 | + } else |
|
| 309 | 306 | { |
| 310 | 307 | $this->app['understand.exceptionLogger']->logError($level, $message, $context); |
| 311 | 308 | } |
@@ -215,8 +215,8 @@ discard block |
||
| 215 | 215 | /** |
| 216 | 216 | * Detect Laravel version |
| 217 | 217 | * |
| 218 | - * @param array $versions |
|
| 219 | - * @return type |
|
| 218 | + * @param string[] $versions |
|
| 219 | + * @return boolean |
|
| 220 | 220 | */ |
| 221 | 221 | protected function detectLaravelVersion(array $versions) |
| 222 | 222 | { |
@@ -317,7 +317,7 @@ discard block |
||
| 317 | 317 | } |
| 318 | 318 | |
| 319 | 319 | /** |
| 320 | - * @param $level |
|
| 320 | + * @param string $level |
|
| 321 | 321 | * @param $message |
| 322 | 322 | * @param $context |
| 323 | 323 | * @return bool |
@@ -337,7 +337,7 @@ discard block |
||
| 337 | 337 | /** |
| 338 | 338 | * Get the services provided by the provider. |
| 339 | 339 | * |
| 340 | - * @return array |
|
| 340 | + * @return string[] |
|
| 341 | 341 | */ |
| 342 | 342 | public function provides() |
| 343 | 343 | { |