Completed
Push — master ( c80620...0cd8d9 )
by Martijn
03:25
created

Context   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 8
dl 0
loc 13
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
introduced by
The trait Vanderlee\Comprehend\Cor...ext\SpacingContextTrait requires some properties which are not provided by Vanderlee\Comprehend\Core\Context: $match, $length
Loading history...
20
21
    public function __construct($skipper = null, $case_sensitive = true, $preference = Prefer::FIRST)
22
    {
23
        self::assertPreference($preference);
24
25
        $this->pushSpacer($skipper);
26
        $this->pushCaseSensitivity($case_sensitive);
27
        $this->pushPreference($preference);
28
    }
29
30
}
31