Passed
Pull Request — master (#22)
by Korotkov
01:20
created

ShipController::generalPreCall()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

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