Passed
Push — scrutinizer ( 9aa1f1...30af4f )
by Luke
02:29
created
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/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/RunScriptCommand.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,8 +44,8 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
lib/ComponentManager/Exception/AbstractException.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,8 +32,8 @@
 block discarded – undo
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
     /**
Please login to merge, or discard this patch.
lib/ComponentManager/PackageRepository/StashPackageRepository.php 1 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/PackageRepository/GithubPackageRepository.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@
 block discarded – undo
94 94
         }
95 95
 
96 96
         return new Component($componentSpecification->getName(), $versions,
97
-                             $this);
97
+                                $this);
98 98
     }
99 99
 
100 100
     /**
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
@@ -103,12 +103,12 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.
lib/ComponentManager/HttpClient.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@
 block discarded – undo
79 79
      * @return RequestInterface
80 80
      */
81 81
     public function createRequest($method, $uri, $headers=[], $body=null,
82
-                                  $protocolVersion='1.1') {
82
+                                    $protocolVersion='1.1') {
83 83
         return $this->messageFactory->createRequest(
84 84
                 $method, $uri, $headers, $body, $protocolVersion);
85 85
     }
Please login to merge, or discard this patch.
test/unit/ComponentTest.php 1 patch
Indentation   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -20,33 +20,33 @@
 block discarded – undo
20 20
  * @coversDefaultClass \ComponentManager\Component
21 21
  */
22 22
 class ComponentTest extends TestCase {
23
-   public function testGetNameParts() {
24
-       $component = new Component('type_name', []);
25
-       $this->assertEquals(['type', 'name'], $component->getNameParts());
26
-       $this->assertEquals('type', $component->getPluginType());
27
-       $this->assertEquals('name', $component->getPluginName());
28
-   }
29
-
30
-   public function testGetVersion() {
31
-       $goodPackageRepository = $this->createMock(PackageRepository::class);
32
-       $goodPackageRepository->method('satisfiesVersion')
33
-           ->willReturn(true);
34
-       $badPackageRepository = $this->createMock(PackageRepository::class);
35
-       $badPackageRepository->method('satisfiesVersion')
36
-           ->willReturn(false);
37
-
38
-       $componentVersion = new ComponentVersion(
23
+    public function testGetNameParts() {
24
+        $component = new Component('type_name', []);
25
+        $this->assertEquals(['type', 'name'], $component->getNameParts());
26
+        $this->assertEquals('type', $component->getPluginType());
27
+        $this->assertEquals('name', $component->getPluginName());
28
+    }
29
+
30
+    public function testGetVersion() {
31
+        $goodPackageRepository = $this->createMock(PackageRepository::class);
32
+        $goodPackageRepository->method('satisfiesVersion')
33
+            ->willReturn(true);
34
+        $badPackageRepository = $this->createMock(PackageRepository::class);
35
+        $badPackageRepository->method('satisfiesVersion')
36
+            ->willReturn(false);
37
+
38
+        $componentVersion = new ComponentVersion(
39 39
             '2015021800', 'Genesis', ComponentVersion::MATURITY_STABLE, []);
40 40
 
41
-       $component = new Component(
41
+        $component = new Component(
42 42
             'type_name', [$componentVersion], $goodPackageRepository);
43
-       $this->assertEquals(
43
+        $this->assertEquals(
44 44
             $componentVersion, $component->getVersion('2015021800'));
45 45
 
46
-       $this->expectException(UnsatisfiedVersionException::class);
47
-       $this->expectExceptionCode(UnsatisfiedVersionException::CODE_UNKNOWN_VERSION);
48
-       $component = new Component(
46
+        $this->expectException(UnsatisfiedVersionException::class);
47
+        $this->expectExceptionCode(UnsatisfiedVersionException::CODE_UNKNOWN_VERSION);
48
+        $component = new Component(
49 49
             'type_name', [$componentVersion], $badPackageRepository);
50
-       $component->getVersion('2015021800');
51
-   }
50
+        $component->getVersion('2015021800');
51
+    }
52 52
 }
Please login to merge, or discard this patch.