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

Controller::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 1
c 0
b 0
f 0
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
cc 1
nc 1
nop 1
crap 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