Test Failed
Push — master ( e387ef...0464de )
by Lexey
03:14
created

Env::dump()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace LF\EnvDiff;
4
5
use InvalidArgumentException;
6
use LF\EnvDiff\Env\Dumper;
7
use LF\EnvDiff\Env\Parser;
8
9
class Env
10
{
11
    /**
12
     * @param array $envArray
13
     *
14
     * @return string
15
     */
16
    public static function dump(array $envArray)
17
    {
18
        return (new Dumper())->dump($envArray);
19
    }
20
21
    /**
22
     * @param array $path
23
     *
24
     * @return array
25
     *
26
     * @throws InvalidArgumentException
27
     */
28
    public static function parse($path)
29
    {
30
        return (new Parser())->parse($path);
0 ignored issues
show
Documentation introduced by
$path is of type array, but the function expects a string.

It seems like the type of the argument is not accepted by the function/method which you are calling.

In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.

We suggest to add an explicit type cast like in the following example:

function acceptsInteger($int) { }

$x = '123'; // string "123"

// Instead of
acceptsInteger($x);

// we recommend to use
acceptsInteger((integer) $x);
Loading history...
31
    }
32
}
33