@@ -7,7 +7,6 @@ |
||
7 | 7 | use Tarsana\IO\Interfaces\Resource\Writer as WriterInterface; |
8 | 8 | use Tarsana\IO\Resource\Reader; |
9 | 9 | use Tarsana\IO\Resource\Writer; |
10 | -use Tarsana\Syntax\Syntax; |
|
11 | 10 | |
12 | 11 | class Console implements ConsoleInterface { |
13 | 12 |
@@ -7,13 +7,13 @@ |
||
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() |
@@ -7,12 +7,12 @@ |
||
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() |
@@ -7,8 +7,8 @@ |
||
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() |
@@ -9,16 +9,16 @@ |
||
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 | } |
@@ -9,15 +9,15 @@ |
||
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 | } |
@@ -9,12 +9,12 @@ |
||
9 | 9 | public function test_it_renders_the_template() |
10 | 10 | { |
11 | 11 | $this->command(new RenderCommand) |
12 | - ->printsExactly("Hello You<br>"); |
|
12 | + ->printsExactly("Hello You<br>"); |
|
13 | 13 | } |
14 | 14 | |
15 | 15 | public function test_it_renders_with_custom_name() |
16 | 16 | { |
17 | 17 | $this->command(new RenderCommand, ['Foo']) |
18 | - ->printsExactly("Hello Foo<br>"); |
|
18 | + ->printsExactly("Hello Foo<br>"); |
|
19 | 19 | } |
20 | 20 | } |
@@ -7,8 +7,8 @@ |
||
7 | 7 | protected function init () |
8 | 8 | { |
9 | 9 | $this->name('Hello World') |
10 | - ->version('1.0.0-alpha') |
|
11 | - ->description('Shows a "Hello World" message'); |
|
10 | + ->version('1.0.0-alpha') |
|
11 | + ->description('Shows a "Hello World" message'); |
|
12 | 12 | } |
13 | 13 | |
14 | 14 | protected function execute() |
@@ -23,9 +23,9 @@ |
||
23 | 23 | { |
24 | 24 | parent::__construct(); |
25 | 25 | $this->parent($parent) |
26 | - ->console($parent->console()) |
|
27 | - ->fs($parent->fs) |
|
28 | - ->templatesLoader($parent->templatesLoader); |
|
26 | + ->console($parent->console()) |
|
27 | + ->fs($parent->fs) |
|
28 | + ->templatesLoader($parent->templatesLoader); |
|
29 | 29 | } |
30 | 30 | |
31 | 31 | protected function setupSubCommands() |