| Conditions | 4 |
| Paths | 4 |
| Total Lines | 18 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 51 | public function operation(Operation $operation) |
||
| 52 | { |
||
| 53 | if ($this->done) { |
||
| 54 | throw new \RuntimeException("Cannot add operation to finished PathTracer"); |
||
| 55 | } |
||
| 56 | |||
| 57 | if ($operation->isLogical()) { |
||
| 58 | // Logical opcodes mean the end of a segment |
||
| 59 | if (count($this->current) > 0) { |
||
| 60 | $this->makeSegment(); |
||
| 61 | } |
||
| 62 | |||
| 63 | $this->addToCurrent($operation); |
||
| 64 | $this->makeSegment(); |
||
| 65 | } else { |
||
| 66 | $this->addToCurrent($operation); |
||
| 67 | } |
||
| 68 | } |
||
| 69 | |||
| 88 |