PhpFunctionsWrapper   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
eloc 3
dl 0
loc 12
rs 10
c 0
b 0
f 0
ccs 0
cts 2
cp 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A exit() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace DanBettles\Defence;
6
7
/**
8
 * Wraps a selection of PHP functions so that we can work with mock objects in tests and test otherwise untestable code.
9
 */
10
class PhpFunctionsWrapper
11
{
12
    /**
13
     * See https://www.php.net/manual/en/function.exit.php
14
     *
15
     * @param string|int $status
16
     * @return never
17
     */
18
    public function exit($status = 0)
19
    {
20
        //@codingStandardsIgnoreStart
21
        /** @scrutinizer ignore-call */ exit($status);
0 ignored issues
show
Best Practice introduced by
Using exit here is not recommended.

In general, usage of exit should be done with care and only when running in a scripting context like a CLI script.

Loading history...
22
        //@codingStandardsIgnoreEnd
23
    }
24
}
25