/** * @return Client */ private function getPackagist() { if (!$this->packagist) { $options = $this->getOptions(); $this->packagist = new Client(); $this->packagist->setPackagistUrl($options['packagist-url']); } return $this->packagist; }
/** * @return Client */ private static function getPackagist() { if (true === empty(self::$packagist) || false === self::$packagist instanceof Client) { $packagist = new Client(); $packagist->setPackagistUrl(ExtensionsManager::module()->packagistUrl); self::$packagist = $packagist; } return self::$packagist; }