| Total Complexity | 7 |
| Total Lines | 61 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 23 | final class Byte extends QRDataModeAbstract{ |
||
| 24 | |||
| 25 | /** |
||
| 26 | * @inheritDoc |
||
| 27 | */ |
||
| 28 | public const DATAMODE = Mode::BYTE; |
||
| 29 | |||
| 30 | /** |
||
| 31 | * @inheritDoc |
||
| 32 | */ |
||
| 33 | public function getLengthInBits():int{ |
||
| 35 | } |
||
| 36 | |||
| 37 | /** |
||
| 38 | * @inheritDoc |
||
| 39 | */ |
||
| 40 | public static function validateString(string $string):bool{ |
||
| 42 | } |
||
| 43 | |||
| 44 | /** |
||
| 45 | * @inheritDoc |
||
| 46 | */ |
||
| 47 | public function write(BitBuffer $bitBuffer, int $versionNumber):QRDataModeInterface{ |
||
| 48 | $len = $this->getCharCount(); |
||
| 49 | |||
| 50 | $bitBuffer |
||
| 51 | ->put(self::DATAMODE, 4) |
||
| 52 | ->put($len, $this::getLengthBits($versionNumber)) |
||
| 53 | ; |
||
| 54 | |||
| 55 | $i = 0; |
||
| 56 | |||
| 57 | while($i < $len){ |
||
| 58 | $bitBuffer->put(ord($this->data[$i]), 8); |
||
| 59 | $i++; |
||
| 60 | } |
||
| 61 | |||
| 62 | return $this; |
||
| 63 | } |
||
| 64 | |||
| 65 | /** |
||
| 66 | * @inheritDoc |
||
| 67 | * |
||
| 68 | * @throws \chillerlan\QRCode\Data\QRCodeDataException |
||
| 69 | */ |
||
| 70 | public static function decodeSegment(BitBuffer $bitBuffer, int $versionNumber):string{ |
||
| 84 | } |
||
| 85 | |||
| 87 |