@@ -63,6 +63,9 @@ |
||
63 | 63 | return false; |
64 | 64 | } |
65 | 65 | |
66 | + /** |
|
67 | + * @param string $key |
|
68 | + */ |
|
66 | 69 | protected function collect($key,Exception $e = null){ |
67 | 70 | switch ($key) { |
68 | 71 | case 'user_id': |
@@ -40,11 +40,11 @@ discard block |
||
40 | 40 | ]; |
41 | 41 | |
42 | 42 | |
43 | - $configDependant = ['user_id','status_code','method','data','url']; |
|
43 | + $configDependant = ['user_id', 'status_code', 'method', 'data', 'url']; |
|
44 | 44 | |
45 | 45 | foreach ($configDependant as $key) { |
46 | - if($this->canCollect($key)){ |
|
47 | - $opts[$key] = $this->collect($key,$e); |
|
46 | + if ($this->canCollect($key)) { |
|
47 | + $opts[$key] = $this->collect($key, $e); |
|
48 | 48 | } |
49 | 49 | } |
50 | 50 | |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | return false; |
64 | 64 | } |
65 | 65 | |
66 | - protected function collect($key,Exception $e = null){ |
|
66 | + protected function collect($key, Exception $e = null) { |
|
67 | 67 | switch ($key) { |
68 | 68 | case 'user_id': |
69 | 69 | return $this->getUserId(); |
@@ -14,11 +14,11 @@ |
||
14 | 14 | parent::__construct($attributes); |
15 | 15 | } |
16 | 16 | |
17 | - public function setDataAttribute($value){ |
|
17 | + public function setDataAttribute($value) { |
|
18 | 18 | $this->attributes['data'] = json_encode($value); |
19 | 19 | } |
20 | 20 | |
21 | - public function getDataAttribute($value){ |
|
21 | + public function getDataAttribute($value) { |
|
22 | 22 | return json_decode($value); |
23 | 23 | } |
24 | 24 | } |
25 | 25 | \ No newline at end of file |