@@ -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 |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | */ |
| 32 | 32 | public function record(Exception $e) |
| 33 | 33 | { |
| 34 | - if($this->shouldntHandle($e)){ |
|
| 34 | + if ($this->shouldntHandle($e)) { |
|
| 35 | 35 | return false; |
| 36 | 36 | } |
| 37 | 37 | |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | /** |
| 77 | 77 | * @param string $key |
| 78 | 78 | */ |
| 79 | - protected function collect($key,Exception $e = null){ |
|
| 79 | + protected function collect($key, Exception $e = null) { |
|
| 80 | 80 | switch ($key) { |
| 81 | 81 | case 'user_id': |
| 82 | 82 | return $this->getUserId(); |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | case 'data': |
| 88 | 88 | return $this->getData(); |
| 89 | 89 | case 'status_code': |
| 90 | - if($e===null) |
|
| 90 | + if ($e === null) |
|
| 91 | 91 | return 0; |
| 92 | 92 | return $this->getStatusCode($e); |
| 93 | 93 | default: |
@@ -166,12 +166,12 @@ discard block |
||
| 166 | 166 | * @param array &$data [description] |
| 167 | 167 | * @return void |
| 168 | 168 | */ |
| 169 | - protected function excludeKeys(array $data){ |
|
| 169 | + protected function excludeKeys(array $data) { |
|
| 170 | 170 | $keys = $this->config['excludeKeys']; |
| 171 | 171 | foreach ($data as $key => &$value) { |
| 172 | - if(in_array($key,$keys)){ |
|
| 172 | + if (in_array($key, $keys)) { |
|
| 173 | 173 | unset($data[$key]); |
| 174 | - } else if(is_array($value)){ |
|
| 174 | + } else if (is_array($value)) { |
|
| 175 | 175 | $value = $this->excludeKeys($value); |
| 176 | 176 | } |
| 177 | 177 | } |