| Total Complexity | 3 |
| Total Lines | 35 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | trait AssignTrait |
||
| 10 | { |
||
| 11 | |||
| 12 | /** |
||
| 13 | * List of result names to assign the matched text to. |
||
| 14 | * @var callable[] |
||
| 15 | */ |
||
| 16 | private $assignCallbacks = []; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * Resolve all callbacks registered to this trait |
||
| 20 | * |
||
| 21 | * @param $text |
||
| 22 | */ |
||
| 23 | private function resolveAssignCallbacks($text) |
||
| 27 | } |
||
| 28 | } |
||
| 29 | |||
| 30 | /** |
||
| 31 | * After parsing, assign the matched input to the specified local variable. |
||
| 32 | * Only assign if successfully matched entire parent up to root. |
||
| 33 | * |
||
| 34 | * @param mixed $variable |
||
| 35 | * @return $this |
||
| 36 | */ |
||
| 37 | public function assignTo(&$variable) |
||
| 47 |