Completed
Branch develop (e3b860)
by Luke
13:48
created
lib/ComponentManager/Component.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
lib/ComponentManager/PackageRepository/StashPackageRepository.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -322,7 +322,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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) [
Please login to merge, or discard this patch.
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
lib/ComponentManager/ComponentVersion.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
lib/ComponentManager/PackageSource/PackageSource.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
lib/ComponentManager/PackageSource/ZipPackageSource.php 1 patch
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -80,9 +80,9 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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",
Please login to merge, or discard this patch.
lib/ComponentManager/PackageSource/DirectoryPackageSource.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -39,9 +39,9 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
lib/ComponentManager/MoodleInstallation.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@
 block discarded – undo
77 77
             }
78 78
 
79 79
             $path = $this->rootDirectory . PlatformUtil::directorySeparator()
80
-                  . static::CONFIG_FILENAME;
80
+                    . static::CONFIG_FILENAME;
81 81
             if (is_file($path)) {
82 82
                 require_once $path;
83 83
 
Please login to merge, or discard this patch.
lib/ComponentManager/Command/MoodleCommand.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -45,8 +45,8 @@
 block discarded – undo
45 45
             ->setHelp(static::HELP)
46 46
             ->setDefinition(new InputDefinition([
47 47
                 new InputArgument(Argument::ARGUMENT_ACTION,
48
-                                  InputArgument::REQUIRED,
49
-                                  Argument::ARGUMENT_ACTION_HELP),
48
+                                    InputArgument::REQUIRED,
49
+                                    Argument::ARGUMENT_ACTION_HELP),
50 50
                 new InputOption(Argument::ARGUMENT_MOODLE_DIR, null,
51 51
                                 InputOption::VALUE_REQUIRED,
52 52
                                 Argument::ARGUMENT_MOODLE_DIR_HELP),
Please login to merge, or discard this patch.
lib/ComponentManager/Command/PackageCommand.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -62,12 +62,12 @@
 block discarded – undo
62 62
 
63 63
         $tempDirectory       = PlatformUtil::createTempDirectory();
64 64
         $archive             = $tempDirectory
65
-                             . PlatformUtil::directorySeparator()
66
-                             . 'moodle.zip';
65
+                                . PlatformUtil::directorySeparator()
66
+                                . 'moodle.zip';
67 67
         $destination         = $tempDirectory
68
-                             . PlatformUtil::directorySeparator() . 'moodle';
68
+                                . PlatformUtil::directorySeparator() . 'moodle';
69 69
         $projectLockFilename = $destination . PlatformUtil::directorySeparator()
70
-                             . 'componentmgr.lock.json';
70
+                                . 'componentmgr.lock.json';
71 71
 
72 72
         /** @var \Symfony\Component\Filesystem\Filesystem $filesystem */
73 73
         $filesystem = $this->container->get('filesystem');
Please login to merge, or discard this patch.