| Total Complexity | 4 |
| Total Lines | 45 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 21 | abstract class Mailcode_Parser_Statement_Tokenizer_Token |
||
| 22 | { |
||
| 23 | /** |
||
| 24 | * @var string |
||
| 25 | */ |
||
| 26 | protected $tokenID; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @var string |
||
| 30 | */ |
||
| 31 | protected $matchedText; |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @var mixed |
||
| 35 | */ |
||
| 36 | protected $subject; |
||
| 37 | |||
| 38 | /** |
||
| 39 | * @param string $tokenID |
||
| 40 | * @param string $matchedText |
||
| 41 | * @param mixed $subject |
||
| 42 | */ |
||
| 43 | public function __construct(string $tokenID, string $matchedText, $subject=null) |
||
| 44 | { |
||
| 45 | $this->tokenID = $tokenID; |
||
| 46 | $this->matchedText = $matchedText; |
||
| 47 | $this->subject = $subject; |
||
| 48 | } |
||
| 49 | |||
| 50 | public function getID() : string |
||
| 51 | { |
||
| 52 | return $this->tokenID; |
||
| 53 | } |
||
| 54 | |||
| 55 | public function getMatchedText() : string |
||
| 56 | { |
||
| 57 | return $this->matchedText; |
||
| 58 | } |
||
| 59 | |||
| 60 | protected function restoreQuotes(string $subject) : string |
||
| 63 | } |
||
| 64 | |||
| 65 | abstract public function getNormalized() : string; |
||
| 66 | } |
||
| 67 |