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

Tag   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 9
dl 0
loc 18
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A posts() 0 8 1
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
}