added namespace

Signed-off-by: tracer <tracer@24unix.net>
This commit is contained in:
tracer 2022-01-25 20:29:19 +01:00
parent af73a2ecc0
commit 47aeb849f7
1 changed files with 5 additions and 4 deletions

9
bin/console Normal file → Executable file
View File

@ -1,17 +1,18 @@
#!/usr/bin/keyhelp-php81 #!/usr/bin/keyhelp-php81
<?php <?php
namespace App\Controller;
if (php_sapi_name() !== 'cli') { if (php_sapi_name() !== 'cli') {
exit; exit;
} }
// version, store that somewhere else // version, store that somewhere else
$version = '0.0.1'; $version = '0.0.1';
require dirname(path: __DIR__) . '/vendor/autoload.php'; require dirname(path: __DIR__) . '/vendor/autoload.php';
use App\Controller\BindAPI;
$configFile = dirname(path: __DIR__) ."/config.json"; $configFile = dirname(path: __DIR__) ."/config.json";
if (!file_exists($configFile)) { if (!file_exists($configFile)) {
echo 'Missing config file' . PHP_EOL; echo 'Missing config file' . PHP_EOL;
@ -91,7 +92,7 @@ function confirm(String $message = 'Are you sure? ', array $options = ['y', 'n']
} }
echo '): '; echo '): ';
$handle = fopen("php://stdin", 'r'); $handle = fopen(filename: "php://stdin", mode: 'r');
$line = trim(fgetc($handle)); $line = trim(fgetc($handle));
fclose($handle); fclose($handle);