-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e9e2a3f
commit cfea4c8
Showing
6 changed files
with
93 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
install: | ||
composer install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,8 +7,15 @@ | |
"email": "[email protected]" | ||
} | ||
], | ||
"require": {}, | ||
"require": { | ||
"wp-cli/php-cli-tools": "*" | ||
}, | ||
"bin": [ | ||
"bin/brain-games" | ||
] | ||
], | ||
"autoload": { | ||
"files": [ | ||
"src/Cli.php" | ||
] | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} |