| Conditions | 1 |
| Paths | 1 |
| Total Lines | 10 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 14 | public function definition(): array |
||
| 15 | { |
||
| 16 | return [ |
||
| 17 | 'name' => $this->faker->name, |
||
| 18 | 'tax_id' => strtoupper($this->faker->bothify('C########')), |
||
| 19 | 'country' => $this->faker->countryCode, |
||
| 20 | 'address' => $this->faker->address, |
||
| 21 | 'email' => $this->faker->optional()->safeEmail, |
||
| 22 | 'phone' => $this->faker->optional()->phoneNumber, |
||
| 23 | 'type' => $this->faker->optional()->randomElement(['VAT', 'PASSPORT', 'NATIONAL_ID', 'RESIDENCE_CERTIFICATE', 'OTHER_DOCUMENT', 'UNREGISTERED']), |
||
|
|
|||
| 24 | ]; |
||
| 26 | } |
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.