Passed
Push — master ( 95d224...68f44f )
by Luke
02:40
created
lib/ComponentManager/Command/ProjectAwareCommand.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
      *
137 137
      * @return \ComponentManager\Moodle
138 138
      */
139
-    protected function getMoodle($moodleDirectory=null) {
139
+    protected function getMoodle($moodleDirectory = null) {
140 140
         if ($this->moodle === null) {
141 141
             $moodleDirectory = ($moodleDirectory === null)
142 142
                     ? $this->platform->getWorkingDirectory() : $moodleDirectory;
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
      *
156 156
      * @return \ComponentManager\Project\Project
157 157
      */
158
-    protected function getProject($projectFilename=null, $projectLockFilename=null) {
158
+    protected function getProject($projectFilename = null, $projectLockFilename = null) {
159 159
         $workingDirectory = $this->platform->getWorkingDirectory();
160 160
 
161 161
         if ($this->project === null) {
Please login to merge, or discard this patch.
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   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -18,33 +18,33 @@
 block discarded – undo
18 18
  * @coversDefaultClass \ComponentManager\Component
19 19
  */
20 20
 class ComponentTest extends TestCase {
21
-   public function testGetNameParts() {
22
-       $component = new Component('type_name', []);
23
-       $this->assertEquals(['type', 'name'], $component->getNameParts());
24
-       $this->assertEquals('type', $component->getPluginType());
25
-       $this->assertEquals('name', $component->getPluginName());
26
-   }
21
+    public function testGetNameParts() {
22
+        $component = new Component('type_name', []);
23
+        $this->assertEquals(['type', 'name'], $component->getNameParts());
24
+        $this->assertEquals('type', $component->getPluginType());
25
+        $this->assertEquals('name', $component->getPluginName());
26
+    }
27 27
 
28
-   public function testGetVersion() {
29
-       $goodPackageRepository = $this->createMock(PackageRepository::class);
30
-       $goodPackageRepository->method('satisfiesVersion')
31
-           ->willReturn(true);
32
-       $badPackageRepository = $this->createMock(PackageRepository::class);
33
-       $badPackageRepository->method('satisfiesVersion')
34
-           ->willReturn(false);
28
+    public function testGetVersion() {
29
+        $goodPackageRepository = $this->createMock(PackageRepository::class);
30
+        $goodPackageRepository->method('satisfiesVersion')
31
+            ->willReturn(true);
32
+        $badPackageRepository = $this->createMock(PackageRepository::class);
33
+        $badPackageRepository->method('satisfiesVersion')
34
+            ->willReturn(false);
35 35
 
36
-       $componentVersion = new ComponentVersion(
36
+        $componentVersion = new ComponentVersion(
37 37
             '2015021800', 'Genesis', ComponentVersion::MATURITY_STABLE, []);
38 38
 
39
-       $component = new Component(
39
+        $component = new Component(
40 40
             'type_name', [$componentVersion], $goodPackageRepository);
41
-       $this->assertEquals(
41
+        $this->assertEquals(
42 42
             $componentVersion, $component->getVersion('2015021800'));
43 43
 
44
-       $this->expectException(UnsatisfiedVersionException::class);
45
-       $this->expectExceptionCode(UnsatisfiedVersionException::CODE_UNKNOWN_VERSION);
46
-       $component = new Component(
44
+        $this->expectException(UnsatisfiedVersionException::class);
45
+        $this->expectExceptionCode(UnsatisfiedVersionException::CODE_UNKNOWN_VERSION);
46
+        $component = new Component(
47 47
             'type_name', [$componentVersion], $badPackageRepository);
48
-       $component->getVersion('2015021800');
49
-   }
48
+        $component->getVersion('2015021800');
49
+    }
50 50
 }
Please login to merge, or discard this patch.