Skip to content

Commit

Permalink
Fix errors reported by psalm
Browse files Browse the repository at this point in the history
  • Loading branch information
ADmad committed Apr 13, 2020
1 parent 50e6306 commit e98c06e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/DebugSql.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ public static function sql(Query $query, $showValues = true, $showHtml = null, $
$sql = static::interpolate($sql, $query->getValueBinder()->bindings());
}

/** @var array $trace */
$trace = Debugger::trace(['start' => 1, 'depth' => $stackDepth + 2, 'format' => 'array']);
$file = isset($trace[$stackDepth]) ? $trace[$stackDepth]['file'] : 'n/a';
$line = isset($trace[$stackDepth]) ? $trace[$stackDepth]['line'] : 0;
Expand Down
2 changes: 1 addition & 1 deletion src/DebugTimer.php
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,6 @@ public static function requestStartTime()
$startTime = env('REQUEST_TIME');
}

return $startTime;
return (float)$startTime;
}
}
2 changes: 1 addition & 1 deletion src/Panel/DeprecationsPanel.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public function summary()
$data = $this->_prepare();
}

return array_reduce($data, function ($carry, $item) {
return (string)array_reduce($data, function ($carry, $item) {
if (empty($item)) {
return $carry;
}
Expand Down

0 comments on commit e98c06e

Please sign in to comment.