Passed
Push — master ( 8207a6...f4663c )
by Caen
03:13 queued 13s
created

array_map_unique()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 3
nc 2
nop 2
dl 0
loc 7
rs 10
c 0
b 0
f 0
1
<?php
2
3
use Hyde\Framework\HydeKernel;
4
5
if (! function_exists('hyde')) {
6
    /**
7
     * Get the available HydeKernel instance.
8
     *
9
     * @return \Hyde\Framework\HydeKernel
10
     */
11
    function hyde(): HydeKernel
12
    {
13
        return app(HydeKernel::class);
14
    }
15
}
16
17
if (! function_exists('unslash')) {
18
    /**
19
     * Remove trailing slashes from the start and end of a string.
20
     *
21
     * @param  string  $string
22
     * @return string
23
     */
24
    function unslash(string $string): string
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...
25
    {
26
        return trim($string, '/\\');
27
    }
28
}
29