Completed
Push — master ( 81130f...9573eb )
by Amine
10s
created
src/Commands/HelpCommand.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -62,11 +62,11 @@
 block discarded – undo
62 62
             $default = 'default: ' . json_encode($s->getDefault());
63 63
         else
64 64
             $default = 'required';
65
-        $description = $this->parent()->describe($prefix.$name);
65
+        $description = $this->parent()->describe($prefix . $name);
66 66
         $syntax = $this->formatSyntax($s);
67 67
         $this->console()->line("{$tabs}<warn>{$name}</warn> <success>{$syntax}</success> {$description} <info>({$default})</info>");
68 68
 
69
-        $level ++;
69
+        $level++;
70 70
         $prefix .= $name . '.';
71 71
         foreach ($this->getFields($s) as $field => $syntax) {
72 72
             $this->printField($field, $syntax, $prefix, $level);
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
     protected function init()
12 12
     {
13 13
         $this->name('Help')
14
-             ->description('Shows the help message');
14
+                ->description('Shows the help message');
15 15
     }
16 16
 
17 17
     protected function execute()
Please login to merge, or discard this patch.
src/Command.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
         }
143 143
 
144 144
         $this->options = [];
145
-        foreach($options as $option)
145
+        foreach ($options as $option)
146 146
             $this->options[$option] = false;
147 147
 
148 148
         return $this;
@@ -330,7 +330,7 @@  discard block
 block discarded – undo
330 330
     public function clear()
331 331
     {
332 332
         $this->args = null;
333
-        foreach($this->options as $name => $value) {
333
+        foreach ($this->options as $name => $value) {
334 334
             $this->options[$name] = false;
335 335
         }
336 336
     }
Please login to merge, or discard this patch.
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -43,15 +43,15 @@  discard block
 block discarded – undo
43 43
     public function __construct()
44 44
     {
45 45
         $this->commands([])
46
-             ->name('Unknown')
47
-             ->version('1.0.0')
48
-             ->description('...')
49
-             ->descriptions([])
50
-             ->options([])
51
-             ->console(new Console)
52
-             ->fs(new Filesystem('.'))
53
-             ->setupSubCommands()
54
-             ->init();
46
+                ->name('Unknown')
47
+                ->version('1.0.0')
48
+                ->description('...')
49
+                ->descriptions([])
50
+                ->options([])
51
+                ->console(new Console)
52
+                ->fs(new Filesystem('.'))
53
+                ->setupSubCommands()
54
+                ->init();
55 55
     }
56 56
 
57 57
     /**
@@ -298,7 +298,7 @@  discard block
 block discarded – undo
298 298
     protected function setupSubCommands()
299 299
     {
300 300
         return $this->command('--help', new HelpCommand($this))
301
-             ->command('--version', new VersionCommand($this));
301
+                ->command('--version', new VersionCommand($this));
302 302
     }
303 303
 
304 304
     public function describe(string $name, string $description = null)
Please login to merge, or discard this patch.
src/Template/TemplateLoader.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@
 block discarded – undo
73 73
      * @throws Tarsana\Command\Exceptions\TemplateNotFound
74 74
      * @throws Tarsana\Command\Exceptions\TemplateNameConflict
75 75
      */
76
-    public function load (string $name) : TemplateInterface
76
+    public function load(string $name) : TemplateInterface
77 77
     {
78 78
         $supportedExtensions = array_keys(self::$providers);
79 79
 
Please login to merge, or discard this patch.
src/Console/ExceptionPrinter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
         }
63 63
         if ($s instanceof ArraySyntax) {
64 64
             if ($short) return 'array';
65
-            return $this->printSyntax($s->syntax()).$s->separator().'...';
65
+            return $this->printSyntax($s->syntax()) . $s->separator() . '...';
66 66
         }
67 67
         return (string) $s;
68 68
     }
Please login to merge, or discard this patch.
src/Template/Twig/TwigTemplate.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
      */
17 17
     protected $data;
18 18
 
19
-    public function __construct ($twig)
19
+    public function __construct($twig)
20 20
     {
21 21
         $this->twig = $twig;
22 22
         $this->data = [];
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
      * @param  array $data
29 29
      * @return self
30 30
      */
31
-    public function bind (array $data) : TemplateInterface
31
+    public function bind(array $data) : TemplateInterface
32 32
     {
33 33
         $this->data = array_merge($this->data, $data);
34 34
         return $this;
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
      *
53 53
      * @return self
54 54
      */
55
-    public function clear () : TemplateInterface
55
+    public function clear() : TemplateInterface
56 56
     {
57 57
         $this->data = [];
58 58
         return $this;
Please login to merge, or discard this patch.
src/Commands/VersionCommand.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@
 block discarded – undo
7 7
     protected function init()
8 8
     {
9 9
         $this->name('Version')
10
-             ->description('Shows the version');
10
+                ->description('Shows the version');
11 11
     }
12 12
 
13 13
     protected function execute()
Please login to merge, or discard this patch.
examples/RepeatCommand.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -7,13 +7,13 @@
 block discarded – undo
7 7
     protected function init ()
8 8
     {
9 9
         $this->name('Repeat')
10
-             ->version('1.0.0')
11
-             ->description('Repeats a word a number of times')
12
-             ->syntax('word: string, count: (number: 3)')
13
-             ->options(['--upper'])
14
-             ->describe('word', 'The word to repeat')
15
-             ->describe('count', 'The number of times to repeat the word')
16
-             ->describe('--upper', 'Converts the result to uppercase');
10
+                ->version('1.0.0')
11
+                ->description('Repeats a word a number of times')
12
+                ->syntax('word: string, count: (number: 3)')
13
+                ->options(['--upper'])
14
+                ->describe('word', 'The word to repeat')
15
+                ->describe('count', 'The number of times to repeat the word')
16
+                ->describe('--upper', 'Converts the result to uppercase');
17 17
     }
18 18
 
19 19
     protected function execute()
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
4 4
 
5 5
 class RepeatCommand extends Command {
6 6
 
7
-    protected function init ()
7
+    protected function init()
8 8
     {
9 9
         $this->name('Repeat')
10 10
              ->version('1.0.0')
Please login to merge, or discard this patch.
examples/RenderCommand.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -7,12 +7,12 @@
 block discarded – undo
7 7
     protected function init ()
8 8
     {
9 9
         $this->name('Render')
10
-             ->version('1.0.0')
11
-             ->description('Renders the hello template.')
12
-             ->syntax('name: (string:You)')
13
-             ->describe('name', 'Your name.')
14
-             ->templatesPath(TEMPLATES_PATH);
15
-             // this points to /tests/resources/templates
10
+                ->version('1.0.0')
11
+                ->description('Renders the hello template.')
12
+                ->syntax('name: (string:You)')
13
+                ->describe('name', 'Your name.')
14
+                ->templatesPath(TEMPLATES_PATH);
15
+                // this points to /tests/resources/templates
16 16
     }
17 17
 
18 18
     protected function execute()
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
4 4
 
5 5
 class RenderCommand extends Command {
6 6
 
7
-    protected function init ()
7
+    protected function init()
8 8
     {
9 9
         $this->name('Render')
10 10
              ->version('1.0.0')
Please login to merge, or discard this patch.
examples/ListCommand.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -7,8 +7,8 @@
 block discarded – undo
7 7
     protected function init ()
8 8
     {
9 9
         $this->name('List')
10
-             ->version('1.0.0-alpha')
11
-             ->description('Lists files and directories in the current directory.');
10
+                ->version('1.0.0-alpha')
11
+                ->description('Lists files and directories in the current directory.');
12 12
     }
13 13
 
14 14
     protected function execute()
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@  discard block
 block discarded – undo
4 4
 
5 5
 class ListCommand extends Command {
6 6
 
7
-    protected function init ()
7
+    protected function init()
8 8
     {
9 9
         $this->name('List')
10 10
              ->version('1.0.0-alpha')
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
 
14 14
     protected function execute()
15 15
     {
16
-        foreach($this->fs->find('*')->asArray() as $file) {
16
+        foreach ($this->fs->find('*')->asArray() as $file) {
17 17
             $this->console->line($file->name());
18 18
         }
19 19
     }
Please login to merge, or discard this patch.