polyfill.php ➔ escapeshellarg()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 1
dl 0
loc 4
rs 10
c 0
b 0
f 0
ccs 0
cts 1
cp 0
crap 2
1
<?php
2
3
namespace Recca0120\LaravelTracy
4
{
5
    if (function_exists('escapeshellarg') === true) {
6
        function escapeshellarg($input)
7
        {
8
            return \escapeshellarg($input);
9
        }
10
    } else {
11
        function escapeshellarg($input)
0 ignored issues
show
Best Practice introduced by
The function Recca0120\LaravelTracy\escapeshellarg() has been defined more than once; this definition is ignored, only the first definition in this file (L6-9) is considered.

This check looks for functions that have already been defined in the same file.

Some Codebases, like WordPress, make a practice of defining functions multiple times. This may lead to problems with the detection of function parameters and types. If you really need to do this, you can mark the duplicate definition with the @ignore annotation.

/**
 * @ignore
 */
function getUser() {

}

function getUser($id, $realm) {

}

See also the PhpDoc documentation for @ignore.

Loading history...
12
        {
13
            $input = str_replace('\'', '\\\'', $input);
14
15
            return '\''.$input.'\'';
16
        }
17
    }
18
}
19
20
namespace Tracy
21
{
22
    function escapeshellarg($input)
23
    {
24
        return \Recca0120\LaravelTracy\escapeshellarg($input);
25
    }
26
}
27