1 | <?php |
||
13 | class Recorder extends Component { |
||
14 | |||
15 | /** |
||
16 | * @var mixed |
||
17 | */ |
||
18 | protected $config = []; |
||
19 | |||
20 | /** |
||
21 | * The constructor |
||
22 | */ |
||
23 | 28 | public function __construct() { |
|
26 | |||
27 | /** |
||
28 | * Records an Exception to the database |
||
29 | * @param Exception $e The exception you want to record |
||
30 | * @return false|ExceptionModel |
||
31 | * @throws RecorderFailedException |
||
32 | */ |
||
33 | 4 | public function record(Exception $e) |
|
66 | |||
67 | /** |
||
68 | * Checks the config to see if you can collect certain information |
||
69 | * @param string $type the config value you want to check |
||
70 | * @return boolean |
||
71 | */ |
||
72 | 3 | private function canCollect($type) { |
|
78 | |||
79 | /** |
||
80 | * @param string $key |
||
81 | * @param Exception $e |
||
82 | * @return array|int|null|string |
||
83 | * @throws Exception |
||
84 | */ |
||
85 | 1 | protected function collect($key, Exception $e = null) { |
|
104 | |||
105 | /** |
||
106 | * Gets the ID of the User that is logged in |
||
107 | * @return integer|null The ID of the User or Null if not logged in |
||
108 | */ |
||
109 | 1 | protected function getUserId() { |
|
117 | |||
118 | /** |
||
119 | * Gets the Method of the Request |
||
120 | * @return string|null Possible values are null or GET, POST, DELETE, PUT, etc... |
||
121 | */ |
||
122 | 1 | protected function getMethod() { |
|
130 | |||
131 | /** |
||
132 | * Gets the input data of the Request |
||
133 | * @return array|null The Input data or null |
||
134 | */ |
||
135 | 1 | protected function getData() { |
|
143 | |||
144 | /** |
||
145 | * Gets the URL of the Request |
||
146 | * @return string|null Returns a URL string or null |
||
147 | */ |
||
148 | 1 | protected function getUrl() { |
|
156 | |||
157 | /** |
||
158 | * Gets the status code of the Exception |
||
159 | * @param Exception $e The Exception to check |
||
160 | * @return string|integer The status code value |
||
161 | */ |
||
162 | 1 | protected function getStatusCode(Exception $e) { |
|
169 | |||
170 | /** |
||
171 | * This function will remove all keys from an array recursively as defined in the config file |
||
172 | * @param array $data The array to remove keys from |
||
173 | * @return void |
||
174 | */ |
||
175 | 3 | protected function excludeKeys(array $data) { |
|
187 | } |
||
188 |
This check marks calls to methods that do not seem to exist on an object.
This is most likely the result of a method being renamed without all references to it being renamed likewise.