Skip to content

Commit

Permalink
2 step
Browse files Browse the repository at this point in the history
  • Loading branch information
Legomegger committed Jul 3, 2018
1 parent e9e2a3f commit cfea4c8
Show file tree
Hide file tree
Showing 6 changed files with 93 additions and 3 deletions.
Binary file modified .DS_Store
Binary file not shown.
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
install:
composer install
4 changes: 3 additions & 1 deletion bin/brain-games
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/usr/bin/php
<?php
echo "Welcome to Brain Games!\n";
require_once __DIR__ . '/../vendor/autoload.php';

BrainGames\Cli\run();
11 changes: 9 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,15 @@
"email": "[email protected]"
}
],
"require": {},
"require": {
"wp-cli/php-cli-tools": "*"
},
"bin": [
"bin/brain-games"
]
],
"autoload": {
"files": [
"src/Cli.php"
]
}
}
68 changes: 68 additions & 0 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions src/Cli.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php
namespace BrainGames\Cli;

use function \cli\line;

function run()
{
line('Welcome to the Brain Game!');
$name = \cli\prompt('May I have your name?');
line("Hello, %s!", $name);
}

0 comments on commit cfea4c8

Please sign in to comment.