Merge pull request #31 from WinterSilence/patch-2
Remove redundand code in `Progress`
This commit is contained in:
commit
3e9be2ecec
@ -166,15 +166,15 @@ class Progress extends Widget
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates a bar
|
||||
* Generates a progress bar.
|
||||
* @param int $percent the percentage of the bar
|
||||
* @param string $label , optional, the label to display at the bar
|
||||
* @param string $label optional, the label to display at the bar
|
||||
* @param array $options the HTML attributes of the bar
|
||||
* @return string the rendering result.
|
||||
*/
|
||||
protected function renderBar(int $percent, string $label = '', array $options = []): string
|
||||
{
|
||||
$percent = (float)trim(rtrim((string)$percent, '%'));
|
||||
|
||||
$options = array_merge($options, [
|
||||
'role' => 'progressbar',
|
||||
'aria' => [
|
||||
|
Loading…
Reference in New Issue
Block a user