| @@ -31,9 +31,9 @@ discard block | ||
| 31 | 31 | class Packagist | 
| 32 | 32 |  { | 
| 33 | 33 | const API_URL = 'https://packagist.org'; | 
| 34 | - const API_URL_LIST = self::API_URL . '/packages/list.json'; | |
| 35 | - const API_URL_SEARCH = self::API_URL . '/search.json'; | |
| 36 | - const API_URL_PACKAGE = self::API_URL . '/packages/%s.json'; | |
| 34 | + const API_URL_LIST = self::API_URL.'/packages/list.json'; | |
| 35 | + const API_URL_SEARCH = self::API_URL.'/search.json'; | |
| 36 | + const API_URL_PACKAGE = self::API_URL.'/packages/%s.json'; | |
| 37 | 37 | const API_RESULT_PER_PAGE = 15; | 
| 38 | 38 | const SUPPORTED_PACKAGE_TYPES = [ | 
| 39 | 39 | 'symfony-bundle', | 
| @@ -75,18 +75,18 @@ discard block | ||
| 75 | 75 | throw new PackagistException(PackagistException::E_EMPTY_SEARCH_QUERY); | 
| 76 | 76 | } | 
| 77 | 77 | |
| 78 | - $attributes[] = 'q=' . urlencode($query); | |
| 78 | + $attributes[] = 'q='.urlencode($query); | |
| 79 | 79 | |
| 80 | 80 |          if (!empty($tag)) { | 
| 81 | - $attributes[] = 'tags=' . urlencode($tag); | |
| 81 | + $attributes[] = 'tags='.urlencode($tag); | |
| 82 | 82 | } | 
| 83 | 83 | |
| 84 | 84 |          if (!empty($type)) { | 
| 85 | 85 | $this->validatePackageType($type); | 
| 86 | - $attributes[] = 'type=' . urlencode($type); | |
| 86 | + $attributes[] = 'type='.urlencode($type); | |
| 87 | 87 | } | 
| 88 | 88 | |
| 89 | -        $request .= '?' . implode('&', $attributes); | |
| 89 | +        $request .= '?'.implode('&', $attributes); | |
| 90 | 90 | |
| 91 | 91 | $response = $this->apiProvider->getAPIResponse($request); | 
| 92 | 92 | $this->validateResponse($response, 'results'); | 
| @@ -105,7 +105,7 @@ discard block | ||
| 105 | 105 | |
| 106 | 106 |          do { | 
| 107 | 107 | ++$currentPage; | 
| 108 | - $response = $this->apiProvider->getAPIResponse($request . '&page=' . $currentPage); | |
| 108 | + $response = $this->apiProvider->getAPIResponse($request.'&page='.$currentPage); | |
| 109 | 109 | $this->validateResponse($response, 'results'); | 
| 110 | 110 | |
| 111 | 111 |              if ($response['total'] == 0) { | 
| @@ -123,7 +123,7 @@ discard block | ||
| 123 | 123 | * @param \ArrayObject $searchResultObject | 
| 124 | 124 | * @param array $searchResult | 
| 125 | 125 | */ | 
| 126 | - private function fillSearchResultObject(\ArrayObject &$searchResultObject, array $searchResult) | |
| 126 | + private function fillSearchResultObject(\ArrayObject & $searchResultObject, array $searchResult) | |
| 127 | 127 |      { | 
| 128 | 128 |          if (!empty($searchResult)) { | 
| 129 | 129 |              foreach ($searchResult as $item) { | 
| @@ -154,14 +154,14 @@ discard block | ||
| 154 | 154 | $request = self::API_URL_LIST; | 
| 155 | 155 | $attributes = []; | 
| 156 | 156 |          if (!empty($vendor)) { | 
| 157 | - $attributes[] = 'vendor=' . urlencode($vendor); | |
| 157 | + $attributes[] = 'vendor='.urlencode($vendor); | |
| 158 | 158 | } | 
| 159 | 159 |          if (!empty($type)) { | 
| 160 | 160 | $this->validatePackageType($type); | 
| 161 | - $attributes[] = 'type=' . urlencode($type); | |
| 161 | + $attributes[] = 'type='.urlencode($type); | |
| 162 | 162 | } | 
| 163 | 163 |          if (!empty($attributes)) { | 
| 164 | -            $request .= '?' . implode('&', $attributes); | |
| 164 | +            $request .= '?'.implode('&', $attributes); | |
| 165 | 165 | } | 
| 166 | 166 | $response = $this->apiProvider->getAPIResponse($request); | 
| 167 | 167 | $this->validateResponse($response, 'packageNames'); | 
| @@ -257,7 +257,7 @@ discard block | ||
| 257 | 257 | * @param Package $package | 
| 258 | 258 | * @param array $packageArray | 
| 259 | 259 | */ | 
| 260 | - private function addPackageVersions(Package &$package, array $packageArray) | |
| 260 | + private function addPackageVersions(Package & $package, array $packageArray) | |
| 261 | 261 |      { | 
| 262 | 262 |          if (!empty($packageArray['package']['versions'])) { | 
| 263 | 263 |              foreach ($packageArray['package']['versions'] as $version) { | 
| @@ -29,7 +29,7 @@ | ||
| 29 | 29 | */ | 
| 30 | 30 | public function load(array $configs, ContainerBuilder $container) | 
| 31 | 31 |      { | 
| 32 | - $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); | |
| 32 | + $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); | |
| 33 | 33 |          $loader->load('services.yml'); | 
| 34 | 34 | } | 
| 35 | 35 | } |