Completed
Push — master ( 55d462...8b2cae )
by Jitendra
20s queued 11s
created

underscore()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 3
Bugs 0 Features 1
Metric Value
cc 1
eloc 1
c 3
b 0
f 1
nc 1
nop 1
dl 0
loc 3
rs 10
1
<?php
2
3
/*
4
 * This file is part of the PHP-UNDERSCORE package.
5
 *
6
 * (c) Jitendra Adhikari <[email protected]>
7
 *     <https://github.com/adhocore>
8
 *
9
 * Licensed under MIT license.
10
 */
11
12
use Ahc\Underscore\Underscore;
13
14
\class_alias(Underscore::class, 'Ahc\\Underscore');
15
16
if (!\function_exists('underscore')) {
17
    /**
18
     * Underscore instantiation helper.
19
     *
20
     * @param mixed $data
21
     *
22
     * @return Underscore
23
     */
24
    function underscore($data = [])
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 new Underscore($data);
27
    }
28
}
29