Passed
Push — master ( 054f60...db06ef )
by Luke
05:01 queued 02:43
created
lib/ComponentManager/Command/InstallCommand.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
      */
36 36
     const HELP = <<<HELP
37 37
 Installs, into the Moodle installation in the present working directory, all of the components listed in its componentmgr.json file.
38
-HELP;
38
+help;
39 39
 
40 40
     /**
41 41
      * Initialiser.
Please login to merge, or discard this patch.
lib/ComponentManager/PackageRepository/PackageRepository.php 2 patches
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -31,6 +31,7 @@
 block discarded – undo
31 31
      * @param HttpClient                               $httpClient
32 32
      * @param \ComponentManager\Platform\Platform      $platform
33 33
      * @param \stdClass                                $options
34
+     * @return void
34 35
      */
35 36
     public function __construct(Filesystem $filesystem, HttpClient $httpClient,
36 37
                                 Platform $platform, stdClass $options);
Please login to merge, or discard this patch.
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,8 +14,8 @@
 block discarded – undo
14 14
 use ComponentManager\ComponentVersion;
15 15
 use ComponentManager\HttpClient;
16 16
 use ComponentManager\Platform\Platform;
17
-use stdClass;
18 17
 use Symfony\Component\Filesystem\Filesystem;
18
+use stdClass;
19 19
 
20 20
 /**
21 21
  * Package repository interface.
Please login to merge, or discard this patch.
lib/ComponentManager/HttpClient.php 2 patches
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.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -78,8 +78,8 @@
 block discarded – undo
78 78
      *
79 79
      * @return RequestInterface
80 80
      */
81
-    public function createRequest($method, $uri, $headers=[], $body=null,
82
-                                  $protocolVersion='1.1') {
81
+    public function createRequest($method, $uri, $headers = [], $body = null,
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.
lib/ComponentManager/VersionControl/Git/GitVersionControl.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
      *
86 86
      * @throws VersionControlException
87 87
      */
88
-    public function runCommand(Command $command, $exceptionCode=null) {
88
+    public function runCommand(Command $command, $exceptionCode = null) {
89 89
         $process = $this->createProcess($command->getCommandLine());
90 90
         $process->run();
91 91
 
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
      *
160 160
      * @codeCoverageIgnore
161 161
      */
162
-    public function fetch($remote=null) {
162
+    public function fetch($remote = null) {
163 163
         $command = new FetchCommand($remote);
164 164
         return $this->runCommand(
165 165
                 $command, VersionControlException::CODE_FETCH_FAILED);
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
      *
177 177
      * @codeCoverageIgnore
178 178
      */
179
-    public function fetchTags($remote=null) {
179
+    public function fetchTags($remote = null) {
180 180
         $command = new FetchCommand($remote);
181 181
         $command->setTags(true);
182 182
         return $this->runCommand(
Please login to merge, or discard this patch.
lib/ComponentManager/VersionControl/Git/Command/FetchCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.