mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-05-22 03:11:30 +00:00
Fix unit tests
This commit is contained in:
parent
07540bdf91
commit
6fd2bb9cf3
2 changed files with 6 additions and 1 deletions
|
|
@ -38,7 +38,7 @@ class SIFormatter
|
|||
*/
|
||||
public function getMagnitude(float $value): int
|
||||
{
|
||||
return (int) floor(log10(abs($value)));
|
||||
return intval(floor(log10(abs($value))));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -49,6 +49,11 @@ class TagFinder
|
|||
public function searchTags(string $keyword, array $options = []): array
|
||||
{
|
||||
$results = [];
|
||||
|
||||
$resolver = new OptionsResolver();
|
||||
$this->configureOptions($resolver);
|
||||
$options = $resolver->resolve($options);
|
||||
|
||||
$keyword_regex = '/^'.preg_quote($keyword, '/').'/';
|
||||
$possible_tags = $this->listTags($keyword, $options);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue