ApiHelpController::index()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 8
dl 0
loc 11
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
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
Unused Code introduced by
The call to App\Http\Controllers\Bas...ntroller::__construct() has too many arguments starting with $request. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

11
        parent::/** @scrutinizer ignore-call */ 
12
                __construct($request);

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.

Loading history...
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