| Conditions | 3 |
| Paths | 3 |
| Total Lines | 14 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php namespace nyx\console\input\formats; |
||
| 20 | public function __construct(string $input, interfaces\Tokenizer $tokenizer = null, interfaces\Parser $parser = null) |
||
| 21 | { |
||
| 22 | // Unless a specific Tokenizer is given, we will instantiate a sane default. |
||
| 23 | if (!isset($tokenizer)) { |
||
| 24 | $tokenizer = new parsers\Str; |
||
| 25 | |||
| 26 | // Our default Tokenizer is also a Parser, so if none was given, let's just re-use the instance. |
||
| 27 | if (!isset($parser)) { |
||
| 28 | $parser = $tokenizer; |
||
| 29 | } |
||
| 30 | } |
||
| 31 | |||
| 32 | parent::__construct($tokenizer->tokenize($input), $parser); |
||
| 33 | } |
||
| 34 | } |
||
| 35 |