Completed
Push — master ( 816440...cac82f )
by Vladimir
12:37
created

helpers.php ➔ session()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 1
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
ccs 1
cts 1
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
if (!function_exists('kernel')) {
6
    /**
7
     * Get kernel instance.
8
     *
9
     * @return FondBot\Foundation\Kernel
10
     */
11
    function kernel()
12
    {
13 13
        return Illuminate\Container\Container::getInstance()->get(FondBot\Foundation\Kernel::class);
14
    }
15
}
16
17
if (!function_exists('context')) {
18
    /**
19
     * Get context.
20
     *
21
     * @return FondBot\Conversation\Context
22
     */
23
    function context(): FondBot\Conversation\Context
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
24
    {
25 2
        return kernel()->getContext();
26
    }
27
}
28