| Conditions | 4 |
| Paths | 4 |
| Total Lines | 18 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 37 | public function parse() |
||
| 38 | { |
||
| 39 | if ($this->responseQueueItem()->getCommand() === '-') { |
||
| 40 | $source = $this->source(); |
||
| 41 | $pattern = '/{weight=([0-9]+)}/'; |
||
| 42 | |||
| 43 | if ($this->matchesPattern($pattern, $source)) { |
||
| 44 | $matches = $this->getMatchesFromPattern($pattern, $source)[0]; |
||
| 45 | |||
| 46 | if (isset($matches[0])) { |
||
| 47 | $this->responseQueueItem->order += (int)$matches[1]; |
||
| 48 | $source = str_replace($matches[0], '', $source); |
||
| 49 | } |
||
| 50 | } |
||
| 51 | return $source; |
||
| 52 | } |
||
| 53 | |||
| 54 | return false; |
||
| 55 | } |
||
| 68 |