| Total Complexity | 7 |
| Total Lines | 54 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | class ParserStructureJson implements ParserStructure |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @var array |
||
| 11 | */ |
||
| 12 | private $schema; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @var Generator |
||
| 16 | */ |
||
| 17 | private $faker; |
||
| 18 | |||
| 19 | public function __construct(Generator $faker) |
||
| 22 | } |
||
| 23 | |||
| 24 | public function setSchema(array $schema): ParserStructure |
||
| 25 | { |
||
| 26 | $this->schema = $schema; |
||
| 27 | return $this; |
||
| 28 | } |
||
| 29 | |||
| 30 | public function process(array $keysIndex): array |
||
| 61 | } |
||
| 62 | } |
This check compares calls to functions or methods with their respective definitions. If the call has less arguments than are defined, it raises an issue.
If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. Please note the @ignore annotation hint above.