1 | <?php |
||
12 | class Recorder { |
||
13 | |||
14 | /** |
||
15 | * @var array |
||
16 | */ |
||
17 | protected $config = []; |
||
18 | |||
19 | /** |
||
20 | * The constructor |
||
21 | */ |
||
22 | 21 | public function __construct(){ |
|
25 | |||
26 | /** |
||
27 | * Records an Exception to the database |
||
28 | * @param Exception $e The exception you want to record |
||
29 | * @return Tylercd100\LERN\Models\ExceptionModel |
||
30 | */ |
||
31 | 3 | public function record(Exception $e) |
|
50 | |||
51 | /** |
||
52 | * Checks the config to see if you can collect certain information |
||
53 | * @param string $type the config value you want to check |
||
54 | * @return boolean |
||
55 | */ |
||
56 | 3 | private function canCollect($type){ |
|
62 | |||
63 | /** |
||
64 | * Gets the ID of the User that is logged in |
||
65 | * @return integer|null The ID of the User or Null if not logged in |
||
66 | */ |
||
67 | 3 | protected function getUserId(){ |
|
75 | |||
76 | /** |
||
77 | * Gets the Method of the Request |
||
78 | * @return string|null Possible values are null or GET, POST, DELETE, PUT, etc... |
||
79 | */ |
||
80 | 3 | protected function getMethod(){ |
|
88 | |||
89 | /** |
||
90 | * Gets the input data of the Request |
||
91 | * @return array|null The Input data or null |
||
92 | */ |
||
93 | 3 | protected function getData(){ |
|
101 | |||
102 | /** |
||
103 | * Gets the URL of the Request |
||
104 | * @return string|null Returns a URL string or null |
||
105 | */ |
||
106 | 3 | protected function getUrl(){ |
|
114 | |||
115 | /** |
||
116 | * Gets the status code of the Exception |
||
117 | * @param Exception $e The Exception to check |
||
118 | * @return string|integer The status code value |
||
119 | */ |
||
120 | 3 | protected function getStatusCode(Exception $e){ |
|
127 | } |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..