X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Flibs%2Fcomposer%2FComposerLock.php;h=dc8bc035b20667cbec57f7ff6475627f390be092;hp=22c33191d7f849342f59c94a8696571c67397166;hb=d19826aa35b206847a568a4b2c1c9ffaa615fca5;hpb=f873b499650ef5d27570f9cb96d01d1477f9e089 diff --git a/includes/libs/composer/ComposerLock.php b/includes/libs/composer/ComposerLock.php index 22c33191d7..dc8bc035b2 100644 --- a/includes/libs/composer/ComposerLock.php +++ b/includes/libs/composer/ComposerLock.php @@ -15,25 +15,21 @@ class ComposerLock { $this->contents = json_decode( file_get_contents( $location ), true ); } - public function getHash() { - return $this->contents['hash']; - } - /** * Dependencies currently installed according to composer.lock * * @return array */ public function getInstalledDependencies() { - $deps = array(); + $deps = []; foreach ( $this->contents['packages'] as $installed ) { - $deps[$installed['name']] = array( + $deps[$installed['name']] = [ 'version' => ComposerJson::normalizeVersion( $installed['version'] ), 'type' => $installed['type'], - 'licenses' => isset( $installed['license'] ) ? $installed['license'] : array(), - 'authors' => isset( $installed['authors'] ) ? $installed['authors'] : array(), - 'description' => isset( $installed['description'] ) ? $installed['description']: '', - ); + 'licenses' => isset( $installed['license'] ) ? $installed['license'] : [], + 'authors' => isset( $installed['authors'] ) ? $installed['authors'] : [], + 'description' => isset( $installed['description'] ) ? $installed['description'] : '', + ]; } return $deps;