| Total Complexity | 6 |
| Total Lines | 44 |
| Duplicated Lines | 0 % |
| Coverage | 89.47% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 5 | class ArrayNormalizer extends AbstractNormalizer |
||
| 6 | { |
||
| 7 | /** @var string */ |
||
| 8 | private $delimiter; |
||
| 9 | /** @var StringNormalizer */ |
||
| 10 | private $stringNormalizer; |
||
| 11 | |||
| 12 | 1 | public function __construct(NormalizerInterface $normalizer = null, string $delimiter = ',') |
|
| 13 | { |
||
| 14 | 1 | $this->setDelimiter($delimiter); |
|
| 15 | |||
| 16 | 1 | $this->stringNormalizer = new StringNormalizer(); |
|
| 17 | 1 | $this->stringNormalizer->setTrimCharMask($this->stringNormalizer->getTrimCharMask() . $this->delimiter); |
|
| 18 | |||
| 19 | 1 | parent::__construct($normalizer); |
|
| 20 | 1 | } |
|
| 21 | |||
| 22 | 1 | public function normalize(string $value) |
|
| 23 | { |
||
| 24 | 1 | return $this->getNormalizedValue($value); |
|
| 25 | } |
||
| 26 | |||
| 27 | 1 | protected function getNormalizedValue(string $value) |
|
| 37 | } |
||
| 38 | |||
| 39 | 1 | public function setDelimiter(string $delimiter): self |
|
| 44 | } |
||
| 45 | |||
| 46 | public function getDelimiter(): string |
||
| 51 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.