aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/vendor/splitbrain/php-cli
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2018-04-13 08:37:14 +0200
committerAndreas Gohr <andi@splitbrain.org>2018-04-13 08:37:14 +0200
commit43d3f077ff275484c96c5da0d5066a80938f2cb3 (patch)
tree47450e6ad7fafdba2e8e297fa8dbb0afcdd5a7c4 /vendor/splitbrain/php-cli
parentb2c9cd19ff3733a632c8d415256d3096765343f7 (diff)
downloaddokuwiki-43d3f077ff275484c96c5da0d5066a80938f2cb3.tar.gz
dokuwiki-43d3f077ff275484c96c5da0d5066a80938f2cb3.zip
updated composer dependencies
Diffstat (limited to 'vendor/splitbrain/php-cli')
-rw-r--r--vendor/splitbrain/php-cli/README.md2
-rw-r--r--vendor/splitbrain/php-cli/src/CLI.php6
-rw-r--r--vendor/splitbrain/php-cli/src/Colors.php8
-rw-r--r--vendor/splitbrain/php-cli/src/Options.php4
-rw-r--r--vendor/splitbrain/php-cli/src/TableFormatter.php2
5 files changed, 17 insertions, 5 deletions
diff --git a/vendor/splitbrain/php-cli/README.md b/vendor/splitbrain/php-cli/README.md
index 3359be722..7cc52ed81 100644
--- a/vendor/splitbrain/php-cli/README.md
+++ b/vendor/splitbrain/php-cli/README.md
@@ -65,7 +65,7 @@ The basic usage is simple:
- ``$options->setHelp()`` adds a general description
- ``$options->registerOption()`` adds an option
- ``$options->registerArgument()`` adds an argument
- - ``$options->registerComman()`` adds a sub command
+ - ``$options->registerCommand()`` adds a sub command
- implement the ```main($options)``` method and do your business logic there
- ``$options->getOpts`` lets you access set options
- ``$options->getArgs()`` returns the remaining arguments after removing the options
diff --git a/vendor/splitbrain/php-cli/src/CLI.php b/vendor/splitbrain/php-cli/src/CLI.php
index c48207af6..569ec6756 100644
--- a/vendor/splitbrain/php-cli/src/CLI.php
+++ b/vendor/splitbrain/php-cli/src/CLI.php
@@ -56,6 +56,8 @@ abstract class CLI
*
* @param Options $options
* @return void
+ *
+ * @throws Exception
*/
abstract protected function setup(Options $options);
@@ -66,6 +68,8 @@ abstract class CLI
*
* @param Options $options
* @return void
+ *
+ * @throws Exception
*/
abstract protected function main(Options $options);
@@ -74,6 +78,8 @@ abstract class CLI
*
* Executes the setup() routine, adds default options, initiate the options parsing and argument checking
* and finally executes main()
+ *
+ * @throws Exception
*/
public function run()
{
diff --git a/vendor/splitbrain/php-cli/src/Colors.php b/vendor/splitbrain/php-cli/src/Colors.php
index 65cfe9521..ae252566e 100644
--- a/vendor/splitbrain/php-cli/src/Colors.php
+++ b/vendor/splitbrain/php-cli/src/Colors.php
@@ -99,9 +99,11 @@ class Colors
/**
* Convenience function to print a line in a given color
*
- * @param string $line the line to print, a new line is added automatically
- * @param string $color one of the available color names
+ * @param string $line the line to print, a new line is added automatically
+ * @param string $color one of the available color names
* @param resource $channel file descriptor to write to
+ *
+ * @throws Exception
*/
public function ptln($line, $color, $channel = STDOUT)
{
@@ -158,6 +160,8 @@ class Colors
* reset the terminal color
*
* @param resource $channel file descriptor to write to
+ *
+ * @throws Exception
*/
public function reset($channel = STDOUT)
{
diff --git a/vendor/splitbrain/php-cli/src/Options.php b/vendor/splitbrain/php-cli/src/Options.php
index 919dd9310..4d8b44deb 100644
--- a/vendor/splitbrain/php-cli/src/Options.php
+++ b/vendor/splitbrain/php-cli/src/Options.php
@@ -285,7 +285,7 @@ class Options
*
* @param mixed $option
* @param bool|string $default what to return if the option was not set
- * @return bool|string
+ * @return bool|string|string[]
*/
public function getOpt($option = null, $default = false)
{
@@ -325,6 +325,8 @@ class Options
* Builds a help screen from the available options. You may want to call it from -h or on error
*
* @return string
+ *
+ * @throws Exception
*/
public function help()
{
diff --git a/vendor/splitbrain/php-cli/src/TableFormatter.php b/vendor/splitbrain/php-cli/src/TableFormatter.php
index 66b393a85..73fd6b36e 100644
--- a/vendor/splitbrain/php-cli/src/TableFormatter.php
+++ b/vendor/splitbrain/php-cli/src/TableFormatter.php
@@ -39,7 +39,7 @@ class TableFormatter
$width = @exec('tput cols');
}
if ($width) {
- $this->max = $width;
+ $this->max = $width - 1;
}
if ($colors) {