Completed
Push — master ( e34efc...383369 )
by Amine
02:46
created
src/Syntax/SyntaxBuilder.php 2 patches
Doc Comments   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
     /**
24 24
      * A constructor alias; If you don't like the 'new' keyword.
25 25
      * @param  string|Tarsana\Syntax\ObjectSyntax $syntax
26
-     * @return Tarsana\Command\Syntax\SyntaxBuilder
26
+     * @return SyntaxBuilder
27 27
      * @throws Tarsana\Command\Exceptions\SyntaxBuilderException
28 28
      */
29 29
     public static function of($syntax)
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
      * @param  string $name
89 89
      * @param  string $description
90 90
      * @param  mixed  $default
91
-     * @return Tarsana\Command\Syntax\SyntaxBuilder
91
+     * @return SyntaxBuilder
92 92
      */
93 93
     public function describe($name, $description, $default = null)
94 94
     {
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
     /**
105 105
      * Gets a field or subfield from an Syntax.
106 106
      *
107
-     * @param  Tarsana\Syntax\Syntax $syntax
107
+     * @param  Syntax $syntax
108 108
      * @param  array $names
109 109
      * @return Tarsana\Syntax\Syntax
110 110
      * @throws Tarsana\Command\Exceptions\SyntaxBuilderException
@@ -122,8 +122,8 @@  discard block
 block discarded – undo
122 122
      * Ensures that `$syntax` is an ObjectSyntax or an ArraySyntax of ObjectSyntaxes,
123 123
      * and returns the ObjectSyntax or throws a SyntaxBuilderException.
124 124
      *
125
-     * @param  Tarsana\Syntax\Syntax $syntax
126
-     * @return Tarsana\Syntax\Syntax
125
+     * @param  Syntax $syntax
126
+     * @return ObjectSyntax
127 127
      * @throws Tarsana\Command\Exceptions\SyntaxBuilderException
128 128
      */
129 129
     protected function ensureObject(Syntax $syntax)
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -75,8 +75,9 @@
 block discarded – undo
75 75
 
76 76
         $ss = S::syntax();
77 77
 
78
-        if (!$ss->canParse($syntax))
79
-            throw new SyntaxBuilderException("Invalid Syntax: '{$syntax}'");
78
+        if (!$ss->canParse($syntax)) {
79
+                    throw new SyntaxBuilderException("Invalid Syntax: '{$syntax}'");
80
+        }
80 81
 
81 82
         return $ss->parse($syntax);
82 83
     }
Please login to merge, or discard this patch.
src/TemplateLoader.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@
 block discarded – undo
58 58
     /**
59 59
      * Filesystem getter and setter.
60 60
      *
61
-     * @param  Tarsana\IO\Filesystem|void $value
61
+     * @param  null|Filesystem $value
62 62
      * @return Tarsana\IO\Filesystem|self
63 63
      */
64 64
     public function fs (Filesystem $value = null)
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -63,8 +63,9 @@
 block discarded – undo
63 63
      */
64 64
     public function fs (Filesystem $value = null)
65 65
     {
66
-        if (null === $value)
67
-            return $this->fs;
66
+        if (null === $value) {
67
+                    return $this->fs;
68
+        }
68 69
         $this->fs = $value;
69 70
         return $this;
70 71
     }
Please login to merge, or discard this patch.
src/Templates/TwigTemplateLoader.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
      * Loads a template.
39 39
      *
40 40
      * @param  string $name
41
-     * @return Tarsana\Command\Templates\TwigTemplate
41
+     * @return TwigTemplate
42 42
      */
43 43
     public function load($name)
