Completed
Pull Request — master (#924)
by Greg
03:26
created
tests/src/Traits/TestTasksTrait.php 1 patch
Doc Comments   +16 added lines patch added patch discarded remove patch
@@ -17,6 +17,9 @@  discard block
 block discarded – undo
17 17
     protected $capturedOutput;
18 18
     protected $logger;
19 19
 
20
+    /**
21
+     * @return \League\Container\ContainerInterface
22
+     */
20 23
     public function initTestTasksTrait($commandClass = null, $container = null, $input = null)
21 24
     {
22 25
         if (!$container) {
@@ -47,6 +50,9 @@  discard block
 block discarded – undo
47 50
         return $container;
48 51
     }
49 52
 
53
+    /**
54
+     * @return null|OutputInterface
55
+     */
50 56
     public function capturedOutputStream()
51 57
     {
52 58
         if (!$this->testPrinter) {
@@ -66,6 +72,9 @@  discard block
 block discarded – undo
66 72
         return $this->capturedOutput;
67 73
     }
68 74
 
75
+    /**
76
+     * @param string $value
77
+     */
69 78
     public function assertOutputContains($value)
70 79
     {
71 80
         $output = $this->accumulate();
@@ -73,6 +82,9 @@  discard block
 block discarded – undo
73 82
         $this->assertContains($value, $output);
74 83
     }
75 84
 
85
+    /**
86
+     * @param string $value
87
+     */
76 88
     public function assertOutputNotContains($value)
77 89
     {
78 90
         $output = $this->accumulate();
@@ -80,6 +92,9 @@  discard block
 block discarded – undo
80 92
         $this->assertNotContains($value, $output);
81 93
     }
82 94
 
95
+    /**
96
+     * @param string $value
97
+     */
83 98
     public function assertOutputEquals($value)
84 99
     {
85 100
         $output = $this->accumulate();
@@ -90,6 +105,7 @@  discard block
 block discarded – undo
90 105
     /**
91 106
      * Make our output comparisons more platform-agnostic by converting
92 107
      * CRLF (Windows) or raw CR (confused output) to a LF (unix/Mac).
108
+     * @param string $output
93 109
      */
94 110
     protected function simplify($output)
95 111
     {
Please login to merge, or discard this patch.
tests/src/Fixtures.php 3 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
      */
47 47
     public function mktmpdir($basedir = false)
48 48
     {
49
-        $tempfile = tempnam($basedir ?: $this->testDir ?: sys_get_temp_dir(),'robo-tests');
49
+        $tempfile = tempnam($basedir ?: $this->testDir ?: sys_get_temp_dir(), 'robo-tests');
50 50
         unlink($tempfile);
51 51
         mkdir($tempfile);
52 52
         $this->tmpDirs[] = $tempfile;
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,8 +27,7 @@
 block discarded – undo
27 27
         foreach ($this->tmpDirs as $tmpDir) {
28 28
             try {
29 29
                 $fs->remove($tmpDir);
30
-            }
31
-            catch (\Exception $e) {
30
+            } catch (\Exception $e) {
32 31
                 // Ignore problems with removing fixtures.
33 32
             }
34 33
         }
Please login to merge, or discard this patch.
Doc Comments   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
      * Create a new temporary directory.
40 40
      *
41 41
      * @param string|bool $basedir Where to store the temporary directory
42
-     * @return type
42
+     * @return string
43 43
      */
44 44
     public function mktmpdir($basedir = false)
45 45
     {
@@ -61,6 +61,9 @@  discard block
 block discarded – undo
61 61
         return $targetSandbox;
62 62
     }
63 63
 
64
+    /**
65
+     * @param string $filename
66
+     */
64 67
     public function dataFile($filename)
65 68
     {
66 69
         return $this->fixturesDir() . '/' . $filename;
Please login to merge, or discard this patch.
tests/functional/PackExtractTest.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
     public function testPackExtract($archiveType)
42 42
     {
43 43
         if ((version_compare(PHP_VERSION, '7.4.0') >= 0) && (getenv('TRAVIS'))) {
44
-          $this->markTestSkipped('Zip libraries apparently not available on Travis CI with PHP 7.4 image.');
44
+            $this->markTestSkipped('Zip libraries apparently not available on Travis CI with PHP 7.4 image.');
45 45
         }
46 46
 
47 47
         // Archive directory and then extract it again with Archive and Extract tasks
Please login to merge, or discard this patch.
src/Task/File/loadTasks.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
4 4
 trait loadTasks
5 5
 {
6 6
     /**
7
-     * @param array|\Iterator $files
7
+     * @param string[] $files
8 8
      *
9 9
      * @return \Robo\Task\File\Concat|\Robo\Collection\CollectionBuilder
10 10
      */
Please login to merge, or discard this patch.
src/Task/Filesystem/FlattenDir.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
      * Sets the value from which direction and how much parent dirs should be included.
137 137
      * Accepts a positive or negative integer or an array with two integer values.
138 138
      *
139
-     * @param int|int[] $parents
139
+     * @param integer[] $parents
140 140
      *
141 141
      * @return $this
142 142
      *
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
     }
199 199
 
200 200
     /**
201
-     * @param array $dirs
201
+     * @param string[] $dirs
202 202
      *
203 203
      * @return array|\Robo\Result
204 204
      *
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -127,7 +127,7 @@
 block discarded – undo
127 127
      */
128 128
     public function dirPermissions($permission)
129 129
     {
130
-        $this->chmod = (int) $permission;
130
+        $this->chmod = (int)$permission;
131 131
 
132 132
         return $this;
133 133
     }
Please login to merge, or discard this patch.
src/Task/Filesystem/loadTasks.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
4 4
 trait loadTasks
5 5
 {
6 6
     /**
7
-     * @param string|string[] $dirs
7
+     * @param string[] $dirs
8 8
      *
9 9
      * @return \Robo\Task\Filesystem\CleanDir|\Robo\Collection\CollectionBuilder
10 10
      */
Please login to merge, or discard this patch.
tests/functional/FlattenDirTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
         $this->fixtures->createAndCdToSandbox();
45 45
 
46 46
         $result = $this->taskFlattenDir('some/deeply/nested/*.re')
47
-            ->includeParents([1,1])
47
+            ->includeParents([1, 1])
48 48
             ->parentDir('some')
49 49
             ->to('flattened')
50 50
             ->run();
Please login to merge, or discard this patch.
tests/functional/AssetsTest.php 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -25,29 +25,29 @@
 block discarded – undo
25 25
     public function testCssMinification()
26 26
     {
27 27
         if (version_compare(PHP_VERSION, '7.2.0') >= 0) {
28
-          $this->markTestSkipped('natxet/cssmin uses deprecated "each()" function (PHP 7.2+)');
28
+            $this->markTestSkipped('natxet/cssmin uses deprecated "each()" function (PHP 7.2+)');
29 29
         }
30 30
 
31 31
         $this->fixtures->createAndCdToSandbox();
32 32
 
33
-				$sampleCss = $this->fixtures->dataFile('sample.css');
34
-				$outputCss = 'minifiedSample.css';
33
+                $sampleCss = $this->fixtures->dataFile('sample.css');
34
+                $outputCss = 'minifiedSample.css';
35 35
 
36
-				$initialFileSize = filesize($sampleCss);
36
+                $initialFileSize = filesize($sampleCss);
37 37
 
38
-				$result = $this->taskMinify($sampleCss)
39
-				  ->to('minifiedSample.css')
40
-				  ->run();
38
+                $result = $this->taskMinify($sampleCss)
39
+                    ->to('minifiedSample.css')
40
+                    ->run();
41 41
         $this->assertTrue($result->wasSuccessful());
42 42
 
43
-				$this->assertFileExists($outputCss);
44
-				$minifiedFileSize = filesize($outputCss);
45
-				$outputCssContents = file_get_contents($outputCss);
43
+                $this->assertFileExists($outputCss);
44
+                $minifiedFileSize = filesize($outputCss);
45
+                $outputCssContents = file_get_contents($outputCss);
46 46
 
47
-				$this->assertLessThan($initialFileSize, $minifiedFileSize, 'Minified file is smaller than the source file');
48
-				$this->assertGreaterThan(0, $minifiedFileSize, 'Minified file is not empty');
49
-				$this->assertContains('body', $outputCssContents, 'Minified file has some content from the source file');
50
-				$this->assertNotContains('Sample css file', $outputCssContents, 'Minified file does not contain comment from source file');
47
+                $this->assertLessThan($initialFileSize, $minifiedFileSize, 'Minified file is smaller than the source file');
48
+                $this->assertGreaterThan(0, $minifiedFileSize, 'Minified file is not empty');
49
+                $this->assertContains('body', $outputCssContents, 'Minified file has some content from the source file');
50
+                $this->assertNotContains('Sample css file', $outputCssContents, 'Minified file does not contain comment from source file');
51 51
     }
52 52
 
53 53
 }
Please login to merge, or discard this patch.
tests/functional/ExecTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
         $task = $this->taskExec('env | wc -l')->interactive(false);
69 69
         $result = $task->run();
70 70
         $this->assertTrue($result->wasSuccessful());
71
-        $start_count = (int) $result->getMessage();
71
+        $start_count = (int)$result->getMessage();
72 72
         $this->assertGreaterThan(0, $start_count);
73 73
 
74 74
         // Verify that we get the same amount of environment variables with
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
         $this->assertTrue($result->wasSuccessful());
79 79
         $this->assertEquals(
80 80
             $start_count,
81
-            (int) $result->getMessage());
81
+            (int)$result->getMessage());
82 82
 
83 83
         // Now run the same command, but this time add another environment
84 84
         // variable, and see if our count increases by one.
@@ -86,6 +86,6 @@  discard block
 block discarded – undo
86 86
         $task->env('FOO', 'BAR');
87 87
         $result = $task->run();
88 88
         $this->assertTrue($result->wasSuccessful());
89
-        $this->assertEquals($start_count + 1, (int) $result->getMessage());
89
+        $this->assertEquals($start_count + 1, (int)$result->getMessage());
90 90
     }
91 91
 }
Please login to merge, or discard this patch.