| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 15 | public function getCWPVersionNumber() |
||
| 16 | { |
||
| 17 | /** @var VersionProvider $versionProvider */ |
||
| 18 | $versionProvider = $this->owner->getVersionProvider(); |
||
| 19 | |||
| 20 | $modules = $versionProvider->getModuleVersionFromComposer(['cwp/cwp-core']); |
||
| 21 | if (empty($modules)) { |
||
| 22 | return ''; |
||
| 23 | } |
||
| 24 | |||
| 25 | // Example: "2.2.x-dev" |
||
| 26 | $cwpCore = $modules['cwp/cwp-core']; |
||
| 27 | return (string) substr($cwpCore, 0, strpos($cwpCore, '.', 2)); |
||
| 28 | } |
||
| 30 |