@@ -57,7 +57,7 @@ public function setDebugStack(DebugBarSQLMiddleware $debugStack): void
5757 *
5858 * @param bool $enabled
5959 */
60- public function setDurationBackground ($ enabled )
60+ public function setDurationBackground (bool $ enabled ): void
6161 {
6262 $ this ->durationBackground = $ enabled ;
6363 }
@@ -67,15 +67,15 @@ public function setDurationBackground($enabled)
6767 *
6868 * @param int|float $threshold miliseconds value
6969 */
70- public function setSlowThreshold ($ threshold )
70+ public function setSlowThreshold (int | float $ threshold ): void
7171 {
7272 $ this ->slowThreshold = $ threshold / 1000 ;
7373 }
7474
7575 /**
7676 * @return array
7777 */
78- public function collect ()
78+ public function collect (): array
7979 {
8080 $ queries = array ();
8181 $ nb_statements = 0 ;
@@ -85,7 +85,7 @@ public function collect()
8585 'sql ' => $ q ['sql ' ],
8686 'params ' => (object ) $ this ->getParameters ($ q ['params ' ] ?? []),
8787 'duration ' => $ q ['executionMS ' ],
88- 'duration_str ' => $ this ->formatDuration ($ q ['executionMS ' ]),
88+ 'duration_str ' => $ this ->getDataFormatter ()-> formatDuration ($ q ['executionMS ' ]),
8989 'type ' => $ q ['type ' ] ?? null ,
9090 'slow ' => $ this ->slowThreshold && $ this ->slowThreshold <= $ q ['executionMS ' ],
9191 );
@@ -114,7 +114,7 @@ public function collect()
114114 'count ' => count ($ queries ),
115115 'nb_statements ' => $ nb_statements ,
116116 'accumulated_duration ' => $ totalExecTime ,
117- 'accumulated_duration_str ' => $ this ->formatDuration ($ totalExecTime ),
117+ 'accumulated_duration_str ' => $ this ->getDataFormatter ()-> formatDuration ($ totalExecTime ),
118118 'statements ' => $ queries
119119 );
120120 }
@@ -145,15 +145,15 @@ public function getParameters($params) : array
145145 /**
146146 * @return string
147147 */
148- public function getName ()
148+ public function getName (): string
149149 {
150150 return 'doctrine ' ;
151151 }
152152
153153 /**
154154 * @return array
155155 */
156- public function getWidgets ()
156+ public function getWidgets (): array
157157 {
158158 return array (
159159 "database " => array (
@@ -172,7 +172,7 @@ public function getWidgets()
172172 /**
173173 * @return array
174174 */
175- public function getAssets ()
175+ public function getAssets (): array
176176 {
177177 return array (
178178 'css ' => 'widgets/sqlqueries/widget.css ' ,
0 commit comments