@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | * @param \ComponentManager\ComponentVersion[] $versions |
| 64 | 64 | * @param \ComponentManager\PackageRepository\PackageRepository $packageRepository |
| 65 | 65 | */ |
| 66 | - public function __construct($name, $versions, $packageRepository=null) { |
|
| 66 | + public function __construct($name, $versions, $packageRepository = null) { |
|
| 67 | 67 | $this->name = $name; |
| 68 | 68 | $this->versions = $versions; |
| 69 | 69 | |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | * @return string |
| 121 | 121 | */ |
| 122 | 122 | public function getPluginType() { |
| 123 | - list($type, ) = $this->getNameParts(); |
|
| 123 | + list($type,) = $this->getNameParts(); |
|
| 124 | 124 | |
| 125 | 125 | return $type; |
| 126 | 126 | } |
@@ -69,9 +69,9 @@ |
||
| 69 | 69 | */ |
| 70 | 70 | protected function getMetadataCacheFilename() { |
| 71 | 71 | return sprintf(static::METADATA_CACHE_FILENAME, |
| 72 | - $this->cacheDirectory, |
|
| 73 | - PlatformUtil::directorySeparator(), |
|
| 74 | - PlatformUtil::directorySeparator()); |
|
| 72 | + $this->cacheDirectory, |
|
| 73 | + PlatformUtil::directorySeparator(), |
|
| 74 | + PlatformUtil::directorySeparator()); |
|
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | /** |
@@ -272,13 +272,13 @@ discard block |
||
| 272 | 272 | */ |
| 273 | 273 | protected function getMetadataCacheFilename() { |
| 274 | 274 | $urlHash = parse_url($this->options->uri, PHP_URL_HOST) . '-' |
| 275 | - . $this->options->project; |
|
| 275 | + . $this->options->project; |
|
| 276 | 276 | |
| 277 | 277 | return sprintf(static::METADATA_CACHE_FILENAME, |
| 278 | - $this->cacheDirectory, |
|
| 279 | - PlatformUtil::directorySeparator(), |
|
| 280 | - PlatformUtil::directorySeparator(), |
|
| 281 | - $urlHash); |
|
| 278 | + $this->cacheDirectory, |
|
| 279 | + PlatformUtil::directorySeparator(), |
|
| 280 | + PlatformUtil::directorySeparator(), |
|
| 281 | + $urlHash); |
|
| 282 | 282 | } |
| 283 | 283 | |
| 284 | 284 | /** |
@@ -372,7 +372,7 @@ discard block |
||
| 372 | 372 | */ |
| 373 | 373 | protected function getProjectRepositoryListUrl() { |
| 374 | 374 | return sprintf(static::PROJECT_REPOSITORY_LIST_PATH, |
| 375 | - $this->options->project); |
|
| 375 | + $this->options->project); |
|
| 376 | 376 | } |
| 377 | 377 | |
| 378 | 378 | /** |
@@ -384,7 +384,7 @@ discard block |
||
| 384 | 384 | */ |
| 385 | 385 | protected function getRepositoryBranchesPath($componentName) { |
| 386 | 386 | return sprintf(static::REPOSITORY_BRANCHES_PATH, $this->options->project, |
| 387 | - $componentName); |
|
| 387 | + $componentName); |
|
| 388 | 388 | } |
| 389 | 389 | |
| 390 | 390 | /** |
@@ -396,6 +396,6 @@ discard block |
||
| 396 | 396 | */ |
| 397 | 397 | protected function getRepositoryTagsPath($componentName) { |
| 398 | 398 | return sprintf(static::REPOSITORY_TAGS_PATH, $this->options->project, |
| 399 | - $componentName); |
|
| 399 | + $componentName); |
|
| 400 | 400 | } |
| 401 | 401 | } |
@@ -322,7 +322,7 @@ discard block |
||
| 322 | 322 | * |
| 323 | 323 | * @return mixed The JSON-decoded representation of the response body. |
| 324 | 324 | */ |
| 325 | - protected function get($path, array $queryParams=[]) { |
|
| 325 | + protected function get($path, array $queryParams = []) { |
|
| 326 | 326 | $uri = $this->options->uri . $path; |
| 327 | 327 | |
| 328 | 328 | $client = new Client(); |
@@ -344,7 +344,7 @@ discard block |
||
| 344 | 344 | * |
| 345 | 345 | * @return mixed The value attribute of the JSON-decoded response body. |
| 346 | 346 | */ |
| 347 | - protected function getAllPages($path, array $queryParams=[]) { |
|
| 347 | + protected function getAllPages($path, array $queryParams = []) { |
|
| 348 | 348 | $values = []; |
| 349 | 349 | |
| 350 | 350 | $responseBody = (object) [ |
@@ -61,6 +61,6 @@ |
||
| 61 | 61 | $className = sprintf(self::CLASS_NAME_FORMAT, $id); |
| 62 | 62 | |
| 63 | 63 | return new $className($this->filesystem, $this->cacheDirectory, |
| 64 | - $options); |
|
| 64 | + $options); |
|
| 65 | 65 | } |
| 66 | 66 | } |
@@ -62,8 +62,8 @@ discard block |
||
| 62 | 62 | */ |
| 63 | 63 | protected function getMetadataCacheDirectory() { |
| 64 | 64 | return sprintf(static::CACHE_DIRECTORY, |
| 65 | - $this->cacheDirectory, |
|
| 66 | - PlatformUtil::directorySeparator()); |
|
| 65 | + $this->cacheDirectory, |
|
| 66 | + PlatformUtil::directorySeparator()); |
|
| 67 | 67 | } |
| 68 | 68 | |
| 69 | 69 | /** |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | } |
| 107 | 107 | |
| 108 | 108 | return new Component($componentSpecification->getName(), $versions, |
| 109 | - $this); |
|
| 109 | + $this); |
|
| 110 | 110 | } |
| 111 | 111 | |
| 112 | 112 | /** |
@@ -83,7 +83,7 @@ |
||
| 83 | 83 | * @param integer $maturity |
| 84 | 84 | * @param \ComponentManager\ComponentSource\ComponentSource[] $sources |
| 85 | 85 | */ |
| 86 | - public function __construct($version, $release, $maturity, $sources=null) { |
|
| 86 | + public function __construct($version, $release, $maturity, $sources = null) { |
|
| 87 | 87 | $this->version = $version; |
| 88 | 88 | $this->release = $release; |
| 89 | 89 | $this->maturity = $maturity; |
@@ -56,7 +56,7 @@ |
||
| 56 | 56 | * @return string The path to the module's root directory. |
| 57 | 57 | */ |
| 58 | 58 | public function obtainPackage($tempDirectory, |
| 59 | - ResolvedComponentVersion $resolvedComponentVersion, |
|
| 60 | - Filesystem $filesystem, |
|
| 61 | - LoggerInterface $logger); |
|
| 59 | + ResolvedComponentVersion $resolvedComponentVersion, |
|
| 60 | + Filesystem $filesystem, |
|
| 61 | + LoggerInterface $logger); |
|
| 62 | 62 | } |
@@ -80,9 +80,9 @@ discard block |
||
| 80 | 80 | * @return string |
| 81 | 81 | */ |
| 82 | 82 | protected function getArchiveFilename(Component $component, |
| 83 | - ComponentVersion $version) { |
|
| 83 | + ComponentVersion $version) { |
|
| 84 | 84 | return sprintf(static::ARCHIVE_FILENAME_FORMAT, $component->getName(), |
| 85 | - $version->getVersion()); |
|
| 85 | + $version->getVersion()); |
|
| 86 | 86 | } |
| 87 | 87 | |
| 88 | 88 | /** |
@@ -94,18 +94,18 @@ discard block |
||
| 94 | 94 | * @return string |
| 95 | 95 | */ |
| 96 | 96 | protected function getTargetDirectory(Component $component, |
| 97 | - ComponentVersion $version) { |
|
| 97 | + ComponentVersion $version) { |
|
| 98 | 98 | return sprintf(static::TARGET_DIRECTORY_FORMAT, $component->getName(), |
| 99 | - $version->getVersion()); |
|
| 99 | + $version->getVersion()); |
|
| 100 | 100 | } |
| 101 | 101 | |
| 102 | 102 | /** |
| 103 | 103 | * @override \ComponentManager\PackageSource\PackageSource |
| 104 | 104 | */ |
| 105 | 105 | public function obtainPackage($tempDirectory, |
| 106 | - ResolvedComponentVersion $resolvedComponentVersion, |
|
| 107 | - Filesystem $filesystem, |
|
| 108 | - LoggerInterface $logger) { |
|
| 106 | + ResolvedComponentVersion $resolvedComponentVersion, |
|
| 107 | + Filesystem $filesystem, |
|
| 108 | + LoggerInterface $logger) { |
|
| 109 | 109 | $component = $resolvedComponentVersion->getComponent(); |
| 110 | 110 | $version = $resolvedComponentVersion->getVersion(); |
| 111 | 111 | $sources = $version->getSources(); |
@@ -171,14 +171,14 @@ discard block |
||
| 171 | 171 | * @throws InstallationFailureException |
| 172 | 172 | */ |
| 173 | 173 | protected function trySource($tempDirectory, LoggerInterface $logger, |
| 174 | - Component $component, ComponentVersion $version, |
|
| 175 | - ZipComponentSource $source) { |
|
| 174 | + Component $component, ComponentVersion $version, |
|
| 175 | + ZipComponentSource $source) { |
|
| 176 | 176 | $archiveFilename = $tempDirectory |
| 177 | - . PlatformUtil::directorySeparator() |
|
| 178 | - . $this->getArchiveFilename($component, $version); |
|
| 177 | + . PlatformUtil::directorySeparator() |
|
| 178 | + . $this->getArchiveFilename($component, $version); |
|
| 179 | 179 | $targetDirectory = $tempDirectory |
| 180 | - . PlatformUtil::directorySeparator() |
|
| 181 | - . $this->getTargetDirectory($component, $version); |
|
| 180 | + . PlatformUtil::directorySeparator() |
|
| 181 | + . $this->getTargetDirectory($component, $version); |
|
| 182 | 182 | |
| 183 | 183 | $logger->debug('Trying zip source', [ |
| 184 | 184 | 'archiveFilename' => $archiveFilename, |
@@ -212,8 +212,8 @@ discard block |
||
| 212 | 212 | } |
| 213 | 213 | |
| 214 | 214 | $moduleRootDirectory = $targetDirectory |
| 215 | - . PlatformUtil::directorySeparator() |
|
| 216 | - . $component->getPluginName(); |
|
| 215 | + . PlatformUtil::directorySeparator() |
|
| 216 | + . $component->getPluginName(); |
|
| 217 | 217 | if (!is_dir($moduleRootDirectory)) { |
| 218 | 218 | throw new InstallationFailureException( |
| 219 | 219 | "Module directory {$moduleRootDirectory} did not exist", |
@@ -39,9 +39,9 @@ |
||
| 39 | 39 | * @override \ComponentManager\PackageSource\PackageSource |
| 40 | 40 | */ |
| 41 | 41 | public function obtainPackage($tempDirectory, |
| 42 | - ResolvedComponentVersion $resolvedComponentVersion, |
|
| 43 | - Filesystem $filesystem, |
|
| 44 | - LoggerInterface $logger) { |
|
| 42 | + ResolvedComponentVersion $resolvedComponentVersion, |
|
| 43 | + Filesystem $filesystem, |
|
| 44 | + LoggerInterface $logger) { |
|
| 45 | 45 | $version = $resolvedComponentVersion->getVersion(); |
| 46 | 46 | $sources = $version->getSources(); |
| 47 | 47 | |