| Conditions | 7 |
| Paths | 3 |
| Total Lines | 16 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 60 | public function getVersion() |
||
| 61 | { |
||
| 62 | $filename = dirname( $this->container->get( 'kernel' )->getRootDir() ) . DIRECTORY_SEPARATOR . 'composer.lock'; |
||
| 63 | |||
| 64 | if( file_exists( $filename ) === true && ( $content = file_get_contents( $filename ) ) !== false |
||
| 65 | && ( $content = json_decode( $content, true ) ) !== null && isset( $content['packages'] ) |
||
| 66 | ) { |
||
| 67 | foreach( (array) $content['packages'] as $item ) |
||
| 68 | { |
||
| 69 | if( $item['name'] === 'aimeos/aimeos-symfony' ) { |
||
| 70 | return $item['version']; |
||
| 71 | } |
||
| 72 | } |
||
| 73 | } |
||
| 74 | |||
| 75 | return ''; |
||
| 76 | } |
||
| 78 |