Passed
Branch master (baa65a)
by Oliver
09:35
created

FileLoader::loadFile()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 9
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
cc 2
eloc 4
nc 2
nop 1
dl 0
loc 9
rs 10
c 2
b 0
f 0
1
<?php
2
3
namespace OckCyp\CoversValidator\Loader;
4
5
class FileLoader
6
{
7
    /**
8
     * Include a file
9
     *
10
     * @param string $filename
11
     */
12
    public static function loadFile($filename)
13
    {
14
        if (class_exists(\PHPUnit\Util\Fileloader::class)) {
15
            // PHPUnit 6.x
16
            \PHPUnit\Util\Fileloader::checkAndLoad($filename);
17
        } else {
18
            // @codeCoverageIgnoreStart
19
            // PHPUnit 7.x+
20
            \PHPUnit\Util\FileLoader::checkAndLoad($filename);
21
            // @codeCoverageIgnoreEnd
22
        }
23
    }
24
}
25