Completed
Pull Request — master (#924)
by Greg
02:10
created
src/Task/Base/Exec.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,6 @@
 block discarded – undo
2 2
 
3 3
 namespace Robo\Task\Base;
4 4
 
5
-use Robo\Common\ExecTrait;
6 5
 use Robo\Contract\CommandInterface;
7 6
 use Robo\Contract\PrintedInterface;
8 7
 use Robo\Contract\SimulatedInterface;
Please login to merge, or discard this patch.
src/Runner.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@
 block discarded – undo
81 81
     public function __construct($roboClass = null, $roboFile = null)
82 82
     {
83 83
         // set the const as class properties to allow overwriting in child classes
84
-        $this->roboClass = $roboClass ? $roboClass : self::ROBOCLASS ;
84
+        $this->roboClass = $roboClass ? $roboClass : self::ROBOCLASS;
85 85
         $this->roboFile  = $roboFile ? $roboFile : self::ROBOFILE;
86 86
         $this->dir = getcwd();
87 87
     }
Please login to merge, or discard this patch.
src/Application.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
     {
41 41
         $createRoboFile = new Command('init');
42 42
         $createRoboFile->setDescription("Intitalizes basic RoboFile in current dir");
43
-        $createRoboFile->setCode(function () use ($roboClass, $roboFile) {
43
+        $createRoboFile->setCode(function() use ($roboClass, $roboFile) {
44 44
             $output = Robo::output();
45 45
             $output->writeln("<comment>  ~~~ Welcome to Robo! ~~~~ </comment>");
46 46
             $output->writeln("<comment>  " . basename($roboFile) . " will be created in the current directory </comment>");
Please login to merge, or discard this patch.
src/Task/Development/GenerateMarkdownDoc.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -705,7 +705,7 @@  discard block
 block discarded – undo
705 705
         return implode(
706 706
             "\n",
707 707
             array_map(
708
-                function ($line) use ($indent) {
708
+                function($line) use ($indent) {
709 709
                     return substr($line, $indent);
710 710
                 },
711 711
                 explode("\n", $doc)
@@ -727,7 +727,7 @@  discard block
 block discarded – undo
727 727
         $params = implode(
728 728
             ', ',
729 729
             array_map(
730
-                function ($p) {
730
+                function($p) {
731 731
                     return $this->documentParam($p);
732 732
                 },
733 733
                 $reflectedMethod->getParameters()
Please login to merge, or discard this patch.
src/ClassDiscovery/RelativeNamespaceDiscovery.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
         $relativePath = $this->convertNamespaceToPath($this->relativeNamespace);
54 54
 
55 55
         foreach ($this->classLoader->getPrefixesPsr4() as $baseNamespace => $directories) {
56
-            $directories = array_filter(array_map(function ($directory) use ($relativePath) {
56
+            $directories = array_filter(array_map(function($directory) use ($relativePath) {
57 57
                 return $directory . $relativePath;
58 58
             }, $directories), 'is_dir');
59 59
 
Please login to merge, or discard this patch.
src/Collection/CollectionBuilder.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -309,7 +309,7 @@
 block discarded – undo
309 309
 
310 310
     /**
311 311
      * @param string $functionName
312
-     * @param int|string $stateKey
312
+     * @param string $stateKey
313 313
      *
314 314
      * @return $this
315 315
      */
Please login to merge, or discard this patch.
tests/functional/ForEachTest.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -59,8 +59,8 @@  discard block
 block discarded – undo
59 59
         // set iterable in the __constructor
60 60
         $result = $this
61 61
             ->taskForEach($items)
62
-            ->withBuilder(function (CollectionBuilder $builder, $key, $value) use (&$actual) {
63
-                $builder->addCode(function () use ($key, $value, &$actual) {
62
+            ->withBuilder(function(CollectionBuilder $builder, $key, $value) use (&$actual) {
63
+                $builder->addCode(function() use ($key, $value, &$actual) {
64 64
                     $actual[] = "$key = $value";
65 65
 
66 66
                     return 0;
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
         // set iterable with deferTaskConfiguration()
83 83
         $result = $this
84 84
             ->collectionBuilder()
85
-            ->addCode(function (Data $data) use ($items) {
85
+            ->addCode(function(Data $data) use ($items) {
86 86
                 $data['items'] = $items;
87 87
 
88 88
                 return 0;
@@ -91,8 +91,8 @@  discard block
 block discarded – undo
91 91
                 $this
92 92
                     ->taskForEach()
93 93
                     ->deferTaskConfiguration('setIterable', 'items')
94
-                    ->withBuilder(function (CollectionBuilder $builder, $key, $value) use (&$actual) {
95
-                        $builder->addCode(function () use ($key, $value, &$actual) {
94
+                    ->withBuilder(function(CollectionBuilder $builder, $key, $value) use (&$actual) {
95
+                        $builder->addCode(function() use ($key, $value, &$actual) {
96 96
                             $actual[] = "$key = $value";
97 97
 
98 98
                             return 0;
@@ -111,8 +111,8 @@  discard block
 block discarded – undo
111 111
         // call the __constructor() without argument
112 112
         $result = $this
113 113
             ->taskForEach()
114
-            ->withBuilder(function (CollectionBuilder $builder, $key, $value) use (&$actual) {
115
-                $builder->addCode(function () use ($key, $value, &$actual) {
114
+            ->withBuilder(function(CollectionBuilder $builder, $key, $value) use (&$actual) {
115
+                $builder->addCode(function() use ($key, $value, &$actual) {
116 116
                     $actual++;
117 117
 
118 118
                     return 0;
Please login to merge, or discard this patch.
tests/functional/GenerateTaskTest.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,8 +20,8 @@
 block discarded – undo
20 20
         $result = $this->taskGenTask('Symfony\Component\Filesystem\Filesystem', 'FilesystemStack')->run();
21 21
         $this->assertTrue($result->wasSuccessful());
22 22
         $this->assertContains(
23
-          'protected function _chgrp($files, $group, $recursive = false)',
24
-          $result->getMessage());
23
+            'protected function _chgrp($files, $group, $recursive = false)',
24
+            $result->getMessage());
25 25
     }
26 26
 
27 27
 }
Please login to merge, or discard this patch.
tests/functional/GenerateMarkdownDocTest.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -33,13 +33,13 @@  discard block
 block discarded – undo
33 33
 
34 34
         $collection = $this->collectionBuilder();
35 35
         $taskGenerator = $collection->taskGenDoc("TestedRoboTask.md");
36
-        $taskGenerator->filterClasses(function (\ReflectionClass $r) {
36
+        $taskGenerator->filterClasses(function(\ReflectionClass $r) {
37 37
             return !($r->isAbstract() || $r->isTrait()) && $r->implementsInterface('Robo\Contract\TaskInterface');
38 38
         })->prepend("# TestedRoboTask Tasks");
39 39
         $taskGenerator->docClass('TestedRoboTask');
40 40
 
41 41
         $taskGenerator->filterMethods(
42
-            function (\ReflectionMethod $m) {
42
+            function(\ReflectionMethod $m) {
43 43
                 if ($m->isConstructor() || $m->isDestructor() || $m->isStatic()) {
44 44
                     return false;
45 45
                 }
@@ -65,21 +65,21 @@  discard block
 block discarded – undo
65 65
                 return !in_array($m->name, $undocumentedMethods) && $m->isPublic(); // methods are not documented
66 66
             }
67 67
         )->processClassSignature(
68
-            function ($c) {
68
+            function($c) {
69 69
                 return "## " . preg_replace('~Task$~', '', $c->getShortName()) . "\n";
70 70
             }
71 71
         )->processClassDocBlock(
72
-            function (\ReflectionClass $c, $doc) {
72
+            function(\ReflectionClass $c, $doc) {
73 73
                 $doc = preg_replace('~@method .*?(.*?)\)~', '* `$1)` ', $doc);
74
-                $doc = str_replace('\\'.$c->name, '', $doc);
74
+                $doc = str_replace('\\' . $c->name, '', $doc);
75 75
                 return $doc;
76 76
             }
77 77
         )->processMethodSignature(
78
-            function (\ReflectionMethod $m, $text) {
78
+            function(\ReflectionMethod $m, $text) {
79 79
                 return str_replace('#### *public* ', '* `', $text) . '`';
80 80
             }
81 81
         )->processMethodDocBlock(
82
-            function (\ReflectionMethod $m, $text) {
82
+            function(\ReflectionMethod $m, $text) {
83 83
 
84 84
                 return $text ? ' ' . trim(strtok($text, "\n"), "\n") : '';
85 85
             }
Please login to merge, or discard this patch.