protected function composer($key = null)
    {
        if (! $this->composerJson) {
            $composerFile = $this->realPath().'/composer.json';
            if (! file_exists($composerFile)) {
                return null;
            }
            $this->composerJson = json_decode(file_get_contents($composerFile), true);
        }

        return $key ? array_get($this->composerJson, $key) : $this->composerJson;
    }
protected function composer($key = null)
    {
        if (! $this->composerJson) {
            $composerFile = $this->realPath().'/composer.json';
            if (! file_exists($composerFile)) {
                return null;
            }
            $this->composerJson = json_decode(file_get_contents($composerFile), true);
        }

        return $key ? array_get($this->composerJson, $key) : $this->composerJson;
    }
protected function composer ( $ key = null ) { if ( ! $ this -> composerJson ) { $ composerFile = $ this -> realPath ( ) . '/composer.json' ; if ( ! file_exists ( $ composerFile ) ) { return null ; } $ this -> composerJson = json_decode ( file_get_contents ( $ composerFile ) , true ) ; } return $ key ? array_get ( $ this -> composerJson , $ key ) : $ this -> composerJson ; }
Load composer config from addon path

@param null $key
@return array|string
Load composer config from addon path