/var/www/vhosts/ihelp.ro/httpdocs/vendor/cakephp/debug_kit/src/View/Helper
NameSizeModeActions
CredentialsHelper.php19250644editdlrm
SimpleGraphHelper.php22830644editdlrm
ToolbarHelper.php33260644editdlrm
Edit: /var/www/vhosts/ihelp.ro/httpdocs/vendor/cakephp/debug_kit/src/View/Helper/SimpleGraphHelper.php (2283B)
(int) Maximum value in the graphs * - width => (int) * - valueType => string (value, percentage) * - style => array * * @var array */ protected $_defaultSettings = [ 'max' => 100, 'width' => 350, 'valueType' => 'value', ]; /** * bar method * * @param float $value Value to be graphed * @param int $offset how much indentation * @param array $options Graph options * @return string Html graph */ public function bar($value, $offset, $options = []) { $settings = array_merge($this->_defaultSettings, $options); $max = $settings['max']; $width = $settings['width']; $valueType = $settings['valueType']; $graphValue = $value / $max * $width; $graphValue = max(round($graphValue), 1); if ($valueType === 'percentage') { $graphOffset = 0; } else { $graphOffset = $offset / $max * $width; $graphOffset = round($graphOffset); } return sprintf( '
', "width: {$width}px", "margin-left: {$graphOffset}px; width: {$graphValue}px", "Starting {$offset}ms into the request, taking {$value}ms" ); } }