Skip to content

Commit 2807fa5

Browse files
author
Doug Bird
committed
fix help modes
1 parent ac3b306 commit 2807fa5

File tree

3 files changed

+11
-12
lines changed

3 files changed

+11
-12
lines changed

bin/clientcal-user.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ public static function showUsage() {
2727
}
2828

2929
public static function showHelp() {
30-
echo self::HELP_LABEL."\n";
30+
echo self::HELP_LABEL.PHP_EOL;
3131
$fallbackAppDir = self::DEFAULT_APP_DIR;
3232
$me = self::ME;
33-
echo <<<"EOT"
33+
$help=<<<"HELP"
3434
Options:
3535
--help
3636
Output a help message and exit.
@@ -55,8 +55,8 @@ public static function showHelp() {
5555
5656
<PASSWORD>
5757
Specifies the user's password; avoid being prompted for password.
58-
EOT;
59-
echo \PHP_EOL;
58+
HELP;
59+
echo str_replace("\n",\PHP_EOL,$help).\PHP_EOL;
6060
}
6161

6262
/**

bin/db-export.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,9 @@ public static function showUsage() {
3535
}
3636

3737
public static function showHelp() {
38-
echo self::HELP_LABEL."\n";
39-
$fallbackDbname = self::FALLBACK_DBNAME;
40-
$fallbackHost = self::FALLBACK_HOST;
41-
$fallbackUsername = self::FALLBACK_USERNAME;
38+
echo self::HELP_LABEL.PHP_EOL;
4239
$me = self::ME;
43-
echo <<<"EOT"
40+
$help=<<<"HELP"
4441
Output Control:
4542
--help
4643
Enable "help mode": outputs this message then exits.
@@ -70,7 +67,8 @@ public static function showHelp() {
7067
App Configuration:
7168
--app-dir=<path to project app directory> (optional)
7269
The directory where this script will look for the "bin-common.php" file and "data/mysql" sub-directory.
73-
EOT;
70+
HELP;
71+
echo str_replace("\n",\PHP_EOL,$help).\PHP_EOL;
7472
}
7573

7674
/**

bin/db-install.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ public static function showUsage() {
3939
}
4040

4141
public static function showHelp() {
42-
echo self::HELP_LABEL."\n";
42+
echo self::HELP_LABEL.PHP_EOL;
4343
$fallbackDbname = self::FALLBACK_DBNAME;
4444
$fallbackHost = self::FALLBACK_HOST;
4545
$fallbackUsername = self::FALLBACK_USERNAME;
46-
echo <<<"EOT"
46+
$help=<<<"EOT"
4747
Output Control:
4848
--help
4949
Enable "help mode": outputs this message then exits.
@@ -83,6 +83,7 @@ public static function showHelp() {
8383
PDO Data Source Name string
8484
See: http://php.net/manual/en/pdo.construct.php
8585
EOT;
86+
echo str_replace("\n",\PHP_EOL,$help).\PHP_EOL;
8687
}
8788

8889
/**

0 commit comments

Comments
 (0)