@@ -16,8 +16,8 @@ |
||
| 16 | 16 | use ComponentManager\VersionControl\Git\Command\Command; |
| 17 | 17 | use ComponentManager\VersionControl\Git\Command\FetchCommand; |
| 18 | 18 | use ComponentManager\VersionControl\Git\Command\InitCommand; |
| 19 | -use ComponentManager\VersionControl\Git\Command\RevParseCommand; |
|
| 20 | 19 | use ComponentManager\VersionControl\Git\Command\RemoteAddCommand; |
| 20 | +use ComponentManager\VersionControl\Git\Command\RevParseCommand; |
|
| 21 | 21 | use Symfony\Component\Process\Process; |
| 22 | 22 | use Symfony\Component\Process\ProcessBuilder; |
| 23 | 23 | |
@@ -58,7 +58,7 @@ |
||
| 58 | 58 | * |
| 59 | 59 | * @param string $gitExecutable |
| 60 | 60 | * @param string $directory |
| 61 | - * @param integer|null $timeout |
|
| 61 | + * @param integer $timeout |
|
| 62 | 62 | */ |
| 63 | 63 | public function __construct($gitExecutable, $directory, $timeout=60) { |
| 64 | 64 | $this->gitExecutable = $gitExecutable; |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | * @param string $directory |
| 61 | 61 | * @param integer|null $timeout |
| 62 | 62 | */ |
| 63 | - public function __construct($gitExecutable, $directory, $timeout=60) { |
|
| 63 | + public function __construct($gitExecutable, $directory, $timeout = 60) { |
|
| 64 | 64 | $this->gitExecutable = $gitExecutable; |
| 65 | 65 | $this->timeout = $timeout; |
| 66 | 66 | |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | * |
| 96 | 96 | * @throws VersionControlException |
| 97 | 97 | */ |
| 98 | - public function runCommand(Command $command, $exceptionCode=null) { |
|
| 98 | + public function runCommand(Command $command, $exceptionCode = null) { |
|
| 99 | 99 | $process = $this->createProcess($command->getCommandLine()); |
| 100 | 100 | $process->run(); |
| 101 | 101 | |
@@ -169,7 +169,7 @@ discard block |
||
| 169 | 169 | * |
| 170 | 170 | * @codeCoverageIgnore |
| 171 | 171 | */ |
| 172 | - public function fetch($remote=null) { |
|
| 172 | + public function fetch($remote = null) { |
|
| 173 | 173 | $command = new FetchCommand($remote); |
| 174 | 174 | return $this->runCommand( |
| 175 | 175 | $command, VersionControlException::CODE_FETCH_FAILED); |
@@ -186,7 +186,7 @@ discard block |
||
| 186 | 186 | * |
| 187 | 187 | * @codeCoverageIgnore |
| 188 | 188 | */ |
| 189 | - public function fetchTags($remote=null) { |
|
| 189 | + public function fetchTags($remote = null) { |
|
| 190 | 190 | $command = new FetchCommand($remote); |
| 191 | 191 | $command->setTags(true); |
| 192 | 192 | return $this->runCommand( |
@@ -33,7 +33,7 @@ |
||
| 33 | 33 | * |
| 34 | 34 | * @param string|null $remote |
| 35 | 35 | */ |
| 36 | - public function __construct($remote=null) { |
|
| 36 | + public function __construct($remote = null) { |
|
| 37 | 37 | $this->remote = $remote; |
| 38 | 38 | } |
| 39 | 39 | |
@@ -33,6 +33,7 @@ |
||
| 33 | 33 | * @param HttpClient $httpClient |
| 34 | 34 | * @param Platform $platform |
| 35 | 35 | * @param stdClass $options |
| 36 | + * @return void |
|
| 36 | 37 | */ |
| 37 | 38 | public function __construct(Filesystem $filesystem, HttpClient $httpClient, |
| 38 | 39 | Platform $platform, stdClass $options); |
@@ -17,8 +17,8 @@ |
||
| 17 | 17 | use ComponentManager\HttpClient; |
| 18 | 18 | use ComponentManager\Platform\Platform; |
| 19 | 19 | use Psr\Log\LoggerInterface; |
| 20 | -use stdClass; |
|
| 21 | 20 | use Symfony\Component\Filesystem\Filesystem; |
| 21 | +use stdClass; |
|
| 22 | 22 | |
| 23 | 23 | /** |
| 24 | 24 | * Package repository interface. |
@@ -63,7 +63,7 @@ |
||
| 63 | 63 | * @throws InvalidProjectException |
| 64 | 64 | */ |
| 65 | 65 | public function resolveComponent(ComponentSpecification $componentSpecification, |
| 66 | - LoggerInterface $logger); |
|
| 66 | + LoggerInterface $logger); |
|
| 67 | 67 | |
| 68 | 68 | /** |
| 69 | 69 | * Determine whether the version specification is satisfied by the given version. |
@@ -24,6 +24,7 @@ |
||
| 24 | 24 | * Initialiser. |
| 25 | 25 | * |
| 26 | 26 | * @param Filesystem $filesystem |
| 27 | + * @return void |
|
| 27 | 28 | */ |
| 28 | 29 | public function __construct(Filesystem $filesystem); |
| 29 | 30 | |
@@ -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 | |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | * |
| 138 | 138 | * @return Moodle |
| 139 | 139 | */ |
| 140 | - protected function getMoodle($moodleDirectory=null) { |
|
| 140 | + protected function getMoodle($moodleDirectory = null) { |
|
| 141 | 141 | if ($this->moodle === null) { |
| 142 | 142 | $moodleDirectory = ($moodleDirectory === null) |
| 143 | 143 | ? $this->platform->getWorkingDirectory() : $moodleDirectory; |
@@ -156,7 +156,7 @@ discard block |
||
| 156 | 156 | * |
| 157 | 157 | * @return Project |
| 158 | 158 | */ |
| 159 | - protected function getProject($projectFilename=null, $projectLockFilename=null) { |
|
| 159 | + protected function getProject($projectFilename = null, $projectLockFilename = null) { |
|
| 160 | 160 | $workingDirectory = $this->platform->getWorkingDirectory(); |
| 161 | 161 | |
| 162 | 162 | if ($this->project === null) { |
@@ -38,7 +38,7 @@ |
||
| 38 | 38 | const HELP = <<<HELP |
| 39 | 39 | Installs, into the Moodle installation in the present working directory, all of |
| 40 | 40 | the components listed in its componentmgr.json file. |
| 41 | -HELP; |
|
| 41 | +help; |
|
| 42 | 42 | |
| 43 | 43 | /** |
| 44 | 44 | * Initialiser. |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | * @param ComponentVersion[] $versions |
| 66 | 66 | * @param PackageRepository|null $packageRepository |
| 67 | 67 | */ |
| 68 | - public function __construct($name, $versions, $packageRepository=null) { |
|
| 68 | + public function __construct($name, $versions, $packageRepository = null) { |
|
| 69 | 69 | $this->name = $name; |
| 70 | 70 | $this->versions = $versions; |
| 71 | 71 | |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | * @return string |
| 127 | 127 | */ |
| 128 | 128 | public function getPluginType() { |
| 129 | - list($type, ) = $this->getNameParts(); |
|
| 129 | + list($type,) = $this->getNameParts(); |
|
| 130 | 130 | |
| 131 | 131 | return $type; |
| 132 | 132 | } |
@@ -84,7 +84,7 @@ |
||
| 84 | 84 | * @param integer $maturity |
| 85 | 85 | * @param ComponentSource[]|null $sources |
| 86 | 86 | */ |
| 87 | - public function __construct($version, $release, $maturity, $sources=null) { |
|
| 87 | + public function __construct($version, $release, $maturity, $sources = null) { |
|
| 88 | 88 | $this->version = $version; |
| 89 | 89 | $this->release = $release; |
| 90 | 90 | $this->maturity = $maturity; |