@@ -118,7 +118,7 @@ |
||
| 118 | 118 | * |
| 119 | 119 | * @param string $property |
| 120 | 120 | * |
| 121 | - * @return mixed |
|
| 121 | + * @return string |
|
| 122 | 122 | * |
| 123 | 123 | * @throws \OutOfBoundsException |
| 124 | 124 | */ |
@@ -66,8 +66,8 @@ |
||
| 66 | 66 | * @param string $packageSource |
| 67 | 67 | * @param \stdClass $extra |
| 68 | 68 | */ |
| 69 | - public function __construct($name, $version, $packageRepository=null, |
|
| 70 | - $packageSource=null, stdClass $extra=null) { |
|
| 69 | + public function __construct($name, $version, $packageRepository = null, |
|
| 70 | + $packageSource = null, stdClass $extra = null) { |
|
| 71 | 71 | $this->name = $name; |
| 72 | 72 | $this->version = $version; |
| 73 | 73 | |
@@ -71,7 +71,7 @@ |
||
| 71 | 71 | * @param \ComponentManager\Project\ProjectLockFile $projectLockFile |
| 72 | 72 | * @param \ComponentManager\PackageRepository\PackageRepositoryFactory $packageRepositoryFactory |
| 73 | 73 | * @param \ComponentManager\PackageSource\PackageSourceFactory $packageSourceFactory |
| 74 | - * @param \ComponentManager\PackageSource\PackageFormatFactory $packageFormatFactory |
|
| 74 | + * @param PackageFormatFactory $packageFormatFactory |
|
| 75 | 75 | */ |
| 76 | 76 | public function __construct(ProjectFile $projectFile, |
| 77 | 77 | ProjectLockFile $projectLockFile, |
@@ -38,8 +38,6 @@ |
||
| 38 | 38 | /** |
| 39 | 39 | * Initialiser. |
| 40 | 40 | * |
| 41 | - * @param \ComponentManager\MoodleVersion $version |
|
| 42 | - * @param \Psr\Log\LoggerInterface $logger |
|
| 43 | 41 | * @param string $archive |
| 44 | 42 | * @param string $destination |
| 45 | 43 | */ |
@@ -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 | } |
@@ -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) [ |
@@ -328,7 +328,7 @@ |
||
| 328 | 328 | $client = new Client(); |
| 329 | 329 | $response = $client->get($uri, [ |
| 330 | 330 | 'headers' => [ |
| 331 | - 'Authorization' => "Basic {$this->options->authentication}", |
|
| 331 | + 'Authorization' => "basic {$this->options->authentication}", |
|
| 332 | 332 | ], |
| 333 | 333 | 'query' => $queryParams, |
| 334 | 334 | ]); |
@@ -271,7 +271,7 @@ discard block |
||
| 271 | 271 | */ |
| 272 | 272 | protected function getMetadataCacheFilename() { |
| 273 | 273 | $urlHash = parse_url($this->options->uri, PHP_URL_HOST) . '-' |
| 274 | - . $this->options->project; |
|
| 274 | + . $this->options->project; |
|
| 275 | 275 | |
| 276 | 276 | return $this->platform->joinPaths([ |
| 277 | 277 | parent::getMetadataCacheDirectory(), |
@@ -370,7 +370,7 @@ discard block |
||
| 370 | 370 | */ |
| 371 | 371 | protected function getProjectRepositoryListUrl() { |
| 372 | 372 | return sprintf(static::PROJECT_REPOSITORY_LIST_PATH, |
| 373 | - $this->options->project); |
|
| 373 | + $this->options->project); |
|
| 374 | 374 | } |
| 375 | 375 | |
| 376 | 376 | /** |
@@ -382,7 +382,7 @@ discard block |
||
| 382 | 382 | */ |
| 383 | 383 | protected function getRepositoryBranchesPath($componentName) { |
| 384 | 384 | return sprintf(static::REPOSITORY_BRANCHES_PATH, $this->options->project, |
| 385 | - $componentName); |
|
| 385 | + $componentName); |
|
| 386 | 386 | } |
| 387 | 387 | |
| 388 | 388 | /** |
@@ -394,6 +394,6 @@ discard block |
||
| 394 | 394 | */ |
| 395 | 395 | protected function getRepositoryTagsPath($componentName) { |
| 396 | 396 | return sprintf(static::REPOSITORY_TAGS_PATH, $this->options->project, |
| 397 | - $componentName); |
|
| 397 | + $componentName); |
|
| 398 | 398 | } |
| 399 | 399 | } |
@@ -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 | } |
@@ -44,9 +44,9 @@ |
||
| 44 | 44 | * @override \ComponentManager\PackageSource\PackageSource |
| 45 | 45 | */ |
| 46 | 46 | public function obtainPackage($tempDirectory, |
| 47 | - ResolvedComponentVersion $resolvedComponentVersion, |
|
| 48 | - Filesystem $filesystem, |
|
| 49 | - LoggerInterface $logger) { |
|
| 47 | + ResolvedComponentVersion $resolvedComponentVersion, |
|
| 48 | + Filesystem $filesystem, |
|
| 49 | + LoggerInterface $logger) { |
|
| 50 | 50 | $componentVersion = $resolvedComponentVersion->getVersion(); |
| 51 | 51 | |
| 52 | 52 | $sources = $componentVersion->getSources(); |
@@ -53,11 +53,11 @@ |
||
| 53 | 53 | $tempDirectory, |
| 54 | 54 | 'repo', |
| 55 | 55 | ]); |
| 56 | - $indexPath = $this->platform->joinPaths([ |
|
| 56 | + $indexPath = $this->platform->joinPaths([ |
|
| 57 | 57 | $tempDirectory, |
| 58 | 58 | 'index', |
| 59 | 59 | ]); |
| 60 | - $repositoryUri = $source->getRepositoryUri(); |
|
| 60 | + $repositoryUri = $source->getRepositoryUri(); |
|
| 61 | 61 | |
| 62 | 62 | $finalRef = $resolvedComponentVersion->getFinalVersion(); |
| 63 | 63 | $ref = $source->getRef(); |
@@ -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 | |