Passed
Push — master ( e985ab...f5765f )
by Mihail
04:35
created

Controller::buildOutput()   B

Complexity

Conditions 6
Paths 10

Size

Total Lines 48
Code Lines 25

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 6
eloc 25
nc 10
nop 0
dl 0
loc 48
rs 8.551
c 0
b 0
f 0
1
<?php
2
3
namespace Ffcms\Core\Arch;
4
5
use Ffcms\Core\App;
6
use Ffcms\Core\Debug\DebugMeasure;
7
use Ffcms\Core\Exception\NativeException;
8
use Ffcms\Core\Helper\FileSystem\File;
9
use Ffcms\Core\Helper\Type\Str;
10
use Ffcms\Core\Interfaces\iController;
11
use Ffcms\Core\Template\Variables;
12
use Ffcms\Core\Traits\DynamicGlobal;
13
use Ffcms\Templex\Template;
0 ignored issues
show
Bug introduced by
The type Ffcms\Templex\Template was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
14
15
/**
16
 * Class Controller. Classic carcase of controller in MVC architecture.
17
 * @package Ffcms\Core\Arch
18
 */
19
class Controller implements iController
20
{
21
    use DebugMeasure;
22
23
    /** @var string */
24
    public $lang = 'en';
25
26
    /** @var \Ffcms\Core\Network\Request */
27
    public $request;
28
    /** @var \Ffcms\Core\Network\Response */
29
    public $response;
30
    /** @var View */
31
    public $view;
32
33
    /**
34
     * Controller constructor. Set controller access data - request, response, view
35
     */
36
    public function __construct()
37
    {
38
        $this->lang = App::$Request->getLanguage();
39
        $this->request = App::$Request;
40
        $this->response = App::$Response;
41
        $this->view = App::$View;
42
        $this->before();
43
    }
44
45
    /** Before action call method */
46
    public function before() {}
47
    
48
    /** Global bootable method */
49
    public static function boot(): void {}
50
51
    /** After action called method */
52
    public function after() {}
53
}
54