protected function getPackagesData($packageKey = null) { $this->initialize(); if ($packageKey === null) { return $this->packagesData; } if (!isset($this->packagesData[$packageKey])) { throw new \InvalidArgumentException(sprintf('Package "%s" was not found', $packageKey), 1421667044); } return array($packageKey => $this->packagesData[$packageKey]); }