Context   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 8
dl 0
loc 13
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
1
<?php
2
3
namespace Vanderlee\Comprehend\Core;
4
5
use Vanderlee\Comprehend\Core\Context\CaseSensitiveContextTrait;
6
use Vanderlee\Comprehend\Core\Context\PreferContextTrait;
7
use Vanderlee\Comprehend\Core\Context\SpacingContextTrait;
8
use Vanderlee\Comprehend\Directive\Prefer;
9
10
/**
11
 * Maintains the current context of the parser chain.
12
 *
13
 * @author Martijn
14
 */
15
class Context
16
{
17
    use CaseSensitiveContextTrait;
18
    use PreferContextTrait;
19
    use SpacingContextTrait;
0 ignored issues
show
Bug introduced by
The trait Vanderlee\Comprehend\Cor...ext\SpacingContextTrait requires the property $length which is not provided by Vanderlee\Comprehend\Core\Context.
Loading history...
20
21 514
    public function __construct($skipper = null, $caseSensitive = true, $preference = Prefer::FIRST)
22
    {
23 514
        self::assertPreference($preference);
24
25 513
        $this->pushSpacer($skipper);
26 513
        $this->pushCaseSensitivity($caseSensitive);
27 513
        $this->pushPreference($preference);
28 513
    }
29
}
30