| Total Complexity | 3 |
| Total Lines | 28 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 14 | class Document |
||
| 15 | { |
||
| 16 | |||
| 17 | public static function createFromArray($values, array $options = []) |
||
| 24 | } |
||
| 25 | |||
| 26 | /** |
||
| 27 | * Set a document attribute |
||
| 28 | * |
||
| 29 | * The key (attribute name) must be a string. |
||
| 30 | * This will validate the value of the attribute and might throw an |
||
| 31 | * exception if the value is invalid. |
||
| 32 | * |
||
| 33 | * |
||
| 34 | * @param string $key - attribute name |
||
| 35 | * @param mixed $value - value for attribute |
||
| 36 | * |
||
| 37 | * @return void |
||
| 38 | */ |
||
| 39 | public function set($key, $value) |
||
| 45 |
This check compares calls to functions or methods with their respective definitions. If the call has more 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.