| Total Complexity | 1 |
| Total Lines | 53 |
| Duplicated Lines | 0 % |
| Changes | 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 |
||
| 27 | */ |
||
| 28 | public $gadgetIds = []; |
||
| 29 | |||
| 30 | /** |
||
| 31 | * @var array |
||
| 32 | */ |
||
| 33 | public $actions = []; |
||
| 34 | |||
| 35 | /** |
||
| 36 | * @var Pattern[] |
||
| 37 | */ |
||
| 38 | public $pattern = []; |
||
| 39 | |||
| 40 | /** |
||
| 41 | * @param string $anchor |
||
| 42 | * @param bool $fuzzy |
||
| 43 | * @param array $gadgetIds |
||
| 44 | * @param array $actions |
||
| 45 | * @param Pattern[] $pattern |
||
| 46 | * |
||
| 47 | * @return RecognizerMatch |
||
| 48 | */ |
||
| 49 | public static function create(string $anchor, bool $fuzzy, array $gadgetIds = [], array $actions = [], array $pattern = []): self |
||
| 63 |