@@ -254,7 +254,7 @@ |
||
254 | 254 | |
255 | 255 | /** |
256 | 256 | * this function returns the days in a month in an array format |
257 | - * @param object $date_time - the date time object for the current month |
|
257 | + * @param vt_DateTime $date_time - the date time object for the current month |
|
258 | 258 | * @return array $result - the array containing current months days information |
259 | 259 | */ |
260 | 260 | function getCalendarDaysInMonth($date_time) |
@@ -130,10 +130,12 @@ discard block |
||
130 | 130 | */ |
131 | 131 | public function getDateChangeInfo($type) |
132 | 132 | { |
133 | - if ($type == 'next') |
|
134 | - $mode = 'increment'; |
|
135 | - if ($type == 'prev') |
|
136 | - $mode = 'decrment'; |
|
133 | + if ($type == 'next') { |
|
134 | + $mode = 'increment'; |
|
135 | + } |
|
136 | + if ($type == 'prev') { |
|
137 | + $mode = 'decrment'; |
|
138 | + } |
|
137 | 139 | switch ($this->view) { |
138 | 140 | case 'day': |
139 | 141 | $day = $this->date_time->get_changed_day($mode); |
@@ -171,12 +173,15 @@ discard block |
||
171 | 173 | { |
172 | 174 | $this->view = $view; |
173 | 175 | $this->start_time = $time; |
174 | - if ($view == 'month') |
|
175 | - $this->end_time = $this->start_time->getMonthendtime(); |
|
176 | - if ($view == 'day') |
|
177 | - $this->end_time = $this->start_time->getDayendtime(); |
|
178 | - if ($view == 'hour') |
|
179 | - $this->end_time = $this->start_time->getHourendtime(); |
|
176 | + if ($view == 'month') { |
|
177 | + $this->end_time = $this->start_time->getMonthendtime(); |
|
178 | + } |
|
179 | + if ($view == 'day') { |
|
180 | + $this->end_time = $this->start_time->getDayendtime(); |
|
181 | + } |
|
182 | + if ($view == 'hour') { |
|
183 | + $this->end_time = $this->start_time->getHourendtime(); |
|
184 | + } |
|
180 | 185 | } |
181 | 186 | |
182 | 187 | /** |
@@ -11,7 +11,6 @@ |
||
11 | 11 | namespace DebugBar\DataCollector; |
12 | 12 | |
13 | 13 | use Exception; |
14 | -use Symfony\Component\Debug\Exception\FatalThrowableError; |
|
15 | 14 | |
16 | 15 | /** |
17 | 16 | * Collects info about exceptions |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | /** |
36 | 36 | * Adds a Throwable to be profiled in the debug bar |
37 | 37 | * |
38 | - * @param \Throwable $e |
|
38 | + * @param Exception $e |
|
39 | 39 | */ |
40 | 40 | public function addThrowable($e) |
41 | 41 | { |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | /** |
89 | 89 | * Returns Throwable data as an array |
90 | 90 | * |
91 | - * @param \Throwable $e |
|
91 | + * @param Exception $e |
|
92 | 92 | * @return array |
93 | 93 | */ |
94 | 94 | public function formatThrowableData($e) |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | } |
157 | 157 | |
158 | 158 | /** |
159 | - * @return mixed |
|
159 | + * @return double |
|
160 | 160 | */ |
161 | 161 | public function getStartTime() |
162 | 162 | { |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | } |
165 | 165 | |
166 | 166 | /** |
167 | - * @return mixed |
|
167 | + * @return double |
|
168 | 168 | */ |
169 | 169 | public function getEndTime() |
170 | 170 | { |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | /** |
175 | 175 | * Returns the duration in seconds of the execution |
176 | 176 | * |
177 | - * @return int |
|
177 | + * @return double |
|
178 | 178 | */ |
179 | 179 | public function getDuration() |
180 | 180 | { |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | } |
183 | 183 | |
184 | 184 | /** |
185 | - * @return mixed |
|
185 | + * @return integer |
|
186 | 186 | */ |
187 | 187 | public function getStartMemory() |
188 | 188 | { |
@@ -190,7 +190,7 @@ discard block |
||
190 | 190 | } |
191 | 191 | |
192 | 192 | /** |
193 | - * @return mixed |
|
193 | + * @return integer |
|
194 | 194 | */ |
195 | 195 | public function getEndMemory() |
196 | 196 | { |
@@ -250,7 +250,7 @@ discard block |
||
250 | 250 | /** |
251 | 251 | * Returns the back trace message |
252 | 252 | * |
253 | - * @return array |
|
253 | + * @return string |
|
254 | 254 | */ |
255 | 255 | public function getBackTrace() |
256 | 256 | { |
@@ -18,7 +18,6 @@ |
||
18 | 18 | /** |
19 | 19 | * Transforms a PHP variable to a string representation |
20 | 20 | * |
21 | - * @param mixed $var |
|
22 | 21 | * @return string |
23 | 22 | */ |
24 | 23 | public function formatVar($data); |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | * |
22 | 22 | * @param array $headers |
23 | 23 | * @return |
24 | - */ |
|
24 | + void |
|
25 | 25 | public function setHeaders(array $headers); |
26 | 26 | |
27 | 27 | /** |
@@ -36,6 +36,7 @@ discard block |
||
36 | 36 | * |
37 | 37 | * @param string $name |
38 | 38 | * @param string $value |
39 | + * @return void |
|
39 | 40 | */ |
40 | 41 | public function setSessionValue($name, $value); |
41 | 42 | |
@@ -59,6 +60,7 @@ discard block |
||
59 | 60 | * Deletes a value from the session |
60 | 61 | * |
61 | 62 | * @param string $name |
63 | + * @return void |
|
62 | 64 | */ |
63 | 65 | public function deleteSessionValue($name); |
64 | 66 | } |
@@ -947,7 +947,7 @@ |
||
947 | 947 | * |
948 | 948 | * @param string $requestId |
949 | 949 | * @param array $data |
950 | - * @param mixed $suffix |
|
950 | + * @param string|null $suffix |
|
951 | 951 | * @return string |
952 | 952 | */ |
953 | 953 | protected function getAddDatasetCode($requestId, $data, $suffix = null) |
@@ -17,6 +17,7 @@ discard block |
||
17 | 17 | * |
18 | 18 | * @param string $id |
19 | 19 | * @param string $data |
20 | + * @return void |
|
20 | 21 | */ |
21 | 22 | public function save($id, $data); |
22 | 23 | |
@@ -40,6 +41,7 @@ discard block |
||
40 | 41 | |
41 | 42 | /** |
42 | 43 | * Clears all the collected data |
44 | + * @return void |
|
43 | 45 | */ |
44 | 46 | public function clear(); |
45 | 47 | } |
@@ -33,7 +33,7 @@ |
||
33 | 33 | $output = ''; |
34 | 34 | |
35 | 35 | $this->dumper->dump( |
36 | - $this->cloner->cloneVar($data), function ($line, $depth) use (&$output) { |
|
36 | + $this->cloner->cloneVar($data), function($line, $depth) use (&$output) { |
|
37 | 37 | // A negative depth means "end of dump" |
38 | 38 | if ($depth >= 0) { |
39 | 39 | // Adds a two spaces indentation to the line |
@@ -211,7 +211,7 @@ |
||
211 | 211 | } |
212 | 212 | |
213 | 213 | // Remove all invalid (non UTF-8) characters |
214 | - array_walk_recursive($this->data, function (&$item) { |
|
214 | + array_walk_recursive($this->data, function(&$item) { |
|
215 | 215 | if (is_string($item) && !mb_check_encoding($item, 'UTF-8')) { |
216 | 216 | $item = mb_convert_encoding($item, 'UTF-8', 'UTF-8'); |
217 | 217 | } |