. */ declare(strict_types=1); namespace App\Services\LabelSystem\BarcodeScanner; 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 */ readonly class LocalBarcodeScanResult implements BarcodeScanResultInterface { public function __construct( public LabelSupportedElement $target_type, public int $target_id, public BarcodeSourceType $source_type, ) { } public function getDecodedForInfoMode(): array { return [ 'Barcode type' => $this->source_type->name, 'Target type' => $this->target_type->name, 'Target ID' => $this->target_id, ]; } }