44 44
     {
Please login to merge, or discard this patch.
src/Commands/HelpCommand.php 2 patches
Braces   +5 added lines, -4 removed lines patch added patch discarded remove patch
@@ -24,10 +24,11 @@
 block discarded – undo
24 24
     protected function execute ()
25 25
     {
26 26
         $command = trim($this->args->command);
27
-        if (empty($command) || !$this->parent()->hasCommand($command))
28
-            $this->showHelpOf($this->parent);
29
-        else
30
-            $this->showHelpOf($this->parent->command($command));
27
+        if (empty($command) || !$this->parent()->hasCommand($command)) {
28
+                    $this->showHelpOf($this->parent);
29
+        } else {
30
+                    $this->showHelpOf($this->parent->command($command));
31
+        }
31 32
     }
32 33
 
33 34
     protected function showHelpOf (Command $command)
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@
 block discarded – undo
87 87
      * Shows the syntax description of a part of arguments.
88 88
      *
89 89
      * @param  string $name
90
-     * @param  Tarsana\Syntax\Syntax $syntax
90
+     * @param  Syntax $syntax
91 91
      * @param  int $level
92 92
      * @return void
93 93
      */
Please login to merge, or discard this patch.
src/Command.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
      * adds/overrides or gets a sub command.
212 212
      *
213 213
      * @param  string  $name
214
-     * @param  Tarsana\Command\Command|null $cmd
214
+     * @param  null|Command $cmd
215 215
      * @return Tarsana\Command\Command
216 216
      * @throws Tarsana\Command\Exceptions\CommandNotFound
217 217
      */
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
      * Runs the command.
300 300
      *
301 301
      * @param  string|null $args
302
-     * @param  League\CLImate\CLImate|null $console
302
+     * @param  null|CLImate $console
303 303
      * @return void
304 304
      */
305 305
     public function run($args = null, CLImate $console = null)
Please login to merge, or discard this patch.
Braces   +24 added lines, -16 removed lines patch added patch discarded remove patch
@@ -108,8 +108,9 @@  discard block
 block discarded – undo
108 108
      */
109 109
     public function name($value = null)
110 110
     {
111
-        if (null === $value)
112
-            return $this->name;
111
+        if (null === $value) {
112
+                    return $this->name;
113
+        }
113 114
 
114 115
         $this->name = $value;
115 116
         return $this;
@@ -123,8 +124,9 @@  discard block
 block discarded – undo
123 124
      */
124 125
     public function description($value = null)
125 126
     {
126
-        if (null === $value)
127
-            return $this->description;
127
+        if (null === $value) {
128
+                    return $this->description;
129
+        }
128 130
 
129 131
         $this->description = $value;
130 132
         return $this;
@@ -138,8 +140,9 @@  discard block
 block discarded – undo
138 140
      */
139 141
     public function version($value = null)
140 142
     {
141
-        if (null === $value)
142
-            return $this->version;
143
+        if (null === $value) {
144
+                    return $this->version;
145
+        }
143 146
 
144 147
         $this->version = $value;
145 148
         return $this;
@@ -153,8 +156,9 @@  discard block
 block discarded – undo
153 156
      */
154 157
     public function console($value = null)
155 158
     {
156
-        if (null === $value)
157
-            return $this->console;
159
+        if (null === $value) {
160
+                    return $this->console;
161
+        }
158 162
 
159 163
         $this->console = $value;
160 164
         return $this;
@@ -169,8 +173,9 @@  discard block
 block discarded – undo
169 173
      */
170 174
     public function syntax($value = null)
171 175
     {
172
-        if (null === $value)
173
-            return $this->syntaxBuilder->get();
176
+        if (null === $value) {
177
+                    return $this->syntaxBuilder->get();
178
+        }
174 179
 
175 180
         $this->syntaxBuilder = SyntaxBuilder::of($value);
176 181
 
@@ -218,8 +223,9 @@  discard block
 block discarded – undo
218 223
     public function command($name, Command $cmd = null)
219 224
     {
220 225
         if (null === $cmd) {
221
-            if (!$this->hasCommand($name))
222
-                throw new CommandNotFound("Command '{$this->name}' has no subcommand '{$name}'");
226
+            if (!$this->hasCommand($name)) {
227
+                            throw new CommandNotFound("Command '{$this->name}' has no subcommand '{$name}'");
228
+            }
223 229
             return $this->subCommands[$name];
224 230
         }
225 231
 
@@ -245,8 +251,9 @@  discard block
 block discarded – undo
245 251
      */
246 252
     public function args($value = null)
247 253
     {
248
-        if (null === $value)
249
-            return $this->args;
254
+        if (null === $value) {
255
+                    return $this->args;
256
+        }
250 257
 
251 258
         $this->args = $value;
252 259
         return $this;
@@ -346,8 +353,9 @@  discard block
 block discarded – undo
346 353
      */
347 354
     protected function template($name)
348 355
     {
349
-        if (null === $this->templateLoader)
350
-            throw new NullPropertyAccess("The templatesLoader is not initialized; Please set it before trying to load a template !");
356
+        if (null === $this->templateLoader) {
357
+                    throw new NullPropertyAccess("The templatesLoader is not initialized; Please set it before trying to load a template !");
358
+        }
351 359
 
352 360
         return $this->templateLoader->load($name);
353 361
     }
Please login to merge, or discard this patch.