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

FileLoader   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 5
dl 0
loc 16
rs 10
c 2
b 0
f 0
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A loadFile() 0 9 2
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