X-Git-Url: https://git.mxchange.org/?p=core.git;a=blobdiff_plain;f=inc%2Fclasses%2Fmain%2Fclass_BaseFrameworkSystem.php;h=d142efb106a7f0f90c2dd6bad8c6c091a388fff8;hp=fcd7dab773ce99d083c2f8a8309fdd7689a6cbb0;hb=f97af6b5b50bc961ec5ad850b73765d64811a5bc;hpb=768cc231b262ebeaa5aec373d9b7d97cc6b6ac95 diff --git a/inc/classes/main/class_BaseFrameworkSystem.php b/inc/classes/main/class_BaseFrameworkSystem.php index fcd7dab7..d142efb1 100644 --- a/inc/classes/main/class_BaseFrameworkSystem.php +++ b/inc/classes/main/class_BaseFrameworkSystem.php @@ -169,12 +169,12 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface { private $wrapperInstance = NULL; /** - * Thousands seperator + * Thousands separator */ private $thousands = '.'; // German /** - * Decimal seperator + * Decimal separator */ private $decimals = ','; // German @@ -364,10 +364,19 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface { // Add the type $argsString .= $this->replaceControlCharacters($arg) . ' (' . gettype($arg); - // Add length if type is string if (is_string($arg)) { + // Add length for strings $argsString .= ', '.strlen($arg); - } // END - if + } elseif (is_array($arg)) { + // .. or size if array + $argsString .= ', '.count($arg); + } elseif ($arg === true) { + // ... is boolean 'true' + $argsString .= ', true'; + } elseif ($arg === false) { + // ... is boolean 'true' + $argsString .= ', false'; + } // Closing bracket $argsString .= '), '; @@ -748,21 +757,21 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface { /** * Formats computer generated price values into human-understandable formats - * with thousand and decimal seperators. + * with thousand and decimal separators. * * @param $value The in computer format value for a price * @param $currency The currency symbol (use HTML-valid characters!) * @param $decNum Number of decimals after commata * @return $price The for the current language formated price string - * @throws MissingDecimalsThousandsSeperatorException If decimals or - * thousands seperator + * @throws MissingDecimalsThousandsSeparatorException If decimals or + * thousands separator * is missing */ public function formatCurrency ($value, $currency = '€', $decNum = 2) { // Are all required attriutes set? if ((!isset($this->decimals)) || (!isset($this->thousands))) { // Throw an exception - throw new MissingDecimalsThousandsSeperatorException($this, self::EXCEPTION_ATTRIBUTES_ARE_MISSING); + throw new MissingDecimalsThousandsSeparatorException($this, self::EXCEPTION_ATTRIBUTES_ARE_MISSING); } // END - if // Cast the number