| Total Complexity | 7 |
| Total Lines | 53 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 13 | trait StandaloneLaruploadNotCallables |
||
| 14 | { |
||
| 15 | /** |
||
| 16 | * @throws Exception |
||
| 17 | * @internal |
||
| 18 | */ |
||
| 19 | public static function make(string $name, LaruploadMode $mode = LaruploadMode::HEAVY): UploadEntities |
||
| 20 | { |
||
| 21 | $self = new self($name, $mode); |
||
|
|
|||
| 22 | $self->internalException(); |
||
| 23 | } |
||
| 24 | |||
| 25 | /** |
||
| 26 | * @internal |
||
| 27 | */ |
||
| 28 | public function saved(Model $model): Model |
||
| 29 | { |
||
| 30 | $this->internalException(); |
||
| 31 | } |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @internal |
||
| 35 | */ |
||
| 36 | public function deleted(): void |
||
| 39 | } |
||
| 40 | |||
| 41 | /** |
||
| 42 | * @internal |
||
| 43 | */ |
||
| 44 | public function download(string $style = 'original'): StreamedResponse|RedirectResponse|null |
||
| 45 | { |
||
| 46 | $this->internalException(); |
||
| 47 | } |
||
| 48 | |||
| 49 | /** |
||
| 50 | * @internal |
||
| 51 | */ |
||
| 52 | public function setOutput(Model $model): void |
||
| 53 | { |
||
| 54 | $this->internalException(); |
||
| 55 | } |
||
| 56 | |||
| 57 | public function secureIdsMethod(LaruploadSecureIdsMethod $method): self |
||
| 60 | } |
||
| 61 | |||
| 62 | private function internalException() |
||
| 66 | ); |
||
| 67 | } |
||
| 68 | } |
||
| 69 |
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.