@@ -44,8 +44,8 @@ |
||
| 44 | 44 | ->setHelp(static::HELP) |
| 45 | 45 | ->setDefinition(new InputDefinition([ |
| 46 | 46 | new InputArgument(Argument::ARGUMENT_SCRIPT, |
| 47 | - InputArgument::REQUIRED, |
|
| 48 | - Argument::ARGUMENT_SCRIPT_HELP), |
|
| 47 | + InputArgument::REQUIRED, |
|
| 48 | + Argument::ARGUMENT_SCRIPT_HELP), |
|
| 49 | 49 | ])); |
| 50 | 50 | } |
| 51 | 51 | |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | */ |
| 33 | 33 | const HELP = <<<HELP |
| 34 | 34 | Executes the specified script for a component. |
| 35 | -HELP; |
|
| 35 | +help; |
|
| 36 | 36 | |
| 37 | 37 | /** |
| 38 | 38 | * @override \Symfony\Component\Console\Command\Command |
@@ -33,7 +33,7 @@ |
||
| 33 | 33 | */ |
| 34 | 34 | const HELP = <<<HELP |
| 35 | 35 | Refreshes cached package repository meta for all caching package repositories. |
| 36 | -HELP; |
|
| 36 | +help; |
|
| 37 | 37 | |
| 38 | 38 | /** |
| 39 | 39 | * @override \Symfony\Component\Console\Command\Command |
@@ -100,7 +100,7 @@ |
||
| 100 | 100 | * |
| 101 | 101 | * @return void |
| 102 | 102 | */ |
| 103 | - public function fetch($remote, $withTags=true) { |
|
| 103 | + public function fetch($remote, $withTags = true) { |
|
| 104 | 104 | $process = $this->getProcess(['fetch', $remote]); |
| 105 | 105 | $process->run(); |
| 106 | 106 | |
@@ -32,8 +32,8 @@ |
||
| 32 | 32 | */ |
| 33 | 33 | public function __toString() { |
| 34 | 34 | return sprintf(static::MESSAGE_FORMAT, $this->getExceptionType(), |
| 35 | - $this->getExceptionCodeName(), $this->code, |
|
| 36 | - $this->message); |
|
| 35 | + $this->getExceptionCodeName(), $this->code, |
|
| 36 | + $this->message); |
|
| 37 | 37 | } |
| 38 | 38 | |
| 39 | 39 | /** |
@@ -29,6 +29,7 @@ |
||
| 29 | 29 | * @param \Symfony\Component\Filesystem\Filesystem $filesystem |
| 30 | 30 | * @param \ComponentManager\Platform\Platform $platform |
| 31 | 31 | * @param \stdClass $options |
| 32 | + * @return void |
|
| 32 | 33 | */ |
| 33 | 34 | public function __construct(Filesystem $filesystem, Platform $platform, |
| 34 | 35 | stdClass $options); |
@@ -13,8 +13,8 @@ |
||
| 13 | 13 | use ComponentManager\ComponentSpecification; |
| 14 | 14 | use ComponentManager\ComponentVersion; |
| 15 | 15 | use ComponentManager\Platform\Platform; |
| 16 | -use stdClass; |
|
| 17 | 16 | use Symfony\Component\Filesystem\Filesystem; |
| 17 | +use stdClass; |
|
| 18 | 18 | |
| 19 | 19 | /** |
| 20 | 20 | * Package repository interface. |
@@ -94,7 +94,7 @@ |
||
| 94 | 94 | } |
| 95 | 95 | |
| 96 | 96 | return new Component($componentSpecification->getName(), $versions, |
| 97 | - $this); |
|
| 97 | + $this); |
|
| 98 | 98 | } |
| 99 | 99 | |
| 100 | 100 | /** |
@@ -103,12 +103,12 @@ |
||
| 103 | 103 | |
| 104 | 104 | $tempDirectory = $this->platform->createTempDirectory(); |
| 105 | 105 | $archive = $tempDirectory |
| 106 | - . $this->platform->getDirectorySeparator() |
|
| 107 | - . 'moodle.zip'; |
|
| 106 | + . $this->platform->getDirectorySeparator() |
|
| 107 | + . 'moodle.zip'; |
|
| 108 | 108 | $destination = $tempDirectory |
| 109 | - . $this->platform->getDirectorySeparator() . 'moodle'; |
|
| 109 | + . $this->platform->getDirectorySeparator() . 'moodle'; |
|
| 110 | 110 | $projectLockFilename = $destination . $this->platform->getDirectorySeparator() |
| 111 | - . 'componentmgr.lock.json'; |
|
| 111 | + . 'componentmgr.lock.json'; |
|
| 112 | 112 | |
| 113 | 113 | $moodle = new Moodle($destination, $this->platform); |
| 114 | 114 | $project = $this->getProject($projectFilename, $projectLockFilename); |
@@ -39,7 +39,7 @@ |
||
| 39 | 39 | */ |
| 40 | 40 | const HELP = <<<HELP |
| 41 | 41 | Packages a Moodle site from a project file. |
| 42 | -HELP; |
|
| 42 | +help; |
|
| 43 | 43 | |
| 44 | 44 | /** |
| 45 | 45 | * Moodle.org plugin and update API. |
@@ -79,9 +79,9 @@ discard block |
||
| 79 | 79 | * @return string |
| 80 | 80 | */ |
| 81 | 81 | protected function getArchiveFilename(Component $component, |
| 82 | - ComponentVersion $version) { |
|
| 82 | + ComponentVersion $version) { |
|
| 83 | 83 | return sprintf(static::ARCHIVE_FILENAME_FORMAT, $component->getName(), |
| 84 | - $version->getVersion()); |
|
| 84 | + $version->getVersion()); |
|
| 85 | 85 | } |
| 86 | 86 | |
| 87 | 87 | /** |
@@ -93,18 +93,18 @@ discard block |
||
| 93 | 93 | * @return string |
| 94 | 94 | */ |
| 95 | 95 | protected function getTargetDirectory(Component $component, |
| 96 | - ComponentVersion $version) { |
|
| 96 | + ComponentVersion $version) { |
|
| 97 | 97 | return sprintf(static::TARGET_DIRECTORY_FORMAT, $component->getName(), |
| 98 | - $version->getVersion()); |
|
| 98 | + $version->getVersion()); |
|
| 99 | 99 | } |
| 100 | 100 | |
| 101 | 101 | /** |
| 102 | 102 | * @override \ComponentManager\PackageSource\PackageSource |
| 103 | 103 | */ |
| 104 | 104 | public function obtainPackage($tempDirectory, |
| 105 | - ResolvedComponentVersion $resolvedComponentVersion, |
|
| 106 | - Filesystem $filesystem, |
|
| 107 | - LoggerInterface $logger) { |
|
| 105 | + ResolvedComponentVersion $resolvedComponentVersion, |
|
| 106 | + Filesystem $filesystem, |
|
| 107 | + LoggerInterface $logger) { |
|
| 108 | 108 | $component = $resolvedComponentVersion->getComponent(); |
| 109 | 109 | $version = $resolvedComponentVersion->getVersion(); |
| 110 | 110 | $sources = $version->getSources(); |
@@ -170,8 +170,8 @@ discard block |
||
| 170 | 170 | * @throws InstallationFailureException |
| 171 | 171 | */ |
| 172 | 172 | protected function trySource($tempDirectory, LoggerInterface $logger, |
| 173 | - Component $component, ComponentVersion $version, |
|
| 174 | - ZipComponentSource $source) { |
|
| 173 | + Component $component, ComponentVersion $version, |
|
| 174 | + ZipComponentSource $source) { |
|
| 175 | 175 | $archiveFilename = $this->platform->joinPaths([ |
| 176 | 176 | $tempDirectory, |
| 177 | 177 | $this->getArchiveFilename($component, $version), |
@@ -53,7 +53,7 @@ |
||
| 53 | 53 | * @param string|null $tagName |
| 54 | 54 | * @param string|null $appId |
| 55 | 55 | */ |
| 56 | - public function __construct($tagName=null, $appId=null) { |
|
| 56 | + public function __construct($tagName = null, $appId = null) { |
|
| 57 | 57 | $this->tagName = ($tagName === null) ? 'console.command' : $tagName; |
| 58 | 58 | $this->appId = ($appId === null) ? 'console.application' : $appId; |
| 59 | 59 | } |