public static function version($name)
    {
        $file = INPHINIT_ROOT . 'composer.lock';
        $data = is_file($file) ? json_decode(file_get_contents($file)) : false;

        if (empty($data->packages)) {
            return false;
        }

        $version = false;

        foreach ($data->packages as $package) {
            if ($package->name === $name) {
                $version = $package->version;
                break;
            }
        }

        $data = null;

        return $version;
    }
public static function version($name)
    {
        $file = INPHINIT_ROOT . 'composer.lock';
        $data = is_file($file) ? json_decode(file_get_contents($file)) : false;

        if (empty($data->packages)) {
            return false;
        }

        $version = false;

        foreach ($data->packages as $package) {
            if ($package->name === $name) {
                $version = $package->version;
                break;
            }
        }

        $data = null;

        return $version;
    }
public static function version ( $ name ) { $ file = INPHINIT_ROOT . 'composer.lock' ; $ data = is_file ( $ file ) ? json_decode ( file_get_contents ( $ file ) ) : false ; if ( empty ( $ data -> packages ) ) { return false ; } $ version = false ; foreach ( $ data -> packages as $ package ) { if ( $ package -> name === $ name ) { $ version = $ package -> version ; break ; } } $ data = null ; return $ version ; }
Get package version from composer.lock file

@param string $name set package for detect version
@return bool|string
Get package version from composer . lock file