Skip to content

Commit

Permalink
minor code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
lekoala committed Feb 12, 2024
1 parent 17eea24 commit 2d083cb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion code/Middleware/DebugBarMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,12 @@ public function process(HTTPRequest $request, callable $delegate)
* Track the start up of the framework boot
*
* @param HTTPRequest $request
* @return void
*/
protected function beforeRequest(HTTPRequest $request)
{
DebugBar::withDebugBar(function (\DebugBar\DebugBar $debugbar) {
/** @var DebugBar\DataCollector\TimeDataCollector $timeData */
/** @var \DebugBar\DataCollector\TimeDataCollector|null $timeData */
$timeData = $debugbar->getCollector('time');

if (!$timeData) {
Expand Down Expand Up @@ -78,6 +79,7 @@ protected function beforeRequest(HTTPRequest $request)
*
* @param HTTPRequest $request
* @param HTTPResponse $response
* @return void
*/
protected function afterRequest(HTTPRequest $request, HTTPResponse $response)
{
Expand Down

0 comments on commit 2d083cb

Please sign in to comment.