mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-13 03:44:36 +02:00
Fixed some inspection issues.
This commit is contained in:
parent
eef26f7ae6
commit
639829f5c5
97 changed files with 305 additions and 185 deletions
|
@ -23,6 +23,8 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Services\Misc;
|
||||
|
||||
use InvalidArgumentException;
|
||||
|
||||
/**
|
||||
* This Parser allows to parse number ranges like 1-3, 4, 5.
|
||||
*/
|
||||
|
@ -53,7 +55,7 @@ class RangeParser
|
|||
} elseif (empty($number)) { //Allow empty tokens
|
||||
continue;
|
||||
} else {
|
||||
throw new \InvalidArgumentException('Invalid range encoutered: '.$number);
|
||||
throw new InvalidArgumentException('Invalid range encoutered: '.$number);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -74,7 +76,7 @@ class RangeParser
|
|||
$this->parse($range_str);
|
||||
|
||||
return true;
|
||||
} catch (\InvalidArgumentException $exception) {
|
||||
} catch (InvalidArgumentException $exception) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue