Passed
Pull Request — develop (#8)
by ANTHONIUS
04:34
created

LocalSession   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Test Coverage

Coverage 33.33%

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 13
ccs 2
cts 6
cp 0.3333
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A create() 0 6 1
A stop() 0 3 1
1
<?php
2
3
/*
4
 * This file is part of the doyo/behat-coverage-extension project.
5
 *
6
 * (c) Anthonius Munthi <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
declare(strict_types=1);
13
14
namespace Doyo\Behat\Coverage\Bridge\CodeCoverage\Session;
15
16
class LocalSession extends Session
17
{
18
    public static function create($name)
19
    {
20
        $self = new static($name);
21
        register_shutdown_function([$self, 'shutdown']);
22
23
        return $self;
24
    }
25
26 5
    public function stop()
27
    {
28 5
        $this->data = $this->processor->stop();
29
    }
30
}
31