*
* @author Roland Haeder <webmaster@shipsimu.org>
* @version 0.0.0
- * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2021 Core Developer Team
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2022 Core Developer Team
* @license GNU GPL 3.0 or any newer version
* @link http://www.shipsimu.org
*
* @throws UnsupportedOperationException Objects of this framework cannot be serialized
*/
public final function __sleep () {
- throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION);
+ throw new UnsupportedOperationException([$this, __FUNCTION__], self::EXCEPTION_UNSPPORTED_OPERATION);
}
/**
* @throws UnsupportedOperationException Objects of this framework cannot be serialized
*/
public final function __wakeup () {
- throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION);
+ throw new UnsupportedOperationException([$this, __FUNCTION__], self::EXCEPTION_UNSPPORTED_OPERATION);
}
/**
* @throws UnsupportedOperationException Objects of this framework cannot be serialized
*/
public final function __invoke () {
- throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION);
+ throw new UnsupportedOperationException([$this, __FUNCTION__], self::EXCEPTION_UNSPPORTED_OPERATION);
}
/**
));
}
- /**
- * Replaces control characters with printable output
- *
- * @param $str String with control characters
- * @return $str Replaced string
- */
- protected function replaceControlCharacters (string $str) {
- // Replace them
- $str = str_replace(
- chr(13), '[r]', str_replace(
- chr(10), '[n]', str_replace(
- chr(9) , '[t]',
- $str
- )));
-
- // Return it
- return $str;
- }
-
/**
* Output a partial stub message for the caller method
*
* @param $keyGroup Main group for the key
* @return $count Count of given group
*/
- protected final function countGenericArray ($keyGroup) {
+ protected final function countGenericArray (string $keyGroup) {
// Debug message
//* NOISY-DEBUG: */ $this->outputLine('[' . __METHOD__ . ':' . __LINE__ . '] keyGroup=' . $keyGroup);
* @param $keyGroup Key group to get
* @return $array Whole generic array group
*/
- protected final function getGenericArray ($keyGroup) {
+ protected final function getGenericArray (string $keyGroup) {
// Debug message
//* NOISY-DEBUG: */ $this->outputLine('[' . __METHOD__ . ':' . __LINE__ . '] keyGroup=' . $keyGroup);
* @return $translated Translated boolean value
*/
public static final function translateBooleanToYesNo (bool $boolean) {
- // Make sure it is really boolean
- assert(is_bool($boolean));
-
// "Translate" it
$translated = ($boolean === true) ? 'Y' : 'N';