Skip to content

Commit

Permalink
fix help modes
Browse files Browse the repository at this point in the history
  • Loading branch information
Doug Bird committed May 2, 2018
1 parent ac3b306 commit 2807fa5
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 12 deletions.
8 changes: 4 additions & 4 deletions bin/clientcal-user.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ public static function showUsage() {
}

public static function showHelp() {
echo self::HELP_LABEL."\n";
echo self::HELP_LABEL.PHP_EOL;
$fallbackAppDir = self::DEFAULT_APP_DIR;
$me = self::ME;
echo <<<"EOT"
$help=<<<"HELP"
Options:
--help
Output a help message and exit.
Expand All @@ -55,8 +55,8 @@ public static function showHelp() {
<PASSWORD>
Specifies the user's password; avoid being prompted for password.
EOT;
echo \PHP_EOL;
HELP;
echo str_replace("\n",\PHP_EOL,$help).\PHP_EOL;
}

/**
Expand Down
10 changes: 4 additions & 6 deletions bin/db-export.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,9 @@ public static function showUsage() {
}

public static function showHelp() {
echo self::HELP_LABEL."\n";
$fallbackDbname = self::FALLBACK_DBNAME;
$fallbackHost = self::FALLBACK_HOST;
$fallbackUsername = self::FALLBACK_USERNAME;
echo self::HELP_LABEL.PHP_EOL;
$me = self::ME;
echo <<<"EOT"
$help=<<<"HELP"
Output Control:
--help
Enable "help mode": outputs this message then exits.
Expand Down Expand Up @@ -70,7 +67,8 @@ public static function showHelp() {
App Configuration:
--app-dir=<path to project app directory> (optional)
The directory where this script will look for the "bin-common.php" file and "data/mysql" sub-directory.
EOT;
HELP;
echo str_replace("\n",\PHP_EOL,$help).\PHP_EOL;
}

/**
Expand Down
5 changes: 3 additions & 2 deletions bin/db-install.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ public static function showUsage() {
}

public static function showHelp() {
echo self::HELP_LABEL."\n";
echo self::HELP_LABEL.PHP_EOL;
$fallbackDbname = self::FALLBACK_DBNAME;
$fallbackHost = self::FALLBACK_HOST;
$fallbackUsername = self::FALLBACK_USERNAME;
echo <<<"EOT"
$help=<<<"EOT"
Output Control:
--help
Enable "help mode": outputs this message then exits.
Expand Down Expand Up @@ -83,6 +83,7 @@ public static function showHelp() {
PDO Data Source Name string
See: http://php.net/manual/en/pdo.construct.php
EOT;
echo str_replace("\n",\PHP_EOL,$help).\PHP_EOL;
}

/**
Expand Down

0 comments on commit 2807fa5

Please sign in to comment.