Passed
Push — master ( 786cae...5fe6af )
by Korotkov
03:49 queued 01:54
created

DemoController   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 8
dl 0
loc 15
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A containerInit() 0 11 1
1
<?php
2
3
namespace App\Containers\Demo;
4
5
use App\Ship\ShipController;
6
use Rudra\Container\Facades\Rudra;
7
use Rudra\View\ViewFacade as View;
8
use App\Containers\Demo\Tools\HelperTrait;
9
use Rudra\Controller\ContainerControllerInterface;
10
11
class DemoController extends ShipController implements ContainerControllerInterface
12
{
13
    use HelperTrait;
14
15
    public function containerInit(): void
16
    {
17
        $config = require_once "config.php";
18
19
        Rudra::binding()->set($config['contracts']);
20
        Rudra::waiting()->set($config['services']);
21
22
        View::setup(dirname(__DIR__) . '/', "Demo/UI/tmpl", "Demo/UI/cache");
23
24
        data([
25
            "title" => "Rudra Framework:: Demo Container",
26
        ]);
27
    }
28
}
29