| Total Complexity | 9 |
| Total Lines | 123 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 21 | class BarcodeBox extends InlineBlockBox |
||
| 22 | { |
||
| 23 | /** |
||
| 24 | * @var string barcode type |
||
| 25 | */ |
||
| 26 | protected $type = 'EAN13'; |
||
| 27 | /** |
||
| 28 | * @var string barcode size |
||
| 29 | */ |
||
| 30 | protected $size = '3'; |
||
| 31 | /** |
||
| 32 | * @var string barcode height |
||
| 33 | */ |
||
| 34 | protected $height = '33'; |
||
| 35 | /** |
||
| 36 | * @var string code |
||
| 37 | */ |
||
| 38 | protected $code = ''; |
||
| 39 | |||
| 40 | /** |
||
| 41 | * Get barcode type. |
||
| 42 | * |
||
| 43 | * @return string |
||
| 44 | */ |
||
| 45 | public function getType(): string |
||
| 46 | { |
||
| 47 | return $this->type; |
||
| 48 | } |
||
| 49 | |||
| 50 | /** |
||
| 51 | * Set barcode type. |
||
| 52 | * |
||
| 53 | * @param string $type |
||
| 54 | * |
||
| 55 | * @return $this |
||
| 56 | */ |
||
| 57 | public function setType(string $type) |
||
| 61 | } |
||
| 62 | |||
| 63 | /** |
||
| 64 | * Get barcode size. |
||
| 65 | * |
||
| 66 | * @return string |
||
| 67 | */ |
||
| 68 | public function getSize(): string |
||
| 69 | { |
||
| 70 | return $this->size; |
||
| 71 | } |
||
| 72 | |||
| 73 | /** |
||
| 74 | * Set barcode size. |
||
| 75 | * |
||
| 76 | * @param string $size |
||
| 77 | * |
||
| 78 | * @return $this |
||
| 79 | */ |
||
| 80 | public function setSize(string $size) |
||
| 84 | } |
||
| 85 | |||
| 86 | /** |
||
| 87 | * Get barcode height. |
||
| 88 | * |
||
| 89 | * @return string |
||
| 90 | */ |
||
| 91 | public function getHeight(): string |
||
| 94 | } |
||
| 95 | |||
| 96 | /** |
||
| 97 | * Set barcode height. |
||
| 98 | * |
||
| 99 | * @param string $height |
||
| 100 | * |
||
| 101 | * @return $this |
||
| 102 | */ |
||
| 103 | public function setHeight(string $height) |
||
| 104 | { |
||
| 105 | $this->height = $height; |
||
| 106 | return $this; |
||
| 107 | } |
||
| 108 | |||
| 109 | /** |
||
| 110 | * Get code. |
||
| 111 | * |
||
| 112 | * @return string |
||
| 113 | */ |
||
| 114 | public function getCode(): string |
||
| 117 | } |
||
| 118 | |||
| 119 | /** |
||
| 120 | * Set code. |
||
| 121 | * |
||
| 122 | * @param string $code |
||
| 123 | * |
||
| 124 | * @return $this |
||
| 125 | */ |
||
| 126 | public function setCode(string $code) |
||
| 127 | { |
||
| 128 | $this->code = $code; |
||
| 129 | return $this; |
||
| 130 | } |
||
| 131 | |||
| 132 | /** |
||
| 133 | * Generate barcode image. |
||
| 134 | * |
||
| 135 | * @return $this |
||
| 136 | */ |
||
| 137 | public function generateBarcodeImage() |
||
| 144 | } |
||
| 145 | } |
||
| 146 |