DemoController   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 10
dl 0
loc 17
rs 10
c 1
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A containerInit() 0 13 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
        $cache_time = config('cache.time');
19
        $this->cache_time = $cache_time;
0 ignored issues
show
Bug Best Practice introduced by
The property cache_time does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
20
        
21
        Rudra::binding()->set($config['contracts']);
22
        Rudra::waiting()->set($config['services']);
23
24
        View::setup(dirname(__DIR__) . "/Demo/UI/tmpl", "Demo_");
25
26
        data([
27
            "title" => "Rudra Framework:: Demo Container",
28
        ]);
29
    }
30
}
31