Completed
Branch master (3ef992)
by Michael
03:13
created

DefaultPreset::get()   B

Complexity

Conditions 1
Paths 1

Size

Total Lines 31
Code Lines 22

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 31
rs 8.8571
c 0
b 0
f 0
cc 1
eloc 22
nc 1
nop 0
1
<?php
2
3
namespace SugaredRim\PHPUnit;
4
5
use JohnKary\PHPUnit\Listener\SpeedTrapListener;
6
7
class DefaultPreset
8
{
9
    public static function get()
10
    {
11
        $config = new \stdClass();
12
13
        $config->bootstrap = 'vendor/autoload.php';
14
        $config->src = 'src';
15
        $config->tests = 'tests';
16
        $config->colors = true;
17
18
        $config->coverage = new \stdClass();
19
        $config->coverage->text = 'php://stdout';
20
        $config->coverage->clover = 'build/logs/clover.xml';
21
        $config->coverage->html = 'build/coverage-phpunit/';
22
23
        $config->sugared = new \stdClass();
24
        $config->sugared->debug = false;
25
        $config->sugared->{'coverage-text-show-uncovered-files'} = true;
26
27
        $config->sugared->listeners = [];
28
29
        $speedtrap = new \stdClass();
30
        $speedtrap->class = SpeedTrapListener::class;
31
        $options = new \stdClass();
32
        $options->slowThreshold = 500;
33
        $options->reportLength = 10;
34
        $speedtrap->arguments = [$options];
35
36
        $config->sugared->listeners[] = $speedtrap;
37
38
        return $config;
39
    }
40
}
41