Passed
Push — master ( d8b5d7...ef6cbf )
by Korotkov
01:59 queued 11s
created

ShipController::info()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
c 0
b 0
f 0
nc 1
nop 1
dl 0
loc 3
rs 10
1
<?php
2
3
namespace App\Ship;
4
5
use App\Containers\Web\Listeners\MessageListener;
6
use App\Ship\Utils\HelperTrait;
7
use Rudra\Controller\Controller;
8
use Rudra\Container\Facades\Rudra;
9
use Rudra\EventDispatcher\EventDispatcherFacade as Dispatcher;
10
11
class ShipController extends Controller
12
{
13
    use HelperTrait;
14
15
    public function generalPreCall()
16
    {
17
        if (Rudra::config()->get("environment") === "development") {
18
            Rudra::get("debugbar")['time']->stopMeasure('routing');
19
            data([
20
                "debugbar" => Rudra::get("debugbar")->getJavascriptRenderer(),
21
            ]);
22
        }
23
    }
24
25
    public function eventRegistration()
26
    {
27
        Dispatcher::addListener('message', [MessageListener::class, 'info']);
28
    }
29
}
30