andrey-helldar /
support
| 1 | <?php |
||
| 2 | /* |
||
| 3 | * This file is part of the "andrey-helldar/support" project. |
||
| 4 | * |
||
| 5 | * For the full copyright and license information, please view the LICENSE |
||
| 6 | * file that was distributed with this source code. |
||
| 7 | * |
||
| 8 | * @author Andrey Helldar <[email protected]> |
||
| 9 | * |
||
| 10 | * @copyright 2021 Andrey Helldar |
||
| 11 | * |
||
| 12 | * @license MIT |
||
| 13 | * |
||
| 14 | * @see https://github.com/andrey-helldar/support |
||
| 15 | */ |
||
| 16 | |||
| 17 | namespace Helldar\Support\Concerns; |
||
| 18 | |||
| 19 | trait Makeable |
||
| 20 | { |
||
| 21 | public static function make(...$parameters) |
||
| 22 | { |
||
| 23 | return new static(...$parameters); |
||
|
0 ignored issues
–
show
|
|||
| 24 | } |
||
| 25 | } |
||
| 26 |
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.