From: Roland Häder Date: Fri, 31 May 2013 20:03:19 +0000 (+0000) Subject: Made lower to upper case: X-Git-Url: https://git.mxchange.org/?p=core.git;a=commitdiff_plain;h=f5cf5211620c1813c76d8231819b63a585fb2689 Made lower to upper case: - NULL - FALSE - TRUE As these are constants and the lower-case varriants are keywords --- diff --git a/inc/classes/interfaces/debug/class_Debugger.php b/inc/classes/interfaces/debug/class_Debugger.php index 5fd54f37..097e0579 100644 --- a/inc/classes/interfaces/debug/class_Debugger.php +++ b/inc/classes/interfaces/debug/class_Debugger.php @@ -29,7 +29,7 @@ interface Debugger extends FrameworkInterface { * @param $stripTags Whether HTML tags shall be stripped out * @return void */ - function outputStream ($output, $stripTags = false); + function outputStream ($output, $stripTags = FALSE); } // [EOF] diff --git a/inc/classes/interfaces/io/output/class_OutputStreamer.php b/inc/classes/interfaces/io/output/class_OutputStreamer.php index b3416573..8bdbd214 100644 --- a/inc/classes/interfaces/io/output/class_OutputStreamer.php +++ b/inc/classes/interfaces/io/output/class_OutputStreamer.php @@ -29,7 +29,7 @@ interface OutputStreamer extends Streamable { * @param $stripTags Whether HTML tags shall be stripped out * @return void */ - function output ($outStream = false, $stripTags = false); + function output ($outStream = FALSE, $stripTags = FALSE); } // [EOF] diff --git a/inc/classes/interfaces/request/class_Requestable.php b/inc/classes/interfaces/request/class_Requestable.php index 97a5784c..86837c84 100644 --- a/inc/classes/interfaces/request/class_Requestable.php +++ b/inc/classes/interfaces/request/class_Requestable.php @@ -68,7 +68,7 @@ interface Requestable extends FrameworkInterface { * @param $isValid Whether the request is valid * @return void */ - function requestIsValid ($isValid = true); + function requestIsValid ($isValid = TRUE); /** * Reads a cookie and returns it's value or null if not found diff --git a/inc/classes/interfaces/response/class_Responseable.php b/inc/classes/interfaces/response/class_Responseable.php index 87b427c1..46a51148 100644 --- a/inc/classes/interfaces/response/class_Responseable.php +++ b/inc/classes/interfaces/response/class_Responseable.php @@ -60,7 +60,7 @@ interface Responseable extends FrameworkInterface { * @throws ResponseHeadersAlreadySentException Thrown if headers are * already sent */ - function flushBuffer ($force = false); + function flushBuffer ($force = FALSE); /** * Adds a fatal message id to the response. The added messages can then be @@ -80,7 +80,7 @@ interface Responseable extends FrameworkInterface { * @return void * @throws ResponseHeadersAlreadySentException If headers are already sent */ - function addCookie ($cookieName, $cookieValue, $encrypted = false); + function addCookie ($cookieName, $cookieValue, $encrypted = FALSE); /** * Redirect to a configured URL. The URL can be absolute or relative. In diff --git a/inc/classes/interfaces/template/class_CompileableTemplate.php b/inc/classes/interfaces/template/class_CompileableTemplate.php index cf982f62..64171319 100644 --- a/inc/classes/interfaces/template/class_CompileableTemplate.php +++ b/inc/classes/interfaces/template/class_CompileableTemplate.php @@ -158,7 +158,7 @@ interface CompileableTemplate extends FrameworkInterface { * @param $languageSupport New language support setting * @return void */ - function enableLanguageSupport ($languageSupport = true); + function enableLanguageSupport ($languageSupport = TRUE); /** * Checks whether language support is enabled @@ -173,7 +173,7 @@ interface CompileableTemplate extends FrameworkInterface { * @param $xmlCompacting New XML compacting setting * @return void */ - function enableXmlCompacting ($xmlCompacting = true); + function enableXmlCompacting ($xmlCompacting = TRUE); /** * Checks whether XML compacting is enabled diff --git a/inc/classes/main/class_BaseFrameworkSystem.php b/inc/classes/main/class_BaseFrameworkSystem.php index 6c7eb5d2..4d354301 100644 --- a/inc/classes/main/class_BaseFrameworkSystem.php +++ b/inc/classes/main/class_BaseFrameworkSystem.php @@ -186,7 +186,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface { /** * Socket resource */ - private $socketResource = false; + private $socketResource = FALSE; /** * Package data @@ -395,10 +395,10 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface { } elseif (is_array($arg)) { // .. or size if array $argsString .= ', ' . count($arg); - } elseif ($arg === true) { + } elseif ($arg === TRUE) { // ... is boolean 'true' $argsString .= ', true'; - } elseif ($arg === false) { + } elseif ($arg === FALSE) { // ... is boolean 'true' $argsString .= ', false'; } @@ -1424,7 +1424,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface { print(''); // Exit program? - if ($doExit === true) { + if ($doExit === TRUE) { exit(); } // END - if } @@ -1465,7 +1465,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface { * @paran $stripTags Whether to strip tags (default: false) * @return void */ - public function debugOutput ($message, $doPrint = true, $stripTags = false) { + public function debugOutput ($message, $doPrint = TRUE, $stripTags = FALSE) { // Set debug instance to NULL $debugInstance = NULL; @@ -1482,7 +1482,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface { // Use debug output handler $debugInstance->output($message, $stripTags); - if ($doPrint === false) { + if ($doPrint === FALSE) { // Die here if not printed exit(); } // END - if @@ -1494,7 +1494,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface { } // END - if // Put directly out - if ($doPrint === true) { + if ($doPrint === TRUE) { // Print message print($message . chr(10)); } else { @@ -1663,7 +1663,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface { $this->getResultInstance()->rewind(); // Do we have an entry? - if ($this->getResultInstance()->valid() === false) { + if ($this->getResultInstance()->valid() === FALSE) { throw new InvalidDatabaseResultException(array($this, $this->getResultInstance()), DatabaseResult::EXCEPTION_INVALID_DATABASE_RESULT); } // END - if @@ -1798,7 +1798,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface { */ public function idle ($milliSeconds) { // Sleep is fine by default - $hasSlept = true; + $hasSlept = TRUE; // Idle so long with found function if (function_exists('time_sleep_until')) { @@ -1964,7 +1964,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface { */ protected function isBase64Encoded ($encodedData) { // Determine it - $isBase64 = (@base64_decode($encodedData, true) !== false); + $isBase64 = (@base64_decode($encodedData, true) !== FALSE); // Return it return $isBase64; @@ -2055,18 +2055,18 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface { * @param $assertMismatch Whether to assert mismatches * @return $ret The (hopefully) secured numbered value */ - public function bigintval ($num, $castValue = true, $assertMismatch = false) { + public function bigintval ($num, $castValue = TRUE, $assertMismatch = FALSE) { // Filter all numbers out $ret = preg_replace('/[^0123456789]/', '', $num); // Shall we cast? - if ($castValue === true) { + if ($castValue === TRUE) { // Cast to biggest numeric type $ret = (double) $ret; } // END - if // Assert only if requested - if ($assertMismatch === true) { + if ($assertMismatch === TRUE) { // Has the whole value changed? assert(('' . $ret . '' != '' . $num . '') && (!is_null($num))); } // END - if @@ -2082,12 +2082,12 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface { * @param $assertMismatch Whether to assert mismatches * @return $ret The (hopefully) secured hext-numbered value */ - public function hexval ($num, $assertMismatch = false) { + public function hexval ($num, $assertMismatch = FALSE) { // Filter all numbers out $ret = preg_replace('/[^0123456789abcdefABCDEF]/', '', $num); // Assert only if requested - if ($assertMismatch === true) { + if ($assertMismatch === TRUE) { // Has the whole value changed? assert(('' . $ret . '' != '' . $num . '') && (!is_null($num))); } // END - if diff --git a/inc/classes/main/console/class_ConsoleTools.php b/inc/classes/main/console/class_ConsoleTools.php index 028009f9..4d220d71 100644 --- a/inc/classes/main/console/class_ConsoleTools.php +++ b/inc/classes/main/console/class_ConsoleTools.php @@ -59,7 +59,7 @@ class ConsoleTools extends BaseFrameworkSystem { $ipResolved = gethostbyname($hostname); // Was it fine? - if (($ipResolved !== false) && ($ipResolved != $hostname)) { + if (($ipResolved !== FALSE) && ($ipResolved != $hostname)) { // Okay, this works! $ip = $ipResolved; @@ -276,7 +276,7 @@ class ConsoleTools extends BaseFrameworkSystem { // @TODO Add some DNS caching here // Open connection - if ($helperInstance->isProxyUsed() === true) { + if ($helperInstance->isProxyUsed() === TRUE) { // Resolve hostname into IP address $ip = $helperInstance->resolveIpAddress($helperInstance->getConfigInstance()->getConfigEntry('proxy_host')); @@ -294,13 +294,13 @@ class ConsoleTools extends BaseFrameworkSystem { } // END - if // Prepare the GET request - $request = 'GET ' . ($helperInstance->isProxyUsed() === true ? 'http://ship-simu.org' : '') . '/ip.php HTTP/1.0' . self::HTTP_EOL; + $request = 'GET ' . ($helperInstance->isProxyUsed() === TRUE ? 'http://ship-simu.org' : '') . '/ip.php HTTP/1.0' . self::HTTP_EOL; $request .= 'Host: ship-simu.org' . self::HTTP_EOL; $request .= 'User-Agent: ' . self::HTTP_USER_AGENT . self::HTTP_EOL; $request .= 'Connection: close' . self::HTTP_EOL; // Do we use proxy? - if ($helperInstance->isProxyUsed() === true) { + if ($helperInstance->isProxyUsed() === TRUE) { // CONNECT method? if ($helperInstance->getConfigInstance()->getConfigEntry('proxy_connect_method') == 'Y') { // Setup proxy tunnel diff --git a/inc/classes/main/criteria/class_BaseCriteria.php b/inc/classes/main/criteria/class_BaseCriteria.php index da807125..cbf192d3 100644 --- a/inc/classes/main/criteria/class_BaseCriteria.php +++ b/inc/classes/main/criteria/class_BaseCriteria.php @@ -293,7 +293,7 @@ class BaseCriteria extends BaseFrameworkSystem implements Criteria { */ public function ifEntryMatches (array $entryArray, $criteriaType = 'default') { // First nothing matches and nothing is counted - $matches = false; + $matches = FALSE; $counted = 0; // Walk through all entries diff --git a/inc/classes/main/crypto/class_CryptoHelper.php b/inc/classes/main/crypto/class_CryptoHelper.php index 7fc481d4..56c1319c 100644 --- a/inc/classes/main/crypto/class_CryptoHelper.php +++ b/inc/classes/main/crypto/class_CryptoHelper.php @@ -163,7 +163,7 @@ class CryptoHelper extends BaseFrameworkSystem implements Cryptable { * @param $withFixed Whether to include a fixed salt (not recommended in p2p applications) * @return $hashed The hashed and salted string */ - public function hashString ($str, $oldHash = '', $withFixed = true) { + public function hashString ($str, $oldHash = '', $withFixed = TRUE) { // Cast the string $str = (string) $str; @@ -181,7 +181,7 @@ class CryptoHelper extends BaseFrameworkSystem implements Cryptable { // Hash the password with salt //* DEBUG: */ echo "salt=".$salt."/plain=".$str."
\n"; - if ($withFixed === true) { + if ($withFixed === TRUE) { // Use additional fixed salt $hashed = $salt . md5(sprintf($this->getConfigInstance()->getConfigEntry('hash_extra_mask'), $salt, diff --git a/inc/classes/main/database/databases/class_LocalFileDatabase.php b/inc/classes/main/database/databases/class_LocalFileDatabase.php index efc67c3e..1bb31f4d 100644 --- a/inc/classes/main/database/databases/class_LocalFileDatabase.php +++ b/inc/classes/main/database/databases/class_LocalFileDatabase.php @@ -46,7 +46,7 @@ class LocalFileDatabase extends BaseDatabaseBackend implements DatabaseBackendIn /** * Whether the "connection is already up */ - private $alreadyConnected = false; + private $alreadyConnected = FALSE; /** * Table information array diff --git a/inc/classes/main/debug/class_DebugConsoleOutput.php b/inc/classes/main/debug/class_DebugConsoleOutput.php index ed74c513..1c04fd78 100644 --- a/inc/classes/main/debug/class_DebugConsoleOutput.php +++ b/inc/classes/main/debug/class_DebugConsoleOutput.php @@ -52,9 +52,9 @@ class DebugConsoleOutput extends BaseFrameworkSystem implements Debugger, Output * @param $stripTags Whether HTML tags shall be stripped out * @return void */ - public final function outputStream ($output, $stripTags = false) { + public final function outputStream ($output, $stripTags = FALSE) { // Strip HTML tags out? - if ($stripTags === true) { + if ($stripTags === TRUE) { // Prepare the output without HTML tags $output = trim(html_entity_decode(strip_tags(stripslashes($output)))); } else { @@ -79,9 +79,9 @@ class DebugConsoleOutput extends BaseFrameworkSystem implements Debugger, Output * @param $stripTags Whether HTML tags shall be stripped out * @return void */ - public final function output ($outStream = false, $stripTags = false) { + public final function output ($outStream = FALSE, $stripTags = FALSE) { // Empty output will be silently ignored - if ($outStream !== false) { + if ($outStream !== FALSE) { $this->outputStream($outStream, $stripTags); } // END - if } diff --git a/inc/classes/main/debug/class_DebugErrorLogOutput.php b/inc/classes/main/debug/class_DebugErrorLogOutput.php index 2baf7917..1db4ae20 100644 --- a/inc/classes/main/debug/class_DebugErrorLogOutput.php +++ b/inc/classes/main/debug/class_DebugErrorLogOutput.php @@ -52,7 +52,7 @@ class DebugErrorLogOutput extends BaseFrameworkSystem implements Debugger, Outpu * @param $stripTags Whether HTML tags shall be stripped out * @return void */ - public final function outputStream ($output, $stripTags = false) { + public final function outputStream ($output, $stripTags = FALSE) { // Split multiple lines into and array to put them out line-by-line $errorLines = explode(chr(10), $output); @@ -76,9 +76,9 @@ class DebugErrorLogOutput extends BaseFrameworkSystem implements Debugger, Outpu * @param $stripTags Whether HTML tags shall be stripped out * @return void */ - public final function output ($outStream = false, $stripTags = false) { + public final function output ($outStream = FALSE, $stripTags = FALSE) { // Empty output will be silently ignored - if ($outStream !== false) { + if ($outStream !== FALSE) { $this->outputStream($outStream); } } diff --git a/inc/classes/main/debug/class_DebugWebOutput.php b/inc/classes/main/debug/class_DebugWebOutput.php index cfa8788a..7ffe5b55 100644 --- a/inc/classes/main/debug/class_DebugWebOutput.php +++ b/inc/classes/main/debug/class_DebugWebOutput.php @@ -52,7 +52,7 @@ class DebugWebOutput extends BaseFrameworkSystem implements Debugger, OutputStre * @param $stripTags Whether HTML tags shall be stripped out * @return void */ - public final function outputStream ($output, $stripTags = false) { + public final function outputStream ($output, $stripTags = FALSE) { // Strip out
$output = str_replace("
", '', $output); print(stripslashes($output)."
\n"); @@ -65,9 +65,9 @@ class DebugWebOutput extends BaseFrameworkSystem implements Debugger, OutputStre * @param $stripTags Whether HTML tags shall be stripped out * @return void */ - public final function output ($outStream = false, $stripTags = false) { + public final function output ($outStream = FALSE, $stripTags = FALSE) { // Empty output will be silently ignored - if ($outStream !== false) { + if ($outStream !== FALSE) { $this->outputStream($outStream, $stripTags); } // END - if } diff --git a/inc/classes/main/decorator/template/class_XmlRewriterTemplateDecorator.php b/inc/classes/main/decorator/template/class_XmlRewriterTemplateDecorator.php index f8210271..46fb179f 100644 --- a/inc/classes/main/decorator/template/class_XmlRewriterTemplateDecorator.php +++ b/inc/classes/main/decorator/template/class_XmlRewriterTemplateDecorator.php @@ -57,7 +57,7 @@ class XmlRewriterTemplateDecorator extends BaseDecorator implements CompileableT * @param $add Whether add this group * @return void */ - public function setVariableGroup ($groupName, $add = true) { + public function setVariableGroup ($groupName, $add = TRUE) { // Call the inner class' method $this->getTemplateInstance()->setVariableGroup($groupName, $add); } @@ -355,7 +355,7 @@ class XmlRewriterTemplateDecorator extends BaseDecorator implements CompileableT * @param $languageSupport New language support setting * @return void */ - public final function enableLanguageSupport ($languageSupport = true) { + public final function enableLanguageSupport ($languageSupport = TRUE) { // Call the inner class' method $this->getTemplateInstance()->enableLanguageSupport($languageSupport); } @@ -376,7 +376,7 @@ class XmlRewriterTemplateDecorator extends BaseDecorator implements CompileableT * @param $xmlCompacting New XML compacting setting * @return void */ - public final function enableXmlCompacting ($xmlCompacting = true) { + public final function enableXmlCompacting ($xmlCompacting = TRUE) { // Call the inner class' method $this->getTemplateInstance()->enableXmlCompacting($xmlCompacting); } diff --git a/inc/classes/main/filter/validator/class_EmailValidatorFilter.php b/inc/classes/main/filter/validator/class_EmailValidatorFilter.php index 05e095ec..99c2291c 100644 --- a/inc/classes/main/filter/validator/class_EmailValidatorFilter.php +++ b/inc/classes/main/filter/validator/class_EmailValidatorFilter.php @@ -133,7 +133,7 @@ class EmailValidatorFilter extends BaseFilter implements Filterable { */ private function ifEmailIsTaken ($email) { // Default is already taken - $alreadyTaken = true; + $alreadyTaken = TRUE; // Initialize instance $userInstance = NULL; @@ -155,9 +155,9 @@ class EmailValidatorFilter extends BaseFilter implements Filterable { } // Does the email exist? - if ($userInstance->ifEmailAddressExists() === false) { + if ($userInstance->ifEmailAddressExists() === FALSE) { // This email has not being used yet - $alreadyTaken = false; + $alreadyTaken = FALSE; } // Return the result diff --git a/inc/classes/main/filter/validator/class_UserNameValidatorFilter.php b/inc/classes/main/filter/validator/class_UserNameValidatorFilter.php index 4eef9f92..305db340 100644 --- a/inc/classes/main/filter/validator/class_UserNameValidatorFilter.php +++ b/inc/classes/main/filter/validator/class_UserNameValidatorFilter.php @@ -98,7 +98,7 @@ class UserNameValidatorFilter extends BaseFilter implements Filterable { */ private function ifUserNameIsTaken ($userName) { // Default is already taken - $alreadyTaken = true; + $alreadyTaken = TRUE; // Initialize instance $userInstance = NULL; @@ -126,9 +126,9 @@ class UserNameValidatorFilter extends BaseFilter implements Filterable { } // Does the username exist? - if ((is_null($userInstance)) || ($userInstance->ifUsernameExists() === false)) { + if ((is_null($userInstance)) || ($userInstance->ifUsernameExists() === FALSE)) { // This username is still available - $alreadyTaken = false; + $alreadyTaken = FALSE; } // END - if // Return the result diff --git a/inc/classes/main/filter/verifier/class_UserGuestVerifierFilter.php b/inc/classes/main/filter/verifier/class_UserGuestVerifierFilter.php index 4afad3ce..126073ef 100644 --- a/inc/classes/main/filter/verifier/class_UserGuestVerifierFilter.php +++ b/inc/classes/main/filter/verifier/class_UserGuestVerifierFilter.php @@ -78,7 +78,7 @@ class UserGuestVerifierFilter extends BaseFilter implements Filterable { // Abort here throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED); - } elseif ($this->ifUserGuestIsTaken($userName) === false) { + } elseif ($this->ifUserGuestIsTaken($userName) === FALSE) { // Username is already taken $requestInstance->requestIsValid(false); @@ -101,7 +101,7 @@ class UserGuestVerifierFilter extends BaseFilter implements Filterable { */ private function ifUserGuestIsTaken ($userName) { // Default is already taken - $alreadyTaken = true; + $alreadyTaken = TRUE; // Initialize instance $userInstance = NULL; @@ -128,9 +128,9 @@ class UserGuestVerifierFilter extends BaseFilter implements Filterable { } // Does the username exist? - if ((is_null($userInstance)) || ($userInstance->ifUsernameExists() === false)) { + if ((is_null($userInstance)) || ($userInstance->ifUsernameExists() === FALSE)) { // This username is still available - $alreadyTaken = false; + $alreadyTaken = FALSE; } // Return the result diff --git a/inc/classes/main/filter/verifier/class_UserNameVerifierFilter.php b/inc/classes/main/filter/verifier/class_UserNameVerifierFilter.php index e3f5f2de..f82a0632 100644 --- a/inc/classes/main/filter/verifier/class_UserNameVerifierFilter.php +++ b/inc/classes/main/filter/verifier/class_UserNameVerifierFilter.php @@ -78,7 +78,7 @@ class UserNameVerifierFilter extends BaseFilter implements Filterable { // Abort here throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED); - } elseif ($this->ifUserNameIsTaken($userName) === false) { + } elseif ($this->ifUserNameIsTaken($userName) === FALSE) { // Username is already taken $requestInstance->requestIsValid(false); @@ -98,7 +98,7 @@ class UserNameVerifierFilter extends BaseFilter implements Filterable { */ private function ifUserNameIsTaken ($userName) { // Default is already taken - $alreadyTaken = true; + $alreadyTaken = TRUE; // Initialize instance $userInstance = NULL; @@ -125,9 +125,9 @@ class UserNameVerifierFilter extends BaseFilter implements Filterable { } // Does the username exist? - if ((is_null($userInstance)) || ($userInstance->ifUsernameExists() === false)) { + if ((is_null($userInstance)) || ($userInstance->ifUsernameExists() === FALSE)) { // This username is still available - $alreadyTaken = false; + $alreadyTaken = FALSE; } // END - if // Return the result diff --git a/inc/classes/main/filter/verifier/class_UserUnconfirmedVerifierFilter.php b/inc/classes/main/filter/verifier/class_UserUnconfirmedVerifierFilter.php index 66457613..9d341194 100644 --- a/inc/classes/main/filter/verifier/class_UserUnconfirmedVerifierFilter.php +++ b/inc/classes/main/filter/verifier/class_UserUnconfirmedVerifierFilter.php @@ -60,7 +60,7 @@ class UserUnconfirmedVerifierFilter extends BaseFilter implements Filterable { $userInstance = call_user_func_array(array($userClass, 'createMemberByRequest'), array($requestInstance)); // Is the email address valid? - if ($userInstance->ifEmailAddressExists() === false) { + if ($userInstance->ifEmailAddressExists() === FALSE) { // Request is invalid! $requestInstance->requestIsValid(false); diff --git a/inc/classes/main/helper/class_BaseHelper.php b/inc/classes/main/helper/class_BaseHelper.php index 0b7e06ad..6276b51a 100644 --- a/inc/classes/main/helper/class_BaseHelper.php +++ b/inc/classes/main/helper/class_BaseHelper.php @@ -251,7 +251,7 @@ class BaseHelper extends BaseFrameworkSystem { // Add the group to the stack $this->groups[$this->totalCounter] = $groupId; - $this->groups[$groupId]['opened'] = true; + $this->groups[$groupId]['opened'] = TRUE; $this->groups[$groupId]['content'] = sprintf( "%s\n", $groupId, @@ -281,7 +281,7 @@ class BaseHelper extends BaseFrameworkSystem { } // END - if // Check if any group was opened before - if ($this->ifGroupOpenedPreviously() === false) { + if ($this->ifGroupOpenedPreviously() === FALSE) { // Then throw an exception throw new HelperNoPreviousOpenedGroupException(array($this, $content), self::EXCEPTION_NO_PREVIOUS_SUB_GROUP_OPENED); } // END - if @@ -307,7 +307,7 @@ class BaseHelper extends BaseFrameworkSystem { $this->groups[$groupId]['tag'], $content ); - $this->groups[$groupId]['opened'] = false; + $this->groups[$groupId]['opened'] = FALSE; // Mark previous group as closed $this->setPreviousGroupId(''); @@ -338,7 +338,7 @@ class BaseHelper extends BaseFrameworkSystem { // Add the group to the stack $this->subGroups[$this->totalCounter] = $subGroupId; - $this->subGroups[$subGroupId]['opened'] = true; + $this->subGroups[$subGroupId]['opened'] = TRUE; $this->subGroups[$subGroupId]['content'] = sprintf("%s\n", $subGroupId, strlen($content), $tag, $content); $this->subGroups[$subGroupId]['tag'] = $tag; @@ -356,7 +356,7 @@ class BaseHelper extends BaseFrameworkSystem { */ public function closePreviousSubGroupByContent ($content = '') { // Check if any sub group was opened before - if ($this->ifSubGroupOpenedPreviously() === false) { + if ($this->ifSubGroupOpenedPreviously() === FALSE) { // Then throw an exception throw new HelperNoPreviousOpenedSubGroupException(array($this, $content), self::EXCEPTION_NO_PREVIOUS_SUB_GROUP_OPENED); } // END - if @@ -372,7 +372,8 @@ class BaseHelper extends BaseFrameworkSystem { // Add content to it and mark it as closed $this->subGroups[$subGroupId]['content'] .= sprintf("%s\n", $subGroupId, strlen($content), $this->subGroups[$subGroupId]['tag'], $content); - $this->subGroups[$subGroupId]['opened'] = false; + $this->subGroups[$subGroupId]['opened'] = FALSE + ; // Mark previous sub group as closed $this->setPreviousSubGroupId(''); @@ -400,12 +401,12 @@ class BaseHelper extends BaseFrameworkSystem { // Now "walk" through all groups and sub-groups for ($idx = 1; $idx <= $this->totalCounter; $idx++) { // Is this a sub/group and is it closed? - if ((isset($this->groups[$idx])) && ($this->groups[$this->groups[$idx]]['opened'] === false)) { + if ((isset($this->groups[$idx])) && ($this->groups[$this->groups[$idx]]['opened'] === FALSE)) { // Then add it's content $groupContent = trim($this->groups[$this->groups[$idx]]['content']); //* DEBUG: */ echo "group={$this->groups[$idx]},content=
".htmlentities($groupContent)."

\n"; $content .= $groupContent; - } elseif ((isset($this->subGroups[$idx])) && ($this->subGroups[$this->subGroups[$idx]]['opened'] === false)) { + } elseif ((isset($this->subGroups[$idx])) && ($this->subGroups[$this->subGroups[$idx]]['opened'] === FALSE)) { // Then add it's content $subGroupContent = $this->subGroups[$this->subGroups[$idx]]['content']; //* DEBUG: */ echo "subgroup={$this->subGroups[$idx]},content=
".htmlentities($subGroupContent)."

\n"; @@ -435,7 +436,7 @@ class BaseHelper extends BaseFrameworkSystem { */ protected function ifGroupIsOpened ($groupId) { // Is the group open? - $isOpened = ((isset($this->groups[$groupId])) && ($this->groups[$groupId]['opened'] === true)); + $isOpened = ((isset($this->groups[$groupId])) && ($this->groups[$groupId]['opened'] === TRUE)); // Return status return $isOpened; diff --git a/inc/classes/main/helper/web/forms/class_WebFormHelper.php b/inc/classes/main/helper/web/forms/class_WebFormHelper.php index 5ab3d89f..e0eea486 100644 --- a/inc/classes/main/helper/web/forms/class_WebFormHelper.php +++ b/inc/classes/main/helper/web/forms/class_WebFormHelper.php @@ -26,7 +26,7 @@ class WebFormHelper extends BaseWebHelper implements HelpableTemplate { * Whether the form tag is opened (keep at false or else your forms will * never work!) */ - private $formOpened = false; + private $formOpened = FALSE; /** * Name of the form @@ -36,7 +36,7 @@ class WebFormHelper extends BaseWebHelper implements HelpableTemplate { /** * Whether form tag is enabled (default: true) */ - private $formEnabled = true; + private $formEnabled = TRUE; // Class Constants const EXCEPTION_FORM_NAME_INVALID = 0x120; @@ -63,7 +63,7 @@ class WebFormHelper extends BaseWebHelper implements HelpableTemplate { * @param $withForm Whether include the form tag * @return $helperInstance A preparedf instance of this helper */ - public static final function createWebFormHelper (CompileableTemplate $templateInstance, $formName, $formId = false, $withForm = true) { + public static final function createWebFormHelper (CompileableTemplate $templateInstance, $formName, $formId = FALSE, $withForm = TRUE) { // Get new instance $helperInstance = new WebFormHelper(); @@ -71,7 +71,7 @@ class WebFormHelper extends BaseWebHelper implements HelpableTemplate { $helperInstance->setTemplateInstance($templateInstance); // Is the form id not set? - if ($formId === false) { + if ($formId === FALSE) { // Use form id from form name $formId = $formName; } // END - if @@ -80,7 +80,7 @@ class WebFormHelper extends BaseWebHelper implements HelpableTemplate { $helperInstance->setFormName($formName); // A form-less field may say 'false' here... - if ($withForm === true) { + if ($withForm === TRUE) { // Create the form $helperInstance->addFormTag($formName, $formId); } else { @@ -98,12 +98,12 @@ class WebFormHelper extends BaseWebHelper implements HelpableTemplate { * @param $formName Name of the form (default: false) * @param $formId Id of the form (attribute 'id'; default: false) * @return void - * @throws InvalidFormNameException If the form name is invalid ( = false) + * @throws InvalidFormNameException If the form name is invalid ( = FALSE) * @todo Add some unique PIN here to bypass problems with some browser and/or extensions */ - public function addFormTag ($formName = false, $formId = false) { + public function addFormTag ($formName = FALSE, $formId = FALSE) { // When the form is not yet opened at least form name must be valid - if (($this->formOpened === false) && ($formName === false)) { + if (($this->formOpened === FALSE) && ($formName === FALSE)) { // Thrown an exception throw new InvalidFormNameException ($this, self::EXCEPTION_FORM_NAME_INVALID); } // END - if @@ -112,7 +112,7 @@ class WebFormHelper extends BaseWebHelper implements HelpableTemplate { $formContent = ''; // Check whether we shall open or close the form - if (($this->formOpened === false) && ($this->formEnabled === true)) { + if (($this->formOpened === FALSE) && ($this->formEnabled === TRUE)) { // Add HTML code $formContent = sprintf("
formOpened = true; + $this->formOpened = TRUE; // Add it to the content $this->addHeaderContent($formContent); @@ -146,7 +146,7 @@ class WebFormHelper extends BaseWebHelper implements HelpableTemplate { } // END - if // Simply close it - $this->formOpened = false; + $this->formOpened = FALSE; // Add it to the content $this->addFooterContent($formContent); @@ -164,7 +164,7 @@ class WebFormHelper extends BaseWebHelper implements HelpableTemplate { */ public function addInputTextField ($fieldName, $fieldValue = '') { // Is the form opened? - if (($this->formOpened === false) && ($this->formEnabled === true)) { + if (($this->formOpened === FALSE) && ($this->formEnabled === TRUE)) { // Throw an exception throw new FormClosedException (array($this, $fieldName), self::EXCEPTION_CLOSED_FORM); } // END - if @@ -206,7 +206,7 @@ class WebFormHelper extends BaseWebHelper implements HelpableTemplate { */ public function addInputPasswordField ($fieldName, $fieldValue = '') { // Is the form opened? - if (($this->formOpened === false) && ($this->formEnabled === true)) { + if (($this->formOpened === FALSE) && ($this->formEnabled === TRUE)) { // Throw an exception throw new FormClosedException (array($this, $fieldName), self::EXCEPTION_CLOSED_FORM); } // END - if @@ -233,7 +233,7 @@ class WebFormHelper extends BaseWebHelper implements HelpableTemplate { */ public function addInputHiddenField ($fieldName, $fieldValue = '') { // Is the form opened? - if (($this->formOpened === false) && ($this->formEnabled === true)) { + if (($this->formOpened === FALSE) && ($this->formEnabled === TRUE)) { // Throw an exception throw new FormClosedException (array($this, $fieldName), self::EXCEPTION_CLOSED_FORM); } // END - if @@ -288,16 +288,16 @@ class WebFormHelper extends BaseWebHelper implements HelpableTemplate { * @return void * @throws FormClosedException If the form is not yet opened */ - public function addInputCheckboxField ($fieldName, $fieldChecked = true) { + public function addInputCheckboxField ($fieldName, $fieldChecked = TRUE) { // Is the form opened? - if (($this->formOpened === false) && ($this->formEnabled === true)) { + if (($this->formOpened === FALSE) && ($this->formEnabled === TRUE)) { // Throw an exception throw new FormClosedException (array($this, $fieldName), self::EXCEPTION_CLOSED_FORM); } // END - if // Set whether the check box is checked... $checked = " checked=\"checked\""; - if ($fieldChecked === false) $checked = ' '; + if ($fieldChecked === FALSE) $checked = ' '; // Generate the content $inputContent = sprintf("", @@ -320,7 +320,7 @@ class WebFormHelper extends BaseWebHelper implements HelpableTemplate { */ public function addInputResetButton ($buttonText) { // Is the form opened? - if (($this->formOpened === false) && ($this->formEnabled === true)) { + if (($this->formOpened === FALSE) && ($this->formEnabled === TRUE)) { // Throw an exception throw new FormClosedException (array($this, 'reset'), self::EXCEPTION_CLOSED_FORM); } // END - if @@ -345,7 +345,7 @@ class WebFormHelper extends BaseWebHelper implements HelpableTemplate { */ public function addInputSubmitButton ($buttonText) { // Is the form opened? - if (($this->formOpened === false) && ($this->formEnabled === true)) { + if (($this->formOpened === FALSE) && ($this->formEnabled === TRUE)) { // Throw an exception throw new FormClosedException (array($this, 'submit'), self::EXCEPTION_CLOSED_FORM); } // END - if @@ -372,13 +372,13 @@ class WebFormHelper extends BaseWebHelper implements HelpableTemplate { */ public function addFormGroup ($groupId = '', $groupText = '') { // Is a form opened? - if (($this->formOpened === false) && ($this->formEnabled === true)) { + if (($this->formOpened === FALSE) && ($this->formEnabled === TRUE)) { // Throw exception here throw new FormClosedException(array($this, $groupId), self::EXCEPTION_CLOSED_FORM); } // END - if // At least the group name should be set - if ((empty($groupId)) && ($this->ifGroupOpenedPreviously() === false)) { + if ((empty($groupId)) && ($this->ifGroupOpenedPreviously() === FALSE)) { // Throw exception here throw new EmptyVariableException(array($this, 'groupId'), self::EXCEPTION_UNEXPECTED_EMPTY_STRING); } elseif (empty($groupId)) { @@ -387,7 +387,7 @@ class WebFormHelper extends BaseWebHelper implements HelpableTemplate { } // Same group to open? - if (($this->ifGroupOpenedPreviously() === false) && ($groupId === $this->getPreviousGroupId())) { + if (($this->ifGroupOpenedPreviously() === FALSE) && ($groupId === $this->getPreviousGroupId())) { // Abort here silently return false; } // END - if @@ -396,7 +396,7 @@ class WebFormHelper extends BaseWebHelper implements HelpableTemplate { $content = " \n"; // Is this group opened? - if ($this->ifGroupOpenedPreviously() === false) { + if ($this->ifGroupOpenedPreviously() === FALSE) { // Begin the div/span blocks $content = sprintf("
@@ -447,13 +447,13 @@ class WebFormHelper extends BaseWebHelper implements HelpableTemplate { */ public function addFormSubGroup ($subGroupId = '', $subGroupText = '') { // Is a group opened? - if ($this->ifGroupOpenedPreviously() === false) { + if ($this->ifGroupOpenedPreviously() === FALSE) { // Throw exception here throw new FormFormClosedException(array($this, $subGroupId), self::EXCEPTION_UNEXPECTED_CLOSED_GROUP); } // END - if // At least the sub group name should be set - if ((empty($subGroupId)) && ($this->ifSubGroupOpenedPreviously() === false)) { + if ((empty($subGroupId)) && ($this->ifSubGroupOpenedPreviously() === FALSE)) { // Throw exception here throw new EmptyVariableException(array($this, 'subGroupId'), self::EXCEPTION_UNEXPECTED_EMPTY_STRING); } elseif (empty($subGroupId)) { @@ -462,7 +462,7 @@ class WebFormHelper extends BaseWebHelper implements HelpableTemplate { } // Same sub group to open? - if (($this->ifSubGroupOpenedPreviously() === false) && ($subGroupId == $this->getPreviousSubGroupId())) { + if (($this->ifSubGroupOpenedPreviously() === FALSE) && ($subGroupId == $this->getPreviousSubGroupId())) { // Abort here silently return false; } // END - if @@ -471,7 +471,7 @@ class WebFormHelper extends BaseWebHelper implements HelpableTemplate { $content = "
\n"; // Is this group opened? - if ($this->ifSubGroupOpenedPreviously() === false) { + if ($this->ifSubGroupOpenedPreviously() === FALSE) { // Begin the span block $content = sprintf("
@@ -513,7 +513,7 @@ class WebFormHelper extends BaseWebHelper implements HelpableTemplate { */ public function addFieldText ($fieldName, $fieldText) { // Is the form opened? - if (($this->formOpened === false) && ($this->formEnabled === true)) { + if (($this->formOpened === FALSE) && ($this->formEnabled === TRUE)) { // Throw an exception throw new FormClosedException (array($this, $fieldName), self::EXCEPTION_CLOSED_FORM); } // END - if @@ -547,7 +547,7 @@ class WebFormHelper extends BaseWebHelper implements HelpableTemplate { */ public function addFormNote ($noteId, $formNotes) { // Is the form opened? - if (($this->formOpened === false) && ($this->formEnabled === true)) { + if (($this->formOpened === FALSE) && ($this->formEnabled === TRUE)) { // Throw an exception throw new FormClosedException (array($this, 'form_notes'), self::EXCEPTION_CLOSED_FORM); } // END - if @@ -575,13 +575,13 @@ class WebFormHelper extends BaseWebHelper implements HelpableTemplate { */ public function addInputSelectField ($selectId, $firstEntry) { // Is the form group opened? - if (($this->formOpened === false) && ($this->formEnabled === true)) { + if (($this->formOpened === FALSE) && ($this->formEnabled === TRUE)) { // Throw an exception throw new FormClosedException (array($this, 'form_notes'), self::EXCEPTION_CLOSED_FORM); } // END - if // Shall we close or open the sub group? - if (($this->ifSubGroupOpenedPreviously() === false) && ($this->getPreviousSubGroupId() !== $selectId)) { + if (($this->ifSubGroupOpenedPreviously() === FALSE) && ($this->getPreviousSubGroupId() !== $selectId)) { // Initialize first entry (which might be non-selectable if content is provided if (!empty($firstEntry)) { // Add selection around it @@ -622,7 +622,7 @@ class WebFormHelper extends BaseWebHelper implements HelpableTemplate { */ public function addSelectSubOption ($subName, $subValue) { // Is there a sub group (shall be a selection box!) - if ($this->ifSubGroupOpenedPreviously() === false) { + if ($this->ifSubGroupOpenedPreviously() === FALSE) { // Then throw an exception here throw new HelperNoPreviousOpenedSubGroupException(array($this, $content), self::EXCEPTION_NO_PREVIOUS_SUB_GROUP_OPENED); } // END - if @@ -650,7 +650,7 @@ class WebFormHelper extends BaseWebHelper implements HelpableTemplate { */ public function addSelectOption ($optionName, $optionValue) { // Is there a sub group (shall be a selection box!) - if ($this->ifSubGroupOpenedPreviously() === false) { + if ($this->ifSubGroupOpenedPreviously() === FALSE) { // Then throw an exception here throw new HelperNoPreviousOpenedSubGroupException(array($this, $content), self::EXCEPTION_NO_PREVIOUS_SUB_GROUP_OPENED); } // END - if @@ -702,7 +702,7 @@ class WebFormHelper extends BaseWebHelper implements HelpableTemplate { * @param $formEnabled Whether form is enabled or disabled * @return void */ - public final function enableForm ($formEnabled = true) { + public final function enableForm ($formEnabled = TRUE) { $this->formEnabled = (bool) $formEnabled; } @@ -915,10 +915,10 @@ class WebFormHelper extends BaseWebHelper implements HelpableTemplate { */ public function flushContent () { // Is the form still open? - if (($this->formOpened === true) && ($this->formEnabled === true)) { + if (($this->formOpened === TRUE) && ($this->formEnabled === TRUE)) { // Close the form automatically $this->addFormTag(); - } elseif ($this->formEnabled === false) { + } elseif ($this->formEnabled === FALSE) { if ($this->ifSubGroupOpenedPreviously()) { // Close sub group $this->addFormSubGroup(); diff --git a/inc/classes/main/helper/web/links/class_WebLinkHelper.php b/inc/classes/main/helper/web/links/class_WebLinkHelper.php index ccf1f343..81e6dc82 100644 --- a/inc/classes/main/helper/web/links/class_WebLinkHelper.php +++ b/inc/classes/main/helper/web/links/class_WebLinkHelper.php @@ -239,7 +239,7 @@ class WebLinkHelper extends BaseWebHelper implements HelpableTemplate { */ public function addLinkNote ($groupId, $groupNote, $groupCode = "div") { // Check if a previous group was opened - if ($this->ifGroupOpenedPreviously() === false) { + if ($this->ifGroupOpenedPreviously() === FALSE) { // No group was opened before! throw new NoGroupOpenedException(array($this, $groupNote), self::EXCEPTION_GROUP_NOT_OPENED); } // END - if @@ -271,7 +271,7 @@ class WebLinkHelper extends BaseWebHelper implements HelpableTemplate { */ protected function addActionLink ($linkAction, $linkText, $linkTitle) { // Check if a previous group was opened - if ($this->ifGroupOpenedPreviously() === false) { + if ($this->ifGroupOpenedPreviously() === FALSE) { // No group was opened before! throw new NoGroupOpenedException(array($this, $linkAction . '(' . $linkText . ')'), self::EXCEPTION_GROUP_NOT_OPENED); } // END - if diff --git a/inc/classes/main/io/class_FrameworkDirectoryPointer.php b/inc/classes/main/io/class_FrameworkDirectoryPointer.php index 95932392..f3abf217 100644 --- a/inc/classes/main/io/class_FrameworkDirectoryPointer.php +++ b/inc/classes/main/io/class_FrameworkDirectoryPointer.php @@ -67,21 +67,21 @@ class FrameworkDirectoryPointer extends BaseFrameworkSystem { * @throws PathReadProtectedException If the provided path name is read-protected * @throws DirPointerNotOpenedException If opendir() returns not a directory resource */ - public static final function createFrameworkDirectoryPointer ($pathName, $inConstructor = false) { + public static final function createFrameworkDirectoryPointer ($pathName, $inConstructor = FALSE) { // Some pre-sanity checks... if (is_null($pathName)) { // No pathname given if ($inConstructor) { return NULL; } else { - throw new PathIsEmptyException(null, self::EXCEPTION_UNEXPECTED_EMPTY_STRING); + throw new PathIsEmptyException(NULL, self::EXCEPTION_UNEXPECTED_EMPTY_STRING); } } elseif (!is_string($pathName)) { // Is not a string if ($inConstructor) { return NULL; } else { - throw new InvalidPathStringException(null, self::EXCEPTION_INVALID_STRING); + throw new InvalidPathStringException(NULL, self::EXCEPTION_INVALID_STRING); } } elseif (!is_dir($pathName)) { // Not a directory @@ -148,11 +148,11 @@ class FrameworkDirectoryPointer extends BaseFrameworkSystem { $rawLine = $this->readRawDirectory(); // Shall we exclude directories? - if ((!is_null($rawLine)) && ($rawLine !== false) && (!in_array($rawLine, $except))) { + if ((!is_null($rawLine)) && ($rawLine !== FALSE) && (!in_array($rawLine, $except))) { // Return read data //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DIRECTORY[' . __LINE__ . ']: rawLine[' . gettype($rawLine) . ']=' . $rawLine); return $rawLine; - } elseif ((!is_null($rawLine)) && ($rawLine !== false)) { + } elseif ((!is_null($rawLine)) && ($rawLine !== FALSE)) { // Exclude this part //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DIRECTORY[' . __LINE__ . ']: rawline[' . gettype($rawLine) . ']=' . $rawLine . ' - Recursive call!'); return $this->readDirectoryExcept($except); diff --git a/inc/classes/main/io/class_FrameworkFileInputPointer.php b/inc/classes/main/io/class_FrameworkFileInputPointer.php index 14eab16e..61582a65 100644 --- a/inc/classes/main/io/class_FrameworkFileInputPointer.php +++ b/inc/classes/main/io/class_FrameworkFileInputPointer.php @@ -71,7 +71,7 @@ class FrameworkFileInputPointer extends BaseFrameworkSystem { // Some pre-sanity checks... if ((is_null($fileName)) || (empty($fileName))) { // No filename given - throw new FileIsEmptyException(null, self::EXCEPTION_UNEXPECTED_EMPTY_STRING); + throw new FileIsEmptyException(NULL, self::EXCEPTION_UNEXPECTED_EMPTY_STRING); } elseif (!file_exists($fileName)) { // File does not exist! throw new FileIoException($fileName, self::EXCEPTION_FILE_NOT_FOUND); @@ -82,7 +82,7 @@ class FrameworkFileInputPointer extends BaseFrameworkSystem { // Try to open a handler $filePointer = fopen($fileName, 'rb'); - if ((is_null($filePointer)) || ($filePointer === false)) { + if ((is_null($filePointer)) || ($filePointer === FALSE)) { // Something bad happend throw new FileIoException($fileName, self::EXCEPTION_FILE_POINTER_INVALID); } // END - if diff --git a/inc/classes/main/io/class_FrameworkFileOutputPointer.php b/inc/classes/main/io/class_FrameworkFileOutputPointer.php index 21e82ba3..4be2d02e 100644 --- a/inc/classes/main/io/class_FrameworkFileOutputPointer.php +++ b/inc/classes/main/io/class_FrameworkFileOutputPointer.php @@ -68,12 +68,12 @@ class FrameworkFileOutputPointer extends BaseFrameworkSystem { // Some pre-sanity checks... if (is_null($fileName)) { // No filename given - throw new FileIsEmptyException(null, self::EXCEPTION_UNEXPECTED_EMPTY_STRING); + throw new FileIsEmptyException(NULL, self::EXCEPTION_UNEXPECTED_EMPTY_STRING); } // END - if // Try to open a handler $filePointer = @fopen($fileName, $mode); - if (($filePointer === null) || ($filePointer === false)) { + if (($filePointer === null) || ($filePointer === FALSE)) { // Something bad happend throw new FileIoException ($fileName, self::EXCEPTION_FILE_POINTER_INVALID); } // END - if diff --git a/inc/classes/main/output/class_ConsoleOutput.php b/inc/classes/main/output/class_ConsoleOutput.php index 61b6f8ab..aa4f99c6 100644 --- a/inc/classes/main/output/class_ConsoleOutput.php +++ b/inc/classes/main/output/class_ConsoleOutput.php @@ -87,7 +87,7 @@ class ConsoleOutput extends BaseFrameworkSystem implements OutputStreamer { * @param $stripTags Whether HTML tags shall be stripped out * @return void */ - public final function output ($outStream = false, $stripTags = false) { + public final function output ($outStream = FALSE, $stripTags = FALSE) { print trim($outStream) . PHP_EOL; } } diff --git a/inc/classes/main/output/class_WebOutput.php b/inc/classes/main/output/class_WebOutput.php index 92110f09..98c7c393 100644 --- a/inc/classes/main/output/class_WebOutput.php +++ b/inc/classes/main/output/class_WebOutput.php @@ -71,7 +71,7 @@ class WebOutput extends BaseFrameworkSystem implements OutputStreamer, Registera * @param $stripTags Whether HTML tags shall be stripped out * @return void */ - public final function output ($outStream = false, $stripTags = false) { + public final function output ($outStream = FALSE, $stripTags = FALSE) { print(stripslashes($outStream)); } } diff --git a/inc/classes/main/points/class_UserPoints.php b/inc/classes/main/points/class_UserPoints.php index 13b210eb..45d8f305 100644 --- a/inc/classes/main/points/class_UserPoints.php +++ b/inc/classes/main/points/class_UserPoints.php @@ -101,7 +101,7 @@ class UserPoints extends BaseFrameworkSystem implements Registerable, BookablePo */ public function ifUserHasRequiredPoints ($action) { // Default is that everyone is poor... ;-) - $hasRequired = false; + $hasRequired = FALSE; // Get the required points entry $requiredPoints = $this->getConfigInstance()->getConfigEntry($action . '_action_points'); diff --git a/inc/classes/main/request/class_BaseRequest.php b/inc/classes/main/request/class_BaseRequest.php index 2cc0ac40..01207d18 100644 --- a/inc/classes/main/request/class_BaseRequest.php +++ b/inc/classes/main/request/class_BaseRequest.php @@ -32,7 +32,7 @@ class BaseRequest extends BaseFrameworkSystem { * valid so make sure your intercepting filters sets this attribute to false * when they need to intercept the data flow. */ - private $requestIsValid = true; + private $requestIsValid = TRUE; /** * Protected constructor @@ -118,7 +118,7 @@ class BaseRequest extends BaseFrameworkSystem { * @param $isValid Whether the request is valid * @return void */ - public final function requestIsValid ($isValid = true) { + public final function requestIsValid ($isValid = TRUE) { $this->requestIsValid = (bool) $isValid; } diff --git a/inc/classes/main/resolver/action/class_BaseActionResolver.php b/inc/classes/main/resolver/action/class_BaseActionResolver.php index eae54aba..36b584ff 100644 --- a/inc/classes/main/resolver/action/class_BaseActionResolver.php +++ b/inc/classes/main/resolver/action/class_BaseActionResolver.php @@ -66,7 +66,7 @@ class BaseActionResolver extends BaseResolver { */ public function isActionValid ($actionName) { // By default nothing shall be valid - $isValid = false; + $isValid = FALSE; // Is a action set? if (empty($actionName)) { @@ -83,7 +83,7 @@ class BaseActionResolver extends BaseResolver { // Is this class already loaded? if (class_exists($this->getClassName())) { // This class does exist. :-) - $isValid = true; + $isValid = TRUE; } // END - if // Set action name diff --git a/inc/classes/main/resolver/action/web/class_WebActionResolver.php b/inc/classes/main/resolver/action/web/class_WebActionResolver.php index 154e7589..528a3440 100644 --- a/inc/classes/main/resolver/action/web/class_WebActionResolver.php +++ b/inc/classes/main/resolver/action/web/class_WebActionResolver.php @@ -57,7 +57,7 @@ class WebActionResolver extends BaseActionResolver implements ActionResolver { if (empty($actionName)) { // Then thrown an exception here throw new EmptyVariableException(array($resolverInstance, 'defaultAction'), self::EXCEPTION_UNEXPECTED_EMPTY_STRING); - } elseif ($resolverInstance->isActionValid($actionName) === false) { + } elseif ($resolverInstance->isActionValid($actionName) === FALSE) { // Invalid action found throw new InvalidActionException(array($resolverInstance, $actionName), self::EXCEPTION_INVALID_ACTION); } @@ -94,7 +94,7 @@ class WebActionResolver extends BaseActionResolver implements ActionResolver { } // END - if // Check if action is valid - if ($this->isActionValid($actionName) === false) { + if ($this->isActionValid($actionName) === FALSE) { // This action is invalid! throw new InvalidActionException(array($this, $actionName), self::EXCEPTION_INVALID_ACTION); } // END - if @@ -134,7 +134,7 @@ class WebActionResolver extends BaseActionResolver implements ActionResolver { } // END - if // Check if action is valid - if ($this->isActionValid($actionName) === false) { + if ($this->isActionValid($actionName) === FALSE) { // This action is invalid! throw new InvalidActionException(array($this, $actionName), self::EXCEPTION_INVALID_ACTION); } // END - if diff --git a/inc/classes/main/resolver/class_ b/inc/classes/main/resolver/class_ index ea1894d5..766160ca 100644 --- a/inc/classes/main/resolver/class_ +++ b/inc/classes/main/resolver/class_ @@ -52,7 +52,7 @@ class ???Resolver extends BaseResolver implements Resolver { if (empty($!!!Name)) { // Then thrown an exception here throw new EmptyVariableException(array($resolverInstance, 'default|||'), self::EXCEPTION_UNEXPECTED_EMPTY_STRING); - } elseif ($resolverInstance->is|||Valid($!!!Name) === false) { + } elseif ($resolverInstance->is|||Valid($!!!Name) === FALSE) { // Invalid action found throw new Invalid|||Exception(array($resolverInstance, $!!!Name), self::EXCEPTION_INVALID_ACTION); } @@ -87,7 +87,7 @@ class ???Resolver extends BaseResolver implements Resolver { if (empty($!!!Name)) $!!!Name = $this->getConfigInstance()->getConfigEntry('default_action'); // Check if action is valid - if ($this->is|||Valid($!!!Name) === false) { + if ($this->is|||Valid($!!!Name) === FALSE) { // This action is invalid! throw new Invalid|||Exception(array($this, $!!!Name), self::EXCEPTION_INVALID_ACTION); } // END - if @@ -127,7 +127,7 @@ class ???Resolver extends BaseResolver implements Resolver { } // END - if // Check if action is valid - if ($this->is|||Valid($!!!Name) === false) { + if ($this->is|||Valid($!!!Name) === FALSE) { // This action is invalid! throw new Invalid|||Exception(array($this, $!!!Name), self::EXCEPTION_INVALID_ACTION); } // END - if @@ -196,7 +196,7 @@ class ???Resolver extends BaseResolver implements Resolver { if (empty($!!!Name)) { // Then thrown an exception here throw new EmptyVariableException(array($resolverInstance, 'default|||'), self::EXCEPTION_UNEXPECTED_EMPTY_STRING); - } elseif ($resolverInstance->is|||Valid($!!!Name) === false) { + } elseif ($resolverInstance->is|||Valid($!!!Name) === FALSE) { // Invalid action found throw new Invalid|||Exception(array($resolverInstance, $!!!Name), self::EXCEPTION_INVALID_ACTION); } @@ -231,7 +231,7 @@ class ???Resolver extends BaseResolver implements Resolver { if (empty($!!!Name)) $!!!Name = $this->getConfigInstance()->getConfigEntry('default_action'); // Check if action is valid - if ($this->is|||Valid($!!!Name) === false) { + if ($this->is|||Valid($!!!Name) === FALSE) { // This action is invalid! throw new Invalid|||Exception(array($this, $!!!Name), self::EXCEPTION_INVALID_ACTION); } // END - if @@ -271,7 +271,7 @@ class ???Resolver extends BaseResolver implements Resolver { } // END - if // Check if action is valid - if ($this->is|||Valid($!!!Name) === false) { + if ($this->is|||Valid($!!!Name) === FALSE) { // This action is invalid! throw new Invalid|||Exception(array($this, $!!!Name), self::EXCEPTION_INVALID_ACTION); } // END - if @@ -340,7 +340,7 @@ class ???Resolver extends BaseResolver implements Resolver { if (empty($!!!Name)) { // Then thrown an exception here throw new EmptyVariableException(array($resolverInstance, 'default|||'), self::EXCEPTION_UNEXPECTED_EMPTY_STRING); - } elseif ($resolverInstance->is|||Valid($!!!Name) === false) { + } elseif ($resolverInstance->is|||Valid($!!!Name) === FALSE) { // Invalid action found throw new Invalid|||Exception(array($resolverInstance, $!!!Name), self::EXCEPTION_INVALID_ACTION); } @@ -375,7 +375,7 @@ class ???Resolver extends BaseResolver implements Resolver { if (empty($!!!Name)) $!!!Name = $this->getConfigInstance()->getConfigEntry('default_action'); // Check if action is valid - if ($this->is|||Valid($!!!Name) === false) { + if ($this->is|||Valid($!!!Name) === FALSE) { // This action is invalid! throw new Invalid|||Exception(array($this, $!!!Name), self::EXCEPTION_INVALID_ACTION); } // END - if @@ -415,7 +415,7 @@ class ???Resolver extends BaseResolver implements Resolver { } // END - if // Check if action is valid - if ($this->is|||Valid($!!!Name) === false) { + if ($this->is|||Valid($!!!Name) === FALSE) { // This action is invalid! throw new Invalid|||Exception(array($this, $!!!Name), self::EXCEPTION_INVALID_ACTION); } // END - if @@ -484,7 +484,7 @@ class ???Resolver extends BaseResolver implements Resolver { if (empty($!!!Name)) { // Then thrown an exception here throw new EmptyVariableException(array($resolverInstance, 'default|||'), self::EXCEPTION_UNEXPECTED_EMPTY_STRING); - } elseif ($resolverInstance->is|||Valid($!!!Name) === false) { + } elseif ($resolverInstance->is|||Valid($!!!Name) === FALSE) { // Invalid action found throw new Invalid|||Exception(array($resolverInstance, $!!!Name), self::EXCEPTION_INVALID_ACTION); } @@ -519,7 +519,7 @@ class ???Resolver extends BaseResolver implements Resolver { if (empty($!!!Name)) $!!!Name = $this->getConfigInstance()->getConfigEntry('default_action'); // Check if action is valid - if ($this->is|||Valid($!!!Name) === false) { + if ($this->is|||Valid($!!!Name) === FALSE) { // This action is invalid! throw new Invalid|||Exception(array($this, $!!!Name), self::EXCEPTION_INVALID_ACTION); } // END - if @@ -559,7 +559,7 @@ class ???Resolver extends BaseResolver implements Resolver { } // END - if // Check if action is valid - if ($this->is|||Valid($!!!Name) === false) { + if ($this->is|||Valid($!!!Name) === FALSE) { // This action is invalid! throw new Invalid|||Exception(array($this, $!!!Name), self::EXCEPTION_INVALID_ACTION); } // END - if diff --git a/inc/classes/main/resolver/command/class_BaseCommandResolver.php b/inc/classes/main/resolver/command/class_BaseCommandResolver.php index 8b2258b4..7321c422 100644 --- a/inc/classes/main/resolver/command/class_BaseCommandResolver.php +++ b/inc/classes/main/resolver/command/class_BaseCommandResolver.php @@ -66,7 +66,7 @@ class BaseCommandResolver extends BaseResolver { */ public function isCommandValid ($commandName) { // By default nothing shall be valid - $isValid = false; + $isValid = FALSE; // Is a command set? if (empty($commandName)) { @@ -83,7 +83,7 @@ class BaseCommandResolver extends BaseResolver { // Is this class already loaded? if (class_exists($this->getClassName())) { // This class does exist. :-) - $isValid = true; + $isValid = TRUE; } // END - if // Set command name diff --git a/inc/classes/main/resolver/command/console/class_ConsoleCommandResolver.php b/inc/classes/main/resolver/command/console/class_ConsoleCommandResolver.php index a24fdeb1..08f32314 100644 --- a/inc/classes/main/resolver/command/console/class_ConsoleCommandResolver.php +++ b/inc/classes/main/resolver/command/console/class_ConsoleCommandResolver.php @@ -52,7 +52,7 @@ class ConsoleCommandResolver extends BaseCommandResolver implements CommandResol if (empty($commandName)) { // Then thrown an exception here throw new EmptyVariableException(array($resolverInstance, 'commandName'), self::EXCEPTION_UNEXPECTED_EMPTY_STRING); - } elseif ($resolverInstance->isCommandValid($commandName) === false) { + } elseif ($resolverInstance->isCommandValid($commandName) === FALSE) { // Invalid command found throw new InvalidCommandException(array($resolverInstance, $commandName), self::EXCEPTION_INVALID_COMMAND); } @@ -89,7 +89,7 @@ class ConsoleCommandResolver extends BaseCommandResolver implements CommandResol } // END - if // Check if command is valid - if ($this->isCommandValid($commandName) === false) { + if ($this->isCommandValid($commandName) === FALSE) { // This command is invalid! throw new InvalidCommandException(array($this, $commandName), self::EXCEPTION_INVALID_COMMAND); } // END - if @@ -127,7 +127,7 @@ class ConsoleCommandResolver extends BaseCommandResolver implements CommandResol } // END - if // Check if command is valid - if ($this->isCommandValid($commandName) === false) { + if ($this->isCommandValid($commandName) === FALSE) { // This command is invalid! throw new InvalidCommandException(array($this, $commandName), self::EXCEPTION_INVALID_COMMAND); } // END - if diff --git a/inc/classes/main/resolver/command/image/class_ImageCommandResolver.php b/inc/classes/main/resolver/command/image/class_ImageCommandResolver.php index db44e62f..3ffcc1d6 100644 --- a/inc/classes/main/resolver/command/image/class_ImageCommandResolver.php +++ b/inc/classes/main/resolver/command/image/class_ImageCommandResolver.php @@ -57,7 +57,7 @@ class ImageCommandResolver extends BaseCommandResolver implements CommandResolve if (empty($commandName)) { // Then thrown an exception here throw new EmptyVariableException(array($resolverInstance, 'commandName'), self::EXCEPTION_UNEXPECTED_EMPTY_STRING); - } elseif ($resolverInstance->isCommandValid($commandName) === false) { + } elseif ($resolverInstance->isCommandValid($commandName) === FALSE) { // Invalid command found throw new InvalidCommandException(array($resolverInstance, $commandName), self::EXCEPTION_INVALID_COMMAND); } @@ -94,7 +94,7 @@ class ImageCommandResolver extends BaseCommandResolver implements CommandResolve } // END - if // Check if command is valid - if ($this->isCommandValid($commandName) === false) { + if ($this->isCommandValid($commandName) === FALSE) { // This command is invalid! throw new InvalidCommandException(array($this, $commandName), self::EXCEPTION_INVALID_COMMAND); } // END - if @@ -132,7 +132,7 @@ class ImageCommandResolver extends BaseCommandResolver implements CommandResolve } // END - if // Check if command is valid - if ($this->isCommandValid($commandName) === false) { + if ($this->isCommandValid($commandName) === FALSE) { // This command is invalid! throw new InvalidCommandException(array($this, $commandName), self::EXCEPTION_INVALID_COMMAND); } // END - if diff --git a/inc/classes/main/resolver/command/web/class_ b/inc/classes/main/resolver/command/web/class_ index 08086f0f..e1c1e1f6 100644 --- a/inc/classes/main/resolver/command/web/class_ +++ b/inc/classes/main/resolver/command/web/class_ @@ -57,7 +57,7 @@ class Web???CommandResolver extends BaseCommandResolver implements CommandResolv if (empty($commandName)) { // Then thrown an exception here throw new EmptyVariableException(array($resolverInstance, 'commandName'), self::EXCEPTION_UNEXPECTED_EMPTY_STRING); - } elseif ($resolverInstance->isCommandValid($commandName) === false) { + } elseif ($resolverInstance->isCommandValid($commandName) === FALSE) { // Invalid command found throw new InvalidCommandException(array($resolverInstance, $commandName), self::EXCEPTION_INVALID_COMMAND); } @@ -92,7 +92,7 @@ class Web???CommandResolver extends BaseCommandResolver implements CommandResolv if (empty($commandName)) $commandName = $this->getConfigInstance()->getConfigEntry('default_web_command'); // Check if the command is valid - if ($this->isCommandValid($commandName) === false) { + if ($this->isCommandValid($commandName) === FALSE) { // This command is invalid! throw new InvalidCommandException(array($this, $commandName), self::EXCEPTION_INVALID_COMMAND); } // END - if @@ -128,7 +128,7 @@ class Web???CommandResolver extends BaseCommandResolver implements CommandResolv if (empty($commandName)) $commandName = $this->getConfigInstance()->getConfigEntry('default_web_command'); // Check if the command is valid - if ($this->isCommandValid($commandName) === false) { + if ($this->isCommandValid($commandName) === FALSE) { // This command is invalid! throw new InvalidCommandException(array($this, $commandName), self::EXCEPTION_INVALID_COMMAND); } diff --git a/inc/classes/main/resolver/command/web/class_WebCommandResolver.php b/inc/classes/main/resolver/command/web/class_WebCommandResolver.php index 13f13bdc..169591aa 100644 --- a/inc/classes/main/resolver/command/web/class_WebCommandResolver.php +++ b/inc/classes/main/resolver/command/web/class_WebCommandResolver.php @@ -57,7 +57,7 @@ class WebCommandResolver extends BaseCommandResolver implements CommandResolver if (empty($commandName)) { // Then thrown an exception here throw new EmptyVariableException(array($resolverInstance, 'commandName'), self::EXCEPTION_UNEXPECTED_EMPTY_STRING); - } elseif ($resolverInstance->isCommandValid($commandName) === false) { + } elseif ($resolverInstance->isCommandValid($commandName) === FALSE) { // Invalid command found throw new InvalidCommandException(array($resolverInstance, $commandName), self::EXCEPTION_INVALID_COMMAND); } @@ -94,7 +94,7 @@ class WebCommandResolver extends BaseCommandResolver implements CommandResolver } // END - if // Check if command is valid - if ($this->isCommandValid($commandName) === false) { + if ($this->isCommandValid($commandName) === FALSE) { // This command is invalid! throw new InvalidCommandException(array($this, $commandName), self::EXCEPTION_INVALID_COMMAND); } // END - if @@ -132,7 +132,7 @@ class WebCommandResolver extends BaseCommandResolver implements CommandResolver } // END - if // Check if command is valid - if ($this->isCommandValid($commandName) === false) { + if ($this->isCommandValid($commandName) === FALSE) { // This command is invalid! throw new InvalidCommandException(array($this, $commandName), self::EXCEPTION_INVALID_COMMAND); } // END - if diff --git a/inc/classes/main/resolver/controller/class_BaseControllerResolver.php b/inc/classes/main/resolver/controller/class_BaseControllerResolver.php index 69fcf870..32787a84 100644 --- a/inc/classes/main/resolver/controller/class_BaseControllerResolver.php +++ b/inc/classes/main/resolver/controller/class_BaseControllerResolver.php @@ -133,7 +133,7 @@ class BaseControllerResolver extends BaseResolver { */ public function isControllerValid ($controllerName) { // By default nothing shall be valid - $isValid = false; + $isValid = FALSE; // Is a controller set? if (empty($controllerName)) { @@ -148,11 +148,11 @@ class BaseControllerResolver extends BaseResolver { $this->setClassName($className); // Try it hard to get an controller - while ($isValid === false) { + while ($isValid === FALSE) { // Is this class already loaded? if (class_exists($this->getClassName())) { // This class does exist. :-) - $isValid = true; + $isValid = TRUE; } elseif ($this->getClassName() != $this->getClassPrefix() . 'DefaultNewsController') { // Set default controller $this->setClassName($this->getClassPrefix() . 'DefaultNewsController'); diff --git a/inc/classes/main/resolver/controller/console/class_ConsoleControllerResolver.php b/inc/classes/main/resolver/controller/console/class_ConsoleControllerResolver.php index 10d46bf6..2771525d 100644 --- a/inc/classes/main/resolver/controller/console/class_ConsoleControllerResolver.php +++ b/inc/classes/main/resolver/controller/console/class_ConsoleControllerResolver.php @@ -62,7 +62,7 @@ class ConsoleControllerResolver extends BaseControllerResolver implements Contro if (empty($controllerName)) { // Then thrown an exception here throw new EmptyVariableException(array($resolverInstance, 'commandName'), self::EXCEPTION_UNEXPECTED_EMPTY_STRING); - } elseif ($resolverInstance->isControllerValid($controllerName) === false) { + } elseif ($resolverInstance->isControllerValid($controllerName) === FALSE) { // Invalid command found throw new InvalidControllerException(array($resolverInstance, $controllerName), self::EXCEPTION_INVALID_CONTROLLER); } diff --git a/inc/classes/main/resolver/controller/image/class_ImageControllerResolver.php b/inc/classes/main/resolver/controller/image/class_ImageControllerResolver.php index abb7c4ee..d0085dc7 100644 --- a/inc/classes/main/resolver/controller/image/class_ImageControllerResolver.php +++ b/inc/classes/main/resolver/controller/image/class_ImageControllerResolver.php @@ -62,7 +62,7 @@ class ImageControllerResolver extends BaseControllerResolver implements Controll if (empty($controllerName)) { // Then thrown an exception here throw new EmptyVariableException(array($resolverInstance, 'commandName'), self::EXCEPTION_UNEXPECTED_EMPTY_STRING); - } elseif ($resolverInstance->isControllerValid($controllerName) === false) { + } elseif ($resolverInstance->isControllerValid($controllerName) === FALSE) { // Invalid command found throw new InvalidControllerException(array($resolverInstance, $controllerName), self::EXCEPTION_INVALID_CONTROLLER); } diff --git a/inc/classes/main/resolver/controller/web/class_WebControllerResolver.php b/inc/classes/main/resolver/controller/web/class_WebControllerResolver.php index 5150b11b..7ad8ef6d 100644 --- a/inc/classes/main/resolver/controller/web/class_WebControllerResolver.php +++ b/inc/classes/main/resolver/controller/web/class_WebControllerResolver.php @@ -62,7 +62,7 @@ class WebControllerResolver extends BaseControllerResolver implements Controller if (empty($controllerName)) { // Then thrown an exception here throw new EmptyVariableException(array($resolverInstance, 'commandName'), self::EXCEPTION_UNEXPECTED_EMPTY_STRING); - } elseif ($resolverInstance->isControllerValid($controllerName) === false) { + } elseif ($resolverInstance->isControllerValid($controllerName) === FALSE) { // Invalid command found throw new InvalidControllerException(array($resolverInstance, $controllerName), self::EXCEPTION_INVALID_CONTROLLER); } diff --git a/inc/classes/main/response/class_BaseResponse.php b/inc/classes/main/response/class_BaseResponse.php index 2533d7c9..6eb3e238 100644 --- a/inc/classes/main/response/class_BaseResponse.php +++ b/inc/classes/main/response/class_BaseResponse.php @@ -148,8 +148,8 @@ class BaseResponse extends BaseFrameworkSystem { * @throws ResponseHeadersAlreadySentException Thrown if headers are * already sent */ - public function flushBuffer ($force = false) { - if ((headers_sent()) && ($force === false)) { + public function flushBuffer ($force = FALSE) { + if ((headers_sent()) && ($force === FALSE)) { // Headers are already sent! throw new ResponseHeadersAlreadySentException($this, self::EXCEPTION_HEADERS_ALREADY_SENT); } elseif (!headers_sent()) { diff --git a/inc/classes/main/response/console/class_ConsoleResponse.php b/inc/classes/main/response/console/class_ConsoleResponse.php index 60ebbdd2..4767f4c5 100644 --- a/inc/classes/main/response/console/class_ConsoleResponse.php +++ b/inc/classes/main/response/console/class_ConsoleResponse.php @@ -75,7 +75,7 @@ class ConsoleResponse extends BaseResponse implements Responseable { * @return void * @throws ResponseHeadersAlreadySentException If headers are already sent */ - public function addCookie ($cookieName, $cookieValue, $encrypted = false, $expires = NULL) { + public function addCookie ($cookieName, $cookieValue, $encrypted = FALSE, $expires = NULL) { //* DEBUG: */ echo $cookieName.'='.$cookieValue."
\n"; $this->partialStub('Naturally unimplemented in console response.'); } @@ -131,7 +131,7 @@ class ConsoleResponse extends BaseResponse implements Responseable { * @throws ResponseHeadersAlreadySentException Thrown if headers are * already sent */ - public function flushBuffer ($force = false) { + public function flushBuffer ($force = FALSE) { $this->partialStub('Please implement this class.'); } } diff --git a/inc/classes/main/response/http/class_HttpResponse.php b/inc/classes/main/response/http/class_HttpResponse.php index 359ff418..3130e345 100644 --- a/inc/classes/main/response/http/class_HttpResponse.php +++ b/inc/classes/main/response/http/class_HttpResponse.php @@ -79,7 +79,7 @@ class HttpResponse extends BaseResponse implements Responseable { * @todo If the return statement is removed and setcookie() commented out, * @todo this will send only one cookie out, the first one. */ - public function addCookie ($cookieName, $cookieValue, $encrypted = false, $expires = NULL) { + public function addCookie ($cookieName, $cookieValue, $encrypted = FALSE, $expires = NULL) { //* DEBUG: */ echo $cookieName.'='.$cookieValue."
\n"; // Are headers already sent? if (headers_sent()) { @@ -89,7 +89,7 @@ class HttpResponse extends BaseResponse implements Responseable { } // END - if // Shall we encrypt the cookie? - if ($encrypted === true) { + if ($encrypted === TRUE) { // Unsupported at the moment $this->partialStub('Encryption is unsupported at the moment.'); } // END - if diff --git a/inc/classes/main/response/image/class_ImageResponse.php b/inc/classes/main/response/image/class_ImageResponse.php index 41314b95..0a6170e4 100644 --- a/inc/classes/main/response/image/class_ImageResponse.php +++ b/inc/classes/main/response/image/class_ImageResponse.php @@ -90,7 +90,7 @@ class ImageResponse extends BaseResponse implements Responseable { * @todo If the return statement is removed and setcookie() commented out, * @todo this will send only one cookie out, the first one. */ - public function addCookie ($cookieName, $cookieValue, $encrypted = false, $expires = NULL) { + public function addCookie ($cookieName, $cookieValue, $encrypted = FALSE, $expires = NULL) { // Are headers already sent? if (headers_sent()) { // Throw an exception here @@ -98,7 +98,7 @@ class ImageResponse extends BaseResponse implements Responseable { } // END - if // Shall we encrypt the cookie? - if ($encrypted === true) { + if ($encrypted === TRUE) { // Unsupported at the moment $this->partialStub('Encryption is unsupported at the moment.'); } // END - if @@ -183,7 +183,7 @@ class ImageResponse extends BaseResponse implements Responseable { * already sent with an exception * @return void */ - public function flushBuffer ($force = false) { + public function flushBuffer ($force = FALSE) { // Finish the image $this->getImageInstance()->finishImage(); diff --git a/inc/classes/main/result/class_DatabaseResult.php b/inc/classes/main/result/class_DatabaseResult.php index 11143105..f1a8b90e 100644 --- a/inc/classes/main/result/class_DatabaseResult.php +++ b/inc/classes/main/result/class_DatabaseResult.php @@ -124,14 +124,14 @@ class DatabaseResult extends BaseFrameworkSystem implements SearchableResult, Up */ public function next () { // Default is not valid - $nextValid = false; + $nextValid = FALSE; // Is the result valid? if ($this->valid()) { // Next entry found, so count one up and cache it $this->currentPos++; $this->currentRow = $this->resultArray[BaseDatabaseBackend::RESULT_INDEX_ROWS][$this->currentPos]; - $nextValid = true; + $nextValid = TRUE; } // END - if // Return the result @@ -181,12 +181,12 @@ class DatabaseResult extends BaseFrameworkSystem implements SearchableResult, Up */ public function valid () { // By default nothing is valid - $isValid = false; + $isValid = FALSE; // Check if if (($this->ifStatusIsOkay()) && (isset($this->resultArray[BaseDatabaseBackend::RESULT_INDEX_ROWS][($this->currentPos + 1)])) && (isset($this->resultArray[BaseDatabaseBackend::RESULT_INDEX_ROWS][0]))) { // All fine! - $isValid = true; + $isValid = TRUE; } // END - if // Return the result @@ -352,7 +352,7 @@ class DatabaseResult extends BaseFrameworkSystem implements SearchableResult, Up */ public function find ($key) { // By default nothing is found - $found = false; + $found = FALSE; // Rewind the pointer $this->rewind(); @@ -368,7 +368,7 @@ class DatabaseResult extends BaseFrameworkSystem implements SearchableResult, Up // Is the element there? if (isset($currentEntry[$key])) { // Okay, found! - $found = true; + $found = TRUE; // So "cache" it $this->foundValue = $currentEntry[$key]; diff --git a/inc/classes/main/stacker/class_BaseStacker.php b/inc/classes/main/stacker/class_BaseStacker.php index d8659823..147ae9d8 100644 --- a/inc/classes/main/stacker/class_BaseStacker.php +++ b/inc/classes/main/stacker/class_BaseStacker.php @@ -52,9 +52,9 @@ class BaseStacker extends BaseFrameworkSystem { * @return void * @throws AlreadyInitializedStackerException If the stack is already initialized */ - public final function initStacker ($stackerName, $forceReInit = false) { + public final function initStacker ($stackerName, $forceReInit = FALSE) { // Is the stack already initialized? - if (($forceReInit === false) && ($this->isStackInitialized($stackerName))) { + if (($forceReInit === FALSE) && ($this->isStackInitialized($stackerName))) { // Then throw the exception throw new AlreadyInitializedStackerException(array($this, $stackerName), self::EXCEPTION_STACKER_ALREADY_INITIALIZED); } // END - if diff --git a/inc/classes/main/template/class_BaseTemplateEngine.php b/inc/classes/main/template/class_BaseTemplateEngine.php index ed47dbfa..4fc5eac4 100644 --- a/inc/classes/main/template/class_BaseTemplateEngine.php +++ b/inc/classes/main/template/class_BaseTemplateEngine.php @@ -178,7 +178,7 @@ class BaseTemplateEngine extends BaseFrameworkSystem { // First everything is not found $found = FALSE; - // If the stack is null, use the current group + // If the stack is NULL, use the current group if (is_null($variableGroup)) { // Use current group //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(__METHOD__.' currGroup=' . $this->currGroup . ' set as stack!'); @@ -253,7 +253,7 @@ class BaseTemplateEngine extends BaseFrameworkSystem { // First everything is not found $content = NULL; - // If the stack is null, use the current group + // If the stack is NULL, use the current group if (is_null($variableGroup)) { // Use current group //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(__METHOD__.' currGroup=' . $this->currGroup . ' set as stack!'); diff --git a/inc/classes/main/user/class_BaseUser.php b/inc/classes/main/user/class_BaseUser.php index e4f795d5..bb6132b3 100644 --- a/inc/classes/main/user/class_BaseUser.php +++ b/inc/classes/main/user/class_BaseUser.php @@ -118,7 +118,7 @@ class BaseUser extends BaseFrameworkSystem implements Updateable { */ public function ifUsernameExists () { // By default the username does not exist - $exists = false; + $exists = FALSE; // Is a previous result there? if (is_null($this->getResultInstance())) { @@ -148,7 +148,7 @@ class BaseUser extends BaseFrameworkSystem implements Updateable { // Search for it if ($this->getResultInstance()->next()) { // Entry found - $exists = true; + $exists = TRUE; } // END - if // Return the status @@ -162,7 +162,7 @@ class BaseUser extends BaseFrameworkSystem implements Updateable { */ public function ifEmailAddressExists () { // By default the email does not exist - $exists = false; + $exists = FALSE; // Is a previous result there? if (is_null($this->getResultInstance())) { @@ -192,7 +192,7 @@ class BaseUser extends BaseFrameworkSystem implements Updateable { // Search for it if ($this->getResultInstance()->next()) { // Entry found - $exists = true; + $exists = TRUE; // Is the username set? if ($this->getUserName() == '') { @@ -217,7 +217,7 @@ class BaseUser extends BaseFrameworkSystem implements Updateable { */ public function ifPasswordHashMatches (Requestable $requestInstance) { // By default nothing matches... ;) - $matches = false; + $matches = FALSE; // Is a previous result there? if (is_null($this->getResultInstance())) { diff --git a/inc/classes/main/user/guest/class_Guest.php b/inc/classes/main/user/guest/class_Guest.php index 375f3434..a8608426 100644 --- a/inc/classes/main/user/guest/class_Guest.php +++ b/inc/classes/main/user/guest/class_Guest.php @@ -54,7 +54,7 @@ class Guest extends BaseUser implements ManageableGuest, Registerable { $userInstance->setUserName($userName); // Check if username exists - if ($userInstance->ifUsernameExists() === false) { + if ($userInstance->ifUsernameExists() === FALSE) { // Throw an exception here throw new UsernameMissingException(array($userInstance, $userName), self::EXCEPTION_USERNAME_NOT_FOUND); } // END - if diff --git a/inc/classes/main/user/member/class_Member.php b/inc/classes/main/user/member/class_Member.php index 83ecf849..b2edca31 100644 --- a/inc/classes/main/user/member/class_Member.php +++ b/inc/classes/main/user/member/class_Member.php @@ -49,7 +49,7 @@ class Member extends BaseUser implements ManageableMember, Registerable { $userInstance->setUserName($userName); // Check if username exists - if ($userInstance->ifUsernameExists() === false) { + if ($userInstance->ifUsernameExists() === FALSE) { // Throw an exception here throw new UsernameMissingException(array($userInstance, $userName), self::EXCEPTION_USERNAME_NOT_FOUND); } // END - if diff --git a/inc/classes/middleware/debug/class_DebugMiddleware.php b/inc/classes/middleware/debug/class_DebugMiddleware.php index 811ca5f6..29bf3534 100644 --- a/inc/classes/middleware/debug/class_DebugMiddleware.php +++ b/inc/classes/middleware/debug/class_DebugMiddleware.php @@ -107,7 +107,7 @@ class DebugMiddleware extends BaseMiddleware implements Registerable { * @param $stripTags Whether HTML tags shall be stripped out * @return void */ - public final function output ($outStream, $stripTags = false) { + public final function output ($outStream, $stripTags = FALSE) { // Is the output stream set if (empty($outStream)) { // @TODO Initialization phase diff --git a/inc/classes/third_party/api/primusportal/class_PrimeraApi.php b/inc/classes/third_party/api/primusportal/class_PrimeraApi.php index a265c479..50ec17df 100644 --- a/inc/classes/third_party/api/primusportal/class_PrimeraApi.php +++ b/inc/classes/third_party/api/primusportal/class_PrimeraApi.php @@ -46,7 +46,7 @@ * $status = $apiInstance->payPrimera('garbage', 10000, 'Auszahlung IhreSeite.de - ID: 12345'); * 3. Überprüfung des Status (Rückgabecode): * CODE: - * if ($status === false) { + * if ($status === FALSE) { * // Ein Fehler ist aufgetreten * // Fehlerbehandlung hier einfügen... * } else { @@ -201,7 +201,7 @@ class PrimeraApi extends BaseFrameworkSystem { * @param string $Description Beschreibung (Sichtbar in Einzelauflistung) */ public function payPrimera ($Receiver, $Amount, $Description = '') { - $valid = false; + $valid = FALSE; $postData = array( 'PrimusInterface_Action' => 'Pay', 'PrimusInterface_Receiver' => base64_encode($Receiver), @@ -213,7 +213,7 @@ class PrimeraApi extends BaseFrameworkSystem { $this->data = $postReturn; if ($postReturn['status'] == '200') { - $valid = true; + $valid = TRUE; } // END - if return $valid; } @@ -225,7 +225,7 @@ class PrimeraApi extends BaseFrameworkSystem { * @param string/int $User Userid / Username */ public function checkPrimusUser ($userName) { - $valid = false; + $valid = FALSE; $postData = array( 'PrimusInterface_Action' => 'CheckPrimusUser', 'PrimusInterface_CheckPrimusUser' => $userName @@ -236,7 +236,7 @@ class PrimeraApi extends BaseFrameworkSystem { $this->data = $postReturn; if ($postReturn['status'] == self::PI_USER_CHECK_OK) { - $valid = true; + $valid = TRUE; } // END - if return $valid; } @@ -245,7 +245,7 @@ class PrimeraApi extends BaseFrameworkSystem { * Die Funktion liefer den aktuellen Primerastand */ public function getPrimera() { - $primera = false; + $primera = FALSE; $postData = array( 'PrimusInterface_Action' => 'GetPrimera' ); diff --git a/inc/classes/third_party/api/wernisportal/class_WernisApi.php b/inc/classes/third_party/api/wernisportal/class_WernisApi.php index 45c42f18..5600032c 100644 --- a/inc/classes/third_party/api/wernisportal/class_WernisApi.php +++ b/inc/classes/third_party/api/wernisportal/class_WernisApi.php @@ -209,7 +209,7 @@ class WernisApi extends BaseFrameworkSystem { $response = $this->sendRawRequest($requestString); // Check the response header if all is fine - if (strpos($response[0], '200') === false) { + if (strpos($response[0], '200') === FALSE) { // Something bad happend... :( return array( 'status' => "request_error", @@ -302,7 +302,7 @@ class WernisApi extends BaseFrameworkSystem { // Widthdraw this amount private function executeWithdraw ($amount) { // First all fails... - $result = false; + $result = FALSE; // Prepare the purpose $purpose = "\"Bube oder Dame\"-Einsatz gesetzt."; @@ -322,7 +322,7 @@ class WernisApi extends BaseFrameworkSystem { if ($return['status'] == $this->statusOkay) { // All fine! - $result = true; + $result = TRUE; } else { // Status failture text $this->setStatusMessage($return['message'], $return['status']); @@ -335,7 +335,7 @@ class WernisApi extends BaseFrameworkSystem { // Payout this amount private function executePayout ($amount) { // First all fails... - $result = false; + $result = FALSE; // Prepare the purpose $purpose = "\"Bube oder Dame\"-Gewinn erhalten."; @@ -355,7 +355,7 @@ class WernisApi extends BaseFrameworkSystem { if ($return['status'] == $this->statusOkay) { // All fine! - $result = true; + $result = TRUE; } else { // Status failture text $this->setStatusMessage($return['message'], $return['status']); diff --git a/inc/loader/class_ClassLoader.php b/inc/loader/class_ClassLoader.php index d7c3c33d..0c54eb63 100644 --- a/inc/loader/class_ClassLoader.php +++ b/inc/loader/class_ClassLoader.php @@ -71,17 +71,17 @@ class ClassLoader { /** * Debug this class loader? (true = yes, false = no) */ - private $debug = false; + private $debug = FALSE; /** * Whether the file list is cached */ - private $listCached = false; + private $listCached = FALSE; /** * Wethe class content has been cached */ - private $classesCached = false; + private $classesCached = FALSE; /** * Filename for the list cache @@ -120,14 +120,14 @@ class ClassLoader { } // END - if // Skip here if already cached - if ($this->listCached === false) { + if ($this->listCached === FALSE) { // Writes the cache file of our list away $cacheContent = serialize($this->classes); file_put_contents($this->listCacheFQFN, $cacheContent); } // END - if // Skip here if already cached - if ($this->classesCached === false) { + if ($this->classesCached === FALSE) { // Generate a full-cache of all classes $cacheContent = ''; foreach ($this->loadedClasses as $fqfn) { @@ -194,7 +194,7 @@ class ClassLoader { $this->classes = unserialize($cacheContent); // List has been restored from cache! - $this->listCached = true; + $this->listCached = TRUE; } // END - if // Does the class cache exist? @@ -203,7 +203,7 @@ class ClassLoader { require($this->classCacheFQFN); // Mark the class cache as loaded - $this->classesCached = true; + $this->classesCached = TRUE; } // END - if } @@ -243,7 +243,7 @@ class ClassLoader { */ public function scanClassPath ($basePath, array $ignoreList = array() ) { // Is a list has been restored from cache, don't read it again - if ($this->listCached === true) { + if ($this->listCached === TRUE) { // Abort here return; } // END - if @@ -269,7 +269,7 @@ class ClassLoader { $basePath2 = realpath($basePath); // If the basePath is false it is invalid - if ($basePath2 === false) { + if ($basePath2 === FALSE) { /* @todo: Do not die here. */ exit(__METHOD__ . ':Cannot read ' . $basePath . ' !'); } else { @@ -354,7 +354,7 @@ class ClassLoader { // Developer mode excludes caching (better debugging) if (!defined('DEVELOPER')) { // Reset cache - $this->classesCached = false; + $this->classesCached = FALSE; } // END - if } // END - if }