@@ -107,7 +107,7 @@ |
||
| 107 | 107 | |
| 108 | 108 | /** |
| 109 | 109 | * Validates that the subject is an unempty string |
| 110 | - * @param mixed $subject The value to check |
|
| 110 | + * @param string $subject The value to check |
|
| 111 | 111 | * @return void |
| 112 | 112 | */ |
| 113 | 113 | private function checkSubject($subject) { |
@@ -5,8 +5,8 @@ |
||
| 5 | 5 | use Exception; |
| 6 | 6 | use Monolog\Handler\HandlerInterface; |
| 7 | 7 | use Monolog\Logger; |
| 8 | -use Tylercd100\LERN\Factories\MonologHandlerFactory; |
|
| 9 | 8 | use Tylercd100\LERN\Exceptions\NotifierFailedException; |
| 9 | +use Tylercd100\LERN\Factories\MonologHandlerFactory; |
|
| 10 | 10 | |
| 11 | 11 | class Notifier extends Component { |
| 12 | 12 | protected $config; |
@@ -109,8 +109,8 @@ discard block |
||
| 109 | 109 | * @return bool |
| 110 | 110 | */ |
| 111 | 111 | public function send(Exception $e, array $context = []) { |
| 112 | - try{ |
|
| 113 | - if($this->shouldntHandle($e)){ |
|
| 112 | + try { |
|
| 113 | + if ($this->shouldntHandle($e)) { |
|
| 114 | 114 | return false; |
| 115 | 115 | } |
| 116 | 116 | |
@@ -140,8 +140,8 @@ discard block |
||
| 140 | 140 | * @param array $context Additional information that you would like to pass to Monolog |
| 141 | 141 | * @return array The modified context array |
| 142 | 142 | */ |
| 143 | - protected function buildContext(array $context = []){ |
|
| 144 | - if(in_array('pushover', $this->drivers)){ |
|
| 143 | + protected function buildContext(array $context = []) { |
|
| 144 | + if (in_array('pushover', $this->drivers)) { |
|
| 145 | 145 | $context['sound'] = $this->config['pushover']['sound']; |
| 146 | 146 | } |
| 147 | 147 | return $context; |
@@ -47,7 +47,7 @@ |
||
| 47 | 47 | /** |
| 48 | 48 | * Will execute record and notify methods |
| 49 | 49 | * @param Exception $e The exception to use |
| 50 | - * @return ExceptionModel the recorded Eloquent Model |
|
| 50 | + * @return Models\ExceptionModel the recorded Eloquent Model |
|
| 51 | 51 | */ |
| 52 | 52 | public function handle(Exception $e) |
| 53 | 53 | { |
@@ -2,6 +2,6 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Tylercd100\LERN\Exceptions; |
| 4 | 4 | |
| 5 | -class NotifierFailedException extends \Exception implements LERNExceptionInterface{ |
|
| 5 | +class NotifierFailedException extends \Exception implements LERNExceptionInterface { |
|
| 6 | 6 | |
| 7 | 7 | } |
| 8 | 8 | \ No newline at end of file |
@@ -2,6 +2,6 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Tylercd100\LERN\Exceptions; |
| 4 | 4 | |
| 5 | -class RecorderFailedException extends \Exception implements LERNExceptionInterface{ |
|
| 5 | +class RecorderFailedException extends \Exception implements LERNExceptionInterface { |
|
| 6 | 6 | |
| 7 | 7 | } |
| 8 | 8 | \ No newline at end of file |
@@ -10,7 +10,7 @@ discard block |
||
| 10 | 10 | use Tylercd100\LERN\Exceptions\RecorderFailedException; |
| 11 | 11 | use Tylercd100\LERN\Models\ExceptionModel; |
| 12 | 12 | |
| 13 | -class Recorder extends Component{ |
|
| 13 | +class Recorder extends Component { |
|
| 14 | 14 | |
| 15 | 15 | /** |
| 16 | 16 | * @var mixed |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | public function record(Exception $e) |
| 33 | 33 | { |
| 34 | 34 | try { |
| 35 | - if($this->shouldntHandle($e)){ |
|
| 35 | + if ($this->shouldntHandle($e)) { |
|
| 36 | 36 | return false; |
| 37 | 37 | } |
| 38 | 38 | |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | /** |
| 76 | 76 | * @param string $key |
| 77 | 77 | */ |
| 78 | - protected function collect($key,Exception $e = null){ |
|
| 78 | + protected function collect($key, Exception $e = null) { |
|
| 79 | 79 | switch ($key) { |
| 80 | 80 | case 'user_id': |
| 81 | 81 | return $this->getUserId(); |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | * @param \Exception $e |
| 25 | 25 | * @return bool |
| 26 | 26 | */ |
| 27 | - protected function shouldHandle(Exception $e){ |
|
| 27 | + protected function shouldHandle(Exception $e) { |
|
| 28 | 28 | return !$this->shouldHandle($e); |
| 29 | 29 | } |
| 30 | 30 | |
@@ -34,8 +34,8 @@ discard block |
||
| 34 | 34 | * @param \Exception $e |
| 35 | 35 | * @return bool |
| 36 | 36 | */ |
| 37 | - protected function shouldntHandle(Exception $e){ |
|
| 38 | - $dontHandle = array_merge($this->dontHandle,$this->absolutelyDontHandle); |
|
| 37 | + protected function shouldntHandle(Exception $e) { |
|
| 38 | + $dontHandle = array_merge($this->dontHandle, $this->absolutelyDontHandle); |
|
| 39 | 39 | |
| 40 | 40 | foreach ($dontHandle as $type) { |
| 41 | 41 | if ($e instanceof $type) { |