mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-01-20 09:09:33 +00:00
fix static analysis errors
This commit is contained in:
parent
3b1ea8275f
commit
7fb46c9516
2 changed files with 7 additions and 2 deletions
|
|
@ -309,7 +309,9 @@ class ScanController extends AbstractController
|
|||
|
||||
$modeEnum = null;
|
||||
if ($mode !== '') {
|
||||
$modeEnum = BarcodeSourceType::from((int) $mode);
|
||||
$i = (int) $mode;
|
||||
$cases = BarcodeSourceType::cases();
|
||||
$modeEnum = $cases[$i] ?? null; // null if out of range
|
||||
}
|
||||
|
||||
try {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue