| Total Complexity | 8 |
| Total Lines | 49 |
| Duplicated Lines | 0 % |
| Changes | 6 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 23 | class QRString extends QROutputAbstract{ |
||
| 24 | |||
| 25 | protected string $defaultMode = QRCode::OUTPUT_STRING_TEXT; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @inheritDoc |
||
| 29 | */ |
||
| 30 | protected function moduleValueIsValid($value):bool{ |
||
| 31 | return is_string($value); |
||
| 32 | } |
||
| 33 | |||
| 34 | /** |
||
| 35 | * @inheritDoc |
||
| 36 | */ |
||
| 37 | protected function getModuleValue($value):string{ |
||
| 38 | return $value; |
||
| 39 | } |
||
| 40 | |||
| 41 | /** |
||
| 42 | * @inheritDoc |
||
| 43 | */ |
||
| 44 | protected function getDefaultModuleValue(bool $isDark):string{ |
||
| 45 | return $isDark ? $this->options->textDark : $this->options->textLight; |
||
| 46 | } |
||
| 47 | |||
| 48 | /** |
||
| 49 | * string output |
||
| 50 | */ |
||
| 51 | protected function text(string $file = null):string{ |
||
|
|
|||
| 52 | $str = []; |
||
| 53 | |||
| 54 | foreach($this->matrix->matrix() as $row){ |
||
| 55 | $r = []; |
||
| 56 | |||
| 57 | foreach($row as $M_TYPE){ |
||
| 58 | $r[] = $this->moduleValues[$M_TYPE]; |
||
| 59 | } |
||
| 60 | |||
| 61 | $str[] = implode('', $r); |
||
| 62 | } |
||
| 63 | |||
| 64 | return implode($this->options->eol, $str); |
||
| 65 | } |
||
| 66 | |||
| 67 | /** |
||
| 68 | * JSON output |
||
| 69 | */ |
||
| 70 | protected function json(string $file = null):string{ |
||
| 72 | } |
||
| 73 | |||
| 74 | } |
||
| 75 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.