Completed
Push — b0.27.0 ( c529b3...34cc26 )
by Sebastian
05:07
created

Controller   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 3
c 1
b 0
f 0
dl 0
loc 15
ccs 2
cts 2
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
1
<?php
2
3
/**
4
 * Linna Framework.
5
 *
6
 * @author Sebastian Rapetti <[email protected]>
7
 * @copyright (c) 2018, Sebastian Rapetti
8
 * @license http://opensource.org/licenses/MIT MIT License
9
 */
10
declare(strict_types=1);
11
12
namespace Linna\Mvc;
13
14
/**
15
 * This is the parent class for every controller in the app, permit access
16
 * to view and models for every instance of a child.
17
 */
18
class Controller
19
{
20
    /**
21
     * @var Model The model object for current controller
22
     */
23
    protected Model $model;
24
25
    /**
26
     * Constructor.
27
     *
28
     * @param Model $model
29
     */
30 20
    public function __construct(Model $model)
31
    {
32 20
        $this->model = $model;
33 20
    }
34
}
35