public static function convert(array $json)
    {
        $loader  = new ArrayLoader;
        $package = $loader->load($json);


        if ($package instanceof CompletePackage) {
            return $package;
        }

        // @codeCoverageIgnoreStart
        throw new InvalidPackageException(
            'Expected instance of CompletePackage, got '.get_class($package)
        );
        // @codeCoverageIgnoreEnd
    }
public static function convert(array $json)
    {
        $loader  = new ArrayLoader;
        $package = $loader->load($json);


        if ($package instanceof CompletePackage) {
            return $package;
        }

        // @codeCoverageIgnoreStart
        throw new InvalidPackageException(
            'Expected instance of CompletePackage, got '.get_class($package)
        );
        // @codeCoverageIgnoreEnd
    }
public static function convert ( array $ json ) { $ loader = new ArrayLoader ; $ package = $ loader -> load ( $ json ) ; if ( $ package instanceof CompletePackage ) { return $ package ; } // @codeCoverageIgnoreStart throw new InvalidPackageException ( 'Expected instance of CompletePackage, got ' . get_class ( $ package ) ) ; // @codeCoverageIgnoreEnd }
Convert json to Package.

@param  array  $json

@return \Composer\Package\CompletePackage

@throws \Arcanedev\Composer\Exceptions\InvalidPackageException
Convert json to Package .