protected function loadComposerJson()
    {
        $composerJsonPath = $this->getComposerJsonPath();

        if (! File::exists($composerJsonPath)) {
            throw new FileNotFoundException('composer.json does not exist');
        }

        $composerJsonContent = File::get($composerJsonPath);
        $composerJson = json_decode($composerJsonContent, true);

        if (! is_array($composerJson)) {
            throw new RuntimeException("Invalid composer.json file [$composerJsonPath]");
        }

        return $composerJson;
    }
protected function loadComposerJson()
    {
        $composerJsonPath = $this->getComposerJsonPath();

        if (! File::exists($composerJsonPath)) {
            throw new FileNotFoundException('composer.json does not exist');
        }

        $composerJsonContent = File::get($composerJsonPath);
        $composerJson = json_decode($composerJsonContent, true);

        if (! is_array($composerJson)) {
            throw new RuntimeException("Invalid composer.json file [$composerJsonPath]");
        }

        return $composerJson;
    }
protected function loadComposerJson ( ) { $ composerJsonPath = $ this -> getComposerJsonPath ( ) ; if ( ! File :: exists ( $ composerJsonPath ) ) { throw new FileNotFoundException ( 'composer.json does not exist' ) ; } $ composerJsonContent = File :: get ( $ composerJsonPath ) ; $ composerJson = json_decode ( $ composerJsonContent , true ) ; if ( ! is_array ( $ composerJson ) ) { throw new RuntimeException ( "Invalid composer.json file [$composerJsonPath]" ) ; } return $ composerJson ; }
Load and parse content of composer.json.

@return array

@throws FileNotFoundException
@throws RuntimeException
Load and parse content of composer . json .