mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 01:25:55 +02:00
Fixed some inspection issues.
This commit is contained in:
parent
eef26f7ae6
commit
639829f5c5
97 changed files with 305 additions and 185 deletions
|
@ -30,6 +30,8 @@ use InvalidArgumentException;
|
|||
use LogicException;
|
||||
use Symfony\Component\Validator\Constraints as Assert;
|
||||
|
||||
use function sprintf;
|
||||
|
||||
/**
|
||||
* @ORM\Entity()
|
||||
* @ORM\Table("parameters")
|
||||
|
@ -376,7 +378,7 @@ abstract class AbstractParameter extends AbstractNamedDBElement
|
|||
*/
|
||||
protected function formatWithUnit(float $value, string $format = '%g'): string
|
||||
{
|
||||
$str = \sprintf($format, $value);
|
||||
$str = sprintf($format, $value);
|
||||
if (!empty($this->unit)) {
|
||||
return $str.' '.$this->unit;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue