Fix regex delimiters, add logo to initial composer help

This commit is contained in:
Niklas Keller
2016-03-12 17:09:30 +01:00
parent 5b96cedea1
commit b07ab9471a
2 changed files with 8 additions and 3 deletions

View File

@@ -12,9 +12,14 @@ use Psr\Log\LoggerInterface;
if (!file_exists(__DIR__ . "/../vendor/autoload.php")) {
echo <<<HELP
____ __________ ___ ___
/ __ `/ ___/ __ `__ \/ _ \
/ /_/ / /__/ / / / / / __/
\__,_/\___/_/ /_/ /_/\___/
You need to install the composer dependencies.
composer install
composer install --no-dev
HELP;

View File

@@ -50,8 +50,8 @@ function resolveServer($uri) {
function serverToKeyname($server) {
$keyFile = str_replace("/", ".", $server);
$keyFile = preg_replace("[^a-z0-9._-]", "", $keyFile);
$keyFile = preg_replace("\\.+", ".", $keyFile);
$keyFile = preg_replace("@[^a-z0-9._-]@", "", $keyFile);
$keyFile = preg_replace("@\\.+@", ".", $keyFile);
return $keyFile;
}