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

9
bin/console Normal file → Executable file
View File

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