| Conditions | 6 |
| Paths | 4 |
| Total Lines | 17 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 38 | public function getInfo() |
||
| 39 | { |
||
| 40 | $response = $this->getRequest()->get('magento_version'); |
||
| 41 | if ($response->getStatusCode() == 200) { |
||
| 42 | preg_match("/Magento\/([0-9]\.[0-9\.]+) \(([a-zA-Z]+)\)/", $response->getBody(), $matches); |
||
| 43 | if (isset($matches[1]) && isset($matches[2])) { |
||
| 44 | $edition = $matches[2]; |
||
| 45 | $version = $matches[1]; |
||
| 46 | // An early versions of EE 2.0 would say it's 1.0 |
||
| 47 | if ($edition == 'Enterprise' && $version == '1.0') { |
||
| 48 | $version = '2.0'; |
||
| 49 | } |
||
| 50 | return [$edition, $version]; |
||
| 51 | } |
||
| 52 | } |
||
| 53 | return false; |
||
| 54 | } |
||
| 55 | } |
||
| 56 |