Passed
Push — Showing-Posts ( 1f11b9...54555e )
by Stone
02:27
created

Post::new()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
namespace App\Controllers\Admin;
3
4
use Core\AdminController;
5
6
class Post extends AdminController{
7
8
    /**
9
     * page for new post
10
     */
11
    public function new(){
12
        $this->onlyAdmin();
13
        $this->renderView('Admin/NewPost');
14
    }
15
16
    /**
17
     * Lists all the posts
18
     */
19
    public function list(){
20
        $this->onlyAdmin();
21
22
    }
23
24
    /**
25
     * Shows the post to modify and update
26
     * @param $idPost
27
     */
28
    public function modify($idPost){
0 ignored issues
show
Unused Code introduced by
The parameter $idPost 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

28
    public function modify(/** @scrutinizer ignore-unused */ $idPost){

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...
29
        $this->onlyAdmin();
30
31
    }
32
}