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

DefaultPreset   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 34
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
B get() 0 31 1
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