protected function readPackageJson($path)
    {
        $file = new JsonFile($path);
        $json = $file->read();
        if (!isset($json['name'])) {
            $json['name'] = 'merge-plugin/' .
                strtr($path, DIRECTORY_SEPARATOR, '-');
        }
        if (!isset($json['version'])) {
            $json['version'] = '1.0.0';
        }
        return $json;
    }
protected function readPackageJson($path)
    {
        $file = new JsonFile($path);
        $json = $file->read();
        if (!isset($json['name'])) {
            $json['name'] = 'merge-plugin/' .
                strtr($path, DIRECTORY_SEPARATOR, '-');
        }
        if (!isset($json['version'])) {
            $json['version'] = '1.0.0';
        }
        return $json;
    }
protected function readPackageJson ( $ path ) { $ file = new JsonFile ( $ path ) ; $ json = $ file -> read ( ) ; if ( ! isset ( $ json [ 'name' ] ) ) { $ json [ 'name' ] = 'merge-plugin/' . strtr ( $ path , DIRECTORY_SEPARATOR , '-' ) ; } if ( ! isset ( $ json [ 'version' ] ) ) { $ json [ 'version' ] = '1.0.0' ; } return $ json ; }
Read the contents of a composer.json style file into an array.

The package contents are fixed up to be usable to create a Package
object by providing dummy "name" and "version" values if they have not
been provided in the file. This is consistent with the default root
package loading behavior of Composer.

@param string $path
@return array
Read the contents of a composer . json style file into an array .