| Conditions | 3 |
| Paths | 4 |
| Total Lines | 18 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 54 | protected function createRequestFromFactory() |
||
| 55 | { |
||
| 56 | $dispatcher = $this->dispatcher; |
||
| 57 | $isInvalidFactory = (!($this->factory instanceof RequestFactory)); |
||
| 58 | $isValidDispatcher = ($dispatcher instanceof DispatcherInterface); |
||
| 59 | |||
| 60 | if ($isInvalidFactory) { |
||
| 61 | $this->factory = new RequestFactory(); |
||
| 62 | } |
||
| 63 | |||
| 64 | if ($isValidDispatcher) { |
||
| 65 | $this->factory->overwriteDispatcher($dispatcher); |
||
| 66 | } |
||
| 67 | |||
| 68 | $factory = $this->factory; |
||
| 69 | |||
| 70 | return $factory->create(); |
||
| 71 | } |
||
| 72 | } |
||
| 73 |