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

LocalSession::create()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 1
dl 0
loc 6
ccs 0
cts 4
cp 0
crap 2
rs 10
c 0
b 0
f 0
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