LSBDataWeFeelIT /
LSBNumberingBundle
| 1 | <?php |
||
| 2 | declare(strict_types=1); |
||
| 3 | |||
| 4 | namespace LSB\NumberingBundle\Service; |
||
| 5 | |||
| 6 | use LSB\NumberingBundle\Exception\NumberingGeneratorException; |
||
| 7 | use LSB\NumberingBundle\Model\Tag; |
||
| 8 | |||
| 9 | /** |
||
| 10 | * Class NumberingPatternTagVerifier |
||
| 11 | * @package LSB\NumberingBundle\Service |
||
| 12 | */ |
||
| 13 | class NumberingPatternTagVerifier |
||
| 14 | { |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @param array $patternConfig |
||
| 18 | * @param array $counterConfig |
||
| 19 | * @throws NumberingGeneratorException |
||
| 20 | */ |
||
| 21 | 1 | public function verify(array $patternConfig, array $counterConfig): void |
|
|
0 ignored issues
–
show
|
|||
| 22 | { |
||
| 23 | // verify number tag |
||
| 24 | 1 | preg_match_all(Tag::REG_EXPS[Tag::NUMBER], $patternConfig['pattern'], $matches); |
|
| 25 | 1 | if (empty($matches[0])) { |
|
| 26 | 1 | throw new NumberingGeneratorException(sprintf('No {%s} tag in pattern', Tag::NUMBER)); |
|
| 27 | } |
||
| 28 | |||
| 29 | // TODO verify time and object context tag if necessary |
||
| 30 | } |
||
| 31 | |||
| 32 | |||
| 33 | } |
||
| 34 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.