Completed
Push — master ( 9439c1...234923 )
by Amine
01:42
created
src/SubCommand.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
     {
24 24
         parent::__construct();
25 25
         $this->parent($parent)
26
-             ->console($parent->console);
26
+                ->console($parent->console);
27 27
     }
28 28
 
29 29
     protected function setupSubCommands()
Please login to merge, or discard this patch.
src/Command.php 1 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
-             ->setupSubCommands()
47
-             ->name('Unknown')
48
-             ->version('1.0.0')
49
-             ->description('...')
50
-             ->descriptions([])
51
-             ->options([])
52
-             ->console(new Console)
53
-             ->fs(new Filesystem('.'))
54
-             ->init();
46
+                ->setupSubCommands()
47
+                ->name('Unknown')
48
+                ->version('1.0.0')
49
+                ->description('...')
50
+                ->descriptions([])
51
+                ->options([])
52
+                ->console(new Console)
53
+                ->fs(new Filesystem('.'))
54
+                ->init();
55 55
     }
56 56
 
57 57
     /**
@@ -293,7 +293,7 @@  discard block
 block discarded – undo
293 293
     protected function setupSubCommands()
294 294
     {
295 295
         return $this->command('--help', new HelpCommand($this))
296
-             ->command('--version', new VersionCommand($this));
296
+                ->command('--version', new VersionCommand($this));
297 297
     }
298 298
 
299 299
     public function describe(string $name, string $description = null)
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.
src/Commands/HelpCommand.php 1 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.
examples/RepeatCommand.php 1 patch
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.
examples/RenderCommand.php 1 patch
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.
examples/ListCommand.php 1 patch
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.
examples/tests/ListCommandTest.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -9,16 +9,16 @@
 block discarded – undo
9 9
     public function test_it_list_files_and_directories()
10 10
     {
11 11
         $this->havingFile('demo.txt', 'Some text here!')
12
-             ->havingFile('doc.pdf')
13
-             ->havingDir('src')
14
-             ->command(new ListCommand)
15
-             ->printsExactly('demo.txt<br>doc.pdf<br>src<br>');
12
+                ->havingFile('doc.pdf')
13
+                ->havingDir('src')
14
+                ->command(new ListCommand)
15
+                ->printsExactly('demo.txt<br>doc.pdf<br>src<br>');
16 16
     }
17 17
 
18 18
     public function test_it_prints_nothing_when_no_files()
19 19
     {
20 20
         $this->command(new ListCommand)
21
-             ->printsExactly('');
21
+                ->printsExactly('');
22 22
     }
23 23
 
24 24
 }
Please login to merge, or discard this patch.
examples/tests/HelloWorldTest.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -9,15 +9,15 @@
 block discarded – undo
9 9
     public function test_it_prints_hello_world()
10 10
     {
11 11
         $this->withStdin("Amine\n")
12
-             ->command(new HelloWorld)
13
-             ->prints("Your name:")
14
-             ->prints("Hello Amine<br>");
12
+                ->command(new HelloWorld)
13
+                ->prints("Your name:")
14
+                ->prints("Hello Amine<br>");
15 15
     }
16 16
 
17 17
     public function test_it_shows_hello_world_version()
18 18
     {
19 19
         $this->command(new HelloWorld, ['--version'])
20
-             ->printsExactly("<info>Hello World</info> version <info>1.0.0-alpha</info><br>");
20
+                ->printsExactly("<info>Hello World</info> version <info>1.0.0-alpha</info><br>");
21 21
     }
22 22
 
23 23
 }
Please login to merge, or discard this patch.