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

ShipController   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A info() 0 3 1
A eventRegistration() 0 2 1
A generalPreCall() 0 6 2
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