| Total Complexity | 4 |
| Total Lines | 40 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | class AlternativeScheme implements QrCodeableInterface, SelfValidatableInterface |
||
| 12 | { |
||
| 13 | use SelfValidatableTrait; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * Parameter character chain of the alternative scheme |
||
| 17 | * |
||
| 18 | * @var string |
||
| 19 | */ |
||
| 20 | private $parameter; |
||
| 21 | |||
| 22 | public function getParameter(): ?string |
||
| 23 | { |
||
| 24 | return $this->parameter; |
||
| 25 | } |
||
| 26 | |||
| 27 | public function setParameter(string $parameter) : self |
||
| 28 | { |
||
| 29 | $this->parameter = $parameter; |
||
| 30 | |||
| 31 | return $this; |
||
| 32 | } |
||
| 33 | |||
| 34 | public function getQrCodeData() : array |
||
| 35 | { |
||
| 36 | return [ |
||
| 37 | $this->getParameter() |
||
| 38 | ]; |
||
| 39 | } |
||
| 40 | |||
| 41 | /** |
||
| 42 | * Note that no real-life alternative schemes yet exist. Therefore validation is kept simple yet. |
||
| 43 | * @link https://www.paymentstandards.ch/en/home/softwarepartner/qr-bill/alternative-schemes.html |
||
| 44 | */ |
||
| 45 | public static function loadValidatorMetadata(ClassMetadataInterface $metadata) : void |
||
| 51 | ]) |
||
| 52 | ]); |
||
| 53 | } |
||
| 54 | } |