Passed
Push — Showing-Posts ( 7ae013...329372 )
by Stone
02:31
created

Tag::posts()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 5
nc 1
nop 1
dl 0
loc 8
rs 10
c 0
b 0
f 0
1
<?php
2
namespace App\Controllers;
3
4
use App\Models\CategoryModel;
5
use Core\Controller;
6
use Core\Container;
7
8
class Tag extends Controller{
9
10
    protected $siteConfig;
11
12
    public function __construct(Container $container)
13
    {
14
        $this->loadModules[] = 'SiteConfig';
15
        parent::__construct($container);
16
    }
17
18
    public function posts($tagId)
0 ignored issues
show
Unused Code introduced by
The parameter $tagId is not used and could be removed. ( Ignorable by Annotation )

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

18
    public function posts(/** @scrutinizer ignore-unused */ $tagId)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
19
    {
20
        $categoryModel = new CategoryModel($this->container);
21
22
        $this->sendSessionVars();
23
        $this->data['configs'] = $this->siteConfig->getSiteConfig();
24
        $this->data['navigation'] = $categoryModel->getMenu();
25
        $this->renderView('Tag');
26
    }
27
}