1 | <?php |
||
2 | |||
3 | namespace App\Http\Controllers; |
||
4 | |||
5 | use Illuminate\Http\Request; |
||
6 | |||
7 | class ApiHelpController extends BasePageController |
||
8 | { |
||
9 | public function __construct(Request $request) |
||
10 | { |
||
11 | parent::__construct($request); |
||
0 ignored issues
–
show
|
|||
12 | } |
||
13 | |||
14 | /** |
||
15 | * @throws \Exception |
||
16 | */ |
||
17 | public function index(): void |
||
18 | { |
||
19 | $this->setPreferences(); |
||
20 | $title = 'Api Help'; |
||
21 | $meta_title = 'Api Help Topics'; |
||
22 | $meta_keywords = 'view,nzb,api,details,help,json,rss,atom'; |
||
23 | $meta_description = 'View description of the site Nzb Api.'; |
||
24 | |||
25 | $content = $this->smarty->fetch('apidesc.tpl'); |
||
26 | $this->smarty->assign(compact('content', 'title', 'meta_title', 'meta_keywords', 'meta_description')); |
||
27 | $this->pagerender(); |
||
28 | } |
||
29 | |||
30 | /** |
||
31 | * @throws \Exception |
||
32 | */ |
||
33 | public function apiv2(): void |
||
34 | { |
||
35 | $this->setPreferences(); |
||
36 | $title = 'Api V2 Help'; |
||
37 | $meta_title = 'Api V2 Help Topics'; |
||
38 | $meta_keywords = 'view,nzb,api,details,help,json,rss,atom'; |
||
39 | $meta_description = 'View description of the site Nzb version 2 Api.'; |
||
40 | |||
41 | $content = $this->smarty->fetch('apiv2desc.tpl'); |
||
42 | $this->smarty->assign(compact('content', 'title', 'meta_title', 'meta_keywords', 'meta_description')); |
||
43 | $this->pagerender(); |
||
44 | } |
||
45 | } |
||
46 |
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.