mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-03-01 04:49:36 +00:00
fix static analysis errors
This commit is contained in:
parent
8f63a9fb9e
commit
1484cea458
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