protected static function getComposerContentOfFile($resource, VcsDriverInterface $driver, $method)
    {
        try {
            $ref = new \ReflectionClass($driver);
            $meth = $ref->getMethod($method);
            $meth->setAccessible(true);
            $composer = $meth->invoke($driver, $resource);

            if ('getContents' !== $method) {
                $file = (array) JsonFile::parseJson((string) $composer, $resource);
                $composer = empty($file) || !\array_key_exists('data', $file)
                    ? false : $file['data'];
            }
        } catch (\Exception $e) {
            $composer = false;
        }

        return $composer;
    }
protected static function getComposerContentOfFile($resource, VcsDriverInterface $driver, $method)
    {
        try {
            $ref = new \ReflectionClass($driver);
            $meth = $ref->getMethod($method);
            $meth->setAccessible(true);
            $composer = $meth->invoke($driver, $resource);

            if ('getContents' !== $method) {
                $file = (array) JsonFile::parseJson((string) $composer, $resource);
                $composer = empty($file) || !\array_key_exists('data', $file)
                    ? false : $file['data'];
            }
        } catch (\Exception $e) {
            $composer = false;
        }

        return $composer;
    }
protected static function getComposerContentOfFile ( $ resource , VcsDriverInterface $ driver , $ method ) { try { $ ref = new \ ReflectionClass ( $ driver ) ; $ meth = $ ref -> getMethod ( $ method ) ; $ meth -> setAccessible ( true ) ; $ composer = $ meth -> invoke ( $ driver , $ resource ) ; if ( 'getContents' !== $ method ) { $ file = ( array ) JsonFile :: parseJson ( ( string ) $ composer , $ resource ) ; $ composer = empty ( $ file ) || ! \ array_key_exists ( 'data' , $ file ) ? false : $ file [ 'data' ] ; } } catch ( \ Exception $ e ) { $ composer = false ; } return $ composer ; }
Get the parsed content of composer.

@param string             $resource The resource
@param VcsDriverInterface $driver   The vcs driver
@param string             $method   The method for get content

@return false|string
Get the parsed content of composer .