mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-05-20 18:31:33 +00:00
Made BarcodeScanResult classes readonly
This commit is contained in:
parent
c29605ef23
commit
f124fa0023
2 changed files with 35 additions and 35 deletions
|
|
@ -29,12 +29,12 @@ use App\Entity\LabelSystem\LabelSupportedElement;
|
|||
* This class represents the result of a barcode scan of a barcode that uniquely identifies a local entity,
|
||||
* like an internally generated barcode or a barcode that was added manually to the system by a user
|
||||
*/
|
||||
class LocalBarcodeScanResult implements BarcodeScanResultInterface
|
||||
readonly class LocalBarcodeScanResult implements BarcodeScanResultInterface
|
||||
{
|
||||
public function __construct(
|
||||
public readonly LabelSupportedElement $target_type,
|
||||
public readonly int $target_id,
|
||||
public readonly BarcodeSourceType $source_type,
|
||||
public LabelSupportedElement $target_type,
|
||||
public int $target_id,
|
||||
public BarcodeSourceType $source_type,
|
||||
) {
|
||||
}
|
||||
|
||||
|
|
@ -46,4 +46,4 @@ class LocalBarcodeScanResult implements BarcodeScanResultInterface
|
|||
'Target ID' => $this->target_id,
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue