Remove all the {{{ and }}} folding

This commit is contained in:
2022-11-25 20:34:27 +01:00
parent b723f47a44
commit 2d6df0d5f0
35 changed files with 0 additions and 1124 deletions

View File

@@ -41,19 +41,16 @@ class Getopts
/** The constructor check the availability of the MB module
*/
public function __construct ()
// {{{
{
if (! function_exists ("mb_strlen"))
throw new \Exception ("PHP don't have the MB Support. Please add it !",
500);
}
// }}}
/** Set/Get the simulate value
* @param string|null $simulate The simulate to get/set
*/
public function simulate ($simulate = null)
// {{{
{
if ($simulate === null)
return $this->simulate;
@@ -65,7 +62,6 @@ class Getopts
$this->simulate = $simulate;
return $this;
}
// }}}
/** Add a new option to check
* @param string $identifier The identifier of the options
@@ -81,7 +77,6 @@ class Getopts
*/
public function add ($identifier, $short, $long, $description,
$paramName = "", $multiple = 0)
// {{{
{
if (! is_string ($identifier))
throw new \Exception ("Identifier provided to getopts is not a string",
@@ -210,7 +205,6 @@ class Getopts
"multiple" => $multiple);
return $this;
}
// }}}
/** Scan the command line and fill the parameters.
* Use the simulate line if provided or use the $argv if not
@@ -218,7 +212,6 @@ class Getopts
* @return $this;
*/
public function scan ()
// {{{
{
global $argv;
if ($argv === null)
@@ -450,7 +443,6 @@ class Getopts
$this->parameters = array ();
return $this;
}
// }}}
/** Get the value of the option if set in the command line. If simulate is
* defined, use it.
@@ -462,7 +454,6 @@ class Getopts
* @param string $identifier The identifier option to get
*/
public function get ($identifier)
// {{{
{
$exists = false;
foreach ($this->options as $opt)
@@ -484,34 +475,28 @@ class Getopts
return array ();
return false;
}
// }}}
/** Get the value found in the rest of line (after the double dashes)
*/
public function restOfLine ()
// {{{
{
if ($this->restOfLine === null)
$this->scan ();
return $this->restOfLine;
}
// }}}
/** Get the name of the program found in the command line
*/
public function programName ()
// {{{
{
if ($this->programName === null)
$this->scan ();
return $this->programName;
}
// }}}
/** Get the Help message with all the descriptions and options
*/
public function help ()
// {{{
{
if (count ($this->options) === 0)
return dgettext ("domframework", "No option defined")."\n";
@@ -549,5 +534,4 @@ class Getopts
}
return $d;
}
// }}}
}