public static function getDecomposerVersion($composerArray, $packages)
    {
        if (isset($composerArray['require'][self::PACKAGE_NAME])) {
            return $composerArray['require'][self::PACKAGE_NAME];
        }

        if (isset($composerArray['require-dev'][self::PACKAGE_NAME])) {
            return $composerArray['require-dev'][self::PACKAGE_NAME];
        }

        foreach ($packages as $package) {
            if (isset($package['dependencies'][self::PACKAGE_NAME])) {
                return $package['dependencies'][self::PACKAGE_NAME];
            }

            if (isset($package['dev-dependencies'][self::PACKAGE_NAME])) {
                return $package['dev-dependencies'][self::PACKAGE_NAME];
            }
        }

        return 'unknown';
    }
public static function getDecomposerVersion($composerArray, $packages)
    {
        if (isset($composerArray['require'][self::PACKAGE_NAME])) {
            return $composerArray['require'][self::PACKAGE_NAME];
        }

        if (isset($composerArray['require-dev'][self::PACKAGE_NAME])) {
            return $composerArray['require-dev'][self::PACKAGE_NAME];
        }

        foreach ($packages as $package) {
            if (isset($package['dependencies'][self::PACKAGE_NAME])) {
                return $package['dependencies'][self::PACKAGE_NAME];
            }

            if (isset($package['dev-dependencies'][self::PACKAGE_NAME])) {
                return $package['dev-dependencies'][self::PACKAGE_NAME];
            }
        }

        return 'unknown';
    }
public static function getDecomposerVersion ( $ composerArray , $ packages ) { if ( isset ( $ composerArray [ 'require' ] [ self :: PACKAGE_NAME ] ) ) { return $ composerArray [ 'require' ] [ self :: PACKAGE_NAME ] ; } if ( isset ( $ composerArray [ 'require-dev' ] [ self :: PACKAGE_NAME ] ) ) { return $ composerArray [ 'require-dev' ] [ self :: PACKAGE_NAME ] ; } foreach ( $ packages as $ package ) { if ( isset ( $ package [ 'dependencies' ] [ self :: PACKAGE_NAME ] ) ) { return $ package [ 'dependencies' ] [ self :: PACKAGE_NAME ] ; } if ( isset ( $ package [ 'dev-dependencies' ] [ self :: PACKAGE_NAME ] ) ) { return $ package [ 'dev-dependencies' ] [ self :: PACKAGE_NAME ] ; } } return 'unknown' ; }
Get current installed Decomposer version

@param $composerArray
@param $packages
@return string
Get current installed Decomposer version