| Conditions | 4 |
| Paths | 4 |
| Total Lines | 17 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 18 | public final function algorithm($string) |
||
| 19 | { |
||
| 20 | if (count($string) < 1) { |
||
| 21 | return $this->ifStringEnd(); |
||
| 22 | } |
||
| 23 | $this->char = array_shift($string); |
||
| 24 | $prevChild = $this->child; |
||
| 25 | $this->child = $this->child->getChild($this->char); |
||
| 26 | if ( ! $this->child) { |
||
| 27 | $ret = $this->childIsInvalid($prevChild); |
||
| 28 | $this->child = $ret['returnValue']; |
||
| 29 | if ($ret['return']) { |
||
| 30 | return $ret['returnValue']; |
||
| 31 | } |
||
| 32 | } |
||
| 33 | return $this->algorithm($string, $this->child); |
||
| 34 | } |
||
| 35 | |||
| 38 | } |