Conditions | 6 |
Paths | 3 |
Total Lines | 15 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
65 | public function getVersion() |
||
66 | { |
||
67 | if( ( $content = @file_get_contents( base_path( 'composer.lock' ) ) ) !== false |
||
68 | && ( $content = json_decode( $content, true ) ) !== null && isset( $content['packages'] ) |
||
69 | ) { |
||
70 | foreach( (array) $content['packages'] as $item ) |
||
71 | { |
||
72 | if( $item['name'] === 'aimeos/aimeos-laravel' ) { |
||
73 | return $item['version']; |
||
74 | } |
||
75 | } |
||
76 | } |
||
77 | |||
78 | return ''; |
||
79 | } |
||
80 | } |