Total Complexity | 1 |
Total Lines | 53 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
8 | class RecognizerMatch extends Recognizer |
||
9 | { |
||
10 | const TYPE = 'match'; |
||
11 | const ANCHOR_START = 'start'; |
||
12 | const ANCHOR_END = 'end'; |
||
13 | const ANCHOR_ANYWHERE = 'anywhere'; |
||
14 | |||
15 | /** |
||
16 | * @var string|null |
||
17 | */ |
||
18 | public $anchor; |
||
19 | |||
20 | /** |
||
21 | * @var bool|null |
||
22 | */ |
||
23 | public $fuzzy; |
||
24 | |||
25 | /** |
||
26 | * @var array|null |
||
27 | */ |
||
28 | public $gadgetIds; |
||
29 | |||
30 | /** |
||
31 | * @var array|null |
||
32 | */ |
||
33 | public $actions; |
||
34 | |||
35 | /** |
||
36 | * @var Pattern[] |
||
37 | */ |
||
38 | public $pattern = []; |
||
39 | |||
40 | /** |
||
41 | * @param Pattern[] $pattern |
||
42 | * @param string $anchor |
||
43 | * @param bool $fuzzy |
||
44 | * @param array|null $gadgetIds |
||
45 | * @param array|null $actions |
||
46 | * |
||
47 | * @return RecognizerMatch |
||
48 | */ |
||
49 | 1 | public static function create(array $pattern, string $anchor = self::ANCHOR_START, bool $fuzzy = false, $gadgetIds = null, $actions = null): self |
|
63 |