| Conditions | 3 |
| Paths | 4 |
| Total Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | public function __construct($inputIterator, array $substringMap, array $options = array()) |
||
| 15 | { |
||
| 16 | $this->substringMap = $substringMap; |
||
| 17 | |||
| 18 | if(array_key_exists('trim', $options)) { |
||
| 19 | $this->trim = $options['trim']; |
||
| 20 | unset($options['trim']); |
||
| 21 | } |
||
| 22 | |||
| 23 | if(count($options) > 0) { |
||
| 24 | throw new InvalidArgumentException('Unknow options provided: ' . implode(',', array_keys($options))); |
||
| 25 | } |
||
| 26 | |||
| 27 | parent::__construct($inputIterator, array($this, 'parseString')); |
||
| 28 | } |
||
| 29 | |||
| 48 |
Adding explicit visibility (
private,protected, orpublic) is generally recommend to communicate to other developers how, and from where this method is intended to be used.