]> git.mxchange.org Git - core.git/commitdiff
Changed all true/false to TRUE/FALSE respectively as PHP constants are better than...
authorRoland Häder <roland@mxchange.org>
Thu, 18 Jul 2013 12:50:59 +0000 (12:50 +0000)
committerRoland Häder <roland@mxchange.org>
Thu, 18 Jul 2013 12:50:59 +0000 (12:50 +0000)
45 files changed:
inc/classes/exceptions/class_FrameworkException.php
inc/classes/exceptions/helper/class_InvalidFormNameException.php
inc/classes/interfaces/registry/socket/class_RegisterableSocket.php
inc/classes/interfaces/request/class_Requestable.php
inc/classes/interfaces/template/class_CompileableTemplate.php
inc/classes/main/class_BaseFrameworkSystem.php
inc/classes/main/compressor/class_Bzip2Compressor.php
inc/classes/main/console/class_ConsoleTools.php
inc/classes/main/container/socket/class_SocketContainer.php
inc/classes/main/decorator/template/class_XmlRewriterTemplateDecorator.php
inc/classes/main/discovery/payment/class_LocalPaymentDiscovery.php
inc/classes/main/factories/xml/class_XmlTemplateEngineFactory.php
inc/classes/main/filter/auth/class_UserAuthFilter.php
inc/classes/main/filter/change/class_EmailChangeFilter.php
inc/classes/main/filter/change/class_PasswordChangeFilter.php
inc/classes/main/filter/checkboxes/class_RulesAcceptedFilter.php
inc/classes/main/filter/class_
inc/classes/main/filter/class_FilterChain.php
inc/classes/main/filter/crypto/class_CaptchaEncryptFilter.php
inc/classes/main/filter/payment/class_PaymentDiscoveryFilter.php
inc/classes/main/filter/validator/class_EmailValidatorFilter.php
inc/classes/main/filter/validator/class_PasswordValidatorFilter.php
inc/classes/main/filter/validator/class_UserNameValidatorFilter.php
inc/classes/main/filter/verifier/class_AccountPasswordVerifierFilter.php
inc/classes/main/filter/verifier/class_ConfirmCodeVerifierFilter.php
inc/classes/main/filter/verifier/class_GraphicalCodeCaptchaVerifierFilter.php
inc/classes/main/filter/verifier/class_PasswordGuestVerifierFilter.php
inc/classes/main/filter/verifier/class_PasswordVerifierFilter.php
inc/classes/main/filter/verifier/class_UserGuestVerifierFilter.php
inc/classes/main/filter/verifier/class_UserNameVerifierFilter.php
inc/classes/main/filter/verifier/class_UserStatusVerifierFilter.php
inc/classes/main/filter/verifier/class_UserUnconfirmedVerifierFilter.php
inc/classes/main/helper/web/forms/class_WebFormHelper.php
inc/classes/main/images/class_BaseImage.php
inc/classes/main/io/class_FrameworkFileOutputPointer.php
inc/classes/main/parser/xml/class_XmlParser.php
inc/classes/main/request/class_BaseRequest.php
inc/classes/main/response/http/class_HttpResponse.php
inc/classes/main/response/image/class_ImageResponse.php
inc/classes/main/rng/class_RandomNumberGenerator.php
inc/classes/main/template/image/class_ImageTemplateEngine.php
inc/classes/main/template/mail/class_MailTemplateEngine.php
inc/classes/main/template/menu/class_MenuTemplateEngine.php
inc/config.php
inc/loader/class_ClassLoader.php

index 28249ecb5c886b9483c1ca4ea5a15062440ddfe7..3d4cacd11b11f00d62ae940d58ddb8c67d8fa8a5 100644 (file)
@@ -118,7 +118,7 @@ abstract class FrameworkException extends ReflectionException {
 
                        // Are there arguments?
                        if ((isset($dbgInfo['args'])) && (is_array($dbgInfo['args'])) && (isset($dbgInfo['args'][0]))) {
-                               //* DEBUG: */ echo $dbgIndex.": <pre>".htmlentities(print_r($dbgInfo['args'], true))."</pre>";
+                               //* DEBUG: */ echo $dbgIndex.": <pre>".htmlentities(print_r($dbgInfo['args'], TRUE))."</pre>";
                                $info = '';
                                foreach ($dbgInfo['args'] as $debug) {
                                        // Add only non-array elements
index 8d9c21ac380ab9089d19590c4dc01bb1694b9f1c..a12d1d87651d9dc54a14eea0b8b30de50e164376 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * An exception thrown when the form name is invalid (set to false)
+ * An exception thrown when the form name is invalid (set to FALSE)
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
@@ -31,7 +31,7 @@ class InvalidFormNameException extends FrameworkException {
         */
        public function __construct (BaseHelper $helperInstance, $code) {
                // Add a message around the missing class
-               $message = sprintf("[%s:%d] Form name not set.",
+               $message = sprintf('[%s:%d] Form name not set.',
                        $helperInstance->__toString(),
                        $this->getLine()
                );
index ded46b686cecb4c619bb93c50d19d205cd11cc28..28ca7c39824b1cd75e4eba92b9ab6ac0022155d2 100644 (file)
@@ -24,7 +24,7 @@
 interface RegisterableSocket extends Registerable {
        /**
         * Checks whether given socket resource is registered. If $socketResource is
-        * false only the instance will be checked.
+        * FALSE only the instance will be checked.
         *
         * @param       $protocolInstance       An instance of a ProtocolHandler class
         * @param       $socketResource         A valid socket resource
index 86837c84243c3f864f7c14cf339cdfa1add7fd3d..0dfde4813776b3b7233bb4681ecdd9ccc91a66cb 100644 (file)
@@ -63,7 +63,7 @@ interface Requestable extends FrameworkInterface {
        function getHeader ($headerName);
 
        /**
-        * Sets whether the request was valid (default: true)
+        * Sets whether the request was valid (default: TRUE)
         *
         * @param       $isValid        Whether the request is valid
         * @return      void
index 64171319a05fe836014a3a533d814b07f45b99f7..ea1f912bdfa20fdc79c93fedbb0825fa38cc1f81 100644 (file)
@@ -129,10 +129,10 @@ interface CompileableTemplate extends FrameworkInterface {
         * "Compiles" a variable by replacing {?var?} with it's content
         *
         * @param       $rawCode                        Raw code to compile
-        * @param       $setMatchAsCode         Sets $match if readVariable() returns empty result
-        * @return      $rawCode        Compile code with inserted variable value
+        * @param       $setMatchAsCode         Sets $match if readVariable() returns empty result (default: FALSE)
+        * @return      $rawCode                        Compile code with inserted variable value
         */
-       function compileRawCode ($rawCode, $setMatchAsCode=false);
+       function compileRawCode ($rawCode, $setMatchAsCode = FALSE);
 
        /**
         * Renames a variable in code and in stack
index 34b0a22e6a716924f51b6e622b18345175f1e499..502ee84a7ec6eab5fb964c6eaa0b7d599978c11e 100644 (file)
@@ -326,10 +326,10 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
                        $this->setConfigInstance(FrameworkConfiguration::getSelfInstance());
                } // END - if
 
-               // Is the startup time set? (0 cannot be true anymore)
+               // Is the startup time set? (0 cannot be TRUE anymore)
                if (self::$startupTime == 0) {
                        // Then set it
-                       self::$startupTime = microtime(true);
+                       self::$startupTime = microtime(TRUE);
                } // END - if
        }
 
@@ -404,11 +404,11 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
                                        // .. or size if array
                                        $argsString .= ', ' . count($arg);
                                } elseif ($arg === TRUE) {
-                                       // ... is boolean 'true'
-                                       $argsString .= ', true';
+                                       // ... is boolean 'TRUE'
+                                       $argsString .= ', TRUE';
                                } elseif ($arg === FALSE) {
-                                       // ... is boolean 'true'
-                                       $argsString .= ', false';
+                                       // ... is boolean 'FALSE'
+                                       $argsString .= ', FALSE';
                                }
 
                                // Closing bracket
@@ -1344,7 +1344,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
                $content .= sprintf('<pre>%s</pre>',
                        trim(
                                htmlentities(
-                                       print_r($this, true)
+                                       print_r($this, TRUE)
                                )
                        )
                );
@@ -1417,7 +1417,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
         * Outputs a debug backtrace and stops further script execution
         *
         * @param       $message        An optional message to output
-        * @param       $doExit         Whether exit the program (true is default)
+        * @param       $doExit         Whether exit the program (TRUE is default)
         * @return      void
         */
        public function debugBackTrace ($message = '', $doExit = TRUE) {
@@ -1481,7 +1481,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
         *
         * @param       $message        Message we shall send out...
         * @param       $doPrint        Whether print or die here (default: print)
-        * @paran       $stripTags      Whether to strip tags (default: false)
+        * @paran       $stripTags      Whether to strip tags (default: FALSE)
         * @return      void
         */
        public function debugOutput ($message, $doPrint = TRUE, $stripTags = FALSE) {
@@ -1718,7 +1718,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
 
                // Get current array
                $fieldArray = $resultInstance->current();
-               //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput($fieldName.':<pre>'.print_r($fieldArray, true).'</pre>');
+               //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput($fieldName.':<pre>'.print_r($fieldArray, TRUE).'</pre>');
 
                // Convert dashes to underscore
                $fieldName = $this->convertDashesToUnderscores($fieldName);
@@ -1804,7 +1804,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
         */
        public function getMilliTime () {
                // Get the time of day as float
-               $milliTime = gettimeofday(true);
+               $milliTime = gettimeofday(TRUE);
 
                // Return it
                return $milliTime;
@@ -1983,7 +1983,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;
@@ -2043,7 +2043,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
         */
        protected function getPrintableExecutionTime () {
                // Caculate the execution time
-               $executionTime = microtime(true) - $this->getStartupTime();
+               $executionTime = microtime(TRUE) - $this->getStartupTime();
 
                // Pack it in nice braces
                $executionTime = sprintf('[ %01.5f ] ', $executionTime);
index 32991b81273322f985f9a7b592a54acdbc97b15b..59ec7c5922dcbe3128bd989470e2c0f4fe261ffc 100644 (file)
@@ -82,7 +82,7 @@ class Bzip2Compressor extends BaseFrameworkSystem implements Compressor {
                } // END - if
 
                // Decompress it
-               $streamData = bzdecompress($streamData, true);
+               $streamData = bzdecompress($streamData, TRUE);
 
                // Return the decompressed stream
                return $streamData;
index 4d220d710f686434645bf30b4f2c4ef1efddcf2e..a8bd7bd11e75e4f0e76d904e96e2a1a28eecfbd3 100644 (file)
@@ -309,7 +309,7 @@ class ConsoleTools extends BaseFrameworkSystem {
                                // If the response is invalid, abort
                                if ((count($response) == 3) && (empty($response[0])) && (empty($response[1])) && (empty($response[2]))) {
                                        // Invalid response!
-                                       $helperInstance->debugBackTrace('Proxy tunnel not working: response=' . print_r($response, true));
+                                       $helperInstance->debugBackTrace('Proxy tunnel not working: response=' . print_r($response, TRUE));
                                } // END - if
                        } else {
                                // Add header for proxy
index 445a90f09be4fb6b55505bf80f11b34a2daafefb..1e2c57560485b81b26de4918211a082d46496964 100644 (file)
@@ -49,7 +49,7 @@ class SocketContainer extends BaseContainer implements Registerable {
                unset($packageData[NetworkPackage::PACKAGE_DATA_SIGNATURE]);
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(__METHOD__ . ':socketResource=' . $socketResource . ',packageData='.print_r($packageData,true));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(__METHOD__ . ':socketResource=' . $socketResource . ',packageData='.print_r($packageData, TRUE));
 
                // Set the resource ...
                $containerInstance->setSocketResource($socketResource);
@@ -75,7 +75,7 @@ class SocketContainer extends BaseContainer implements Registerable {
                $packageData = $this->getPackageData();
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-CONTAINER: addressPort=' . $addressPort . ',packageData=' . print_r($packageData, true));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-CONTAINER: addressPort=' . $addressPort . ',packageData=' . print_r($packageData, TRUE));
 
                // So, does both match?
                $matches = ((isset($packageData[NetworkPackage::PACKAGE_DATA_RECIPIENT])) && ($packageData[NetworkPackage::PACKAGE_DATA_RECIPIENT] === $addressPort));
index fe3a437cb278c9262d58b31843826331bbb6cc83..d89092caaa73529eafdff9977dff3fa48a3fb683 100644 (file)
@@ -309,9 +309,9 @@ class XmlRewriterTemplateDecorator extends BaseDecorator implements CompileableT
         *
         * @param       $rawCode                        Raw code to compile
         * @param       $setMatchAsCode         Sets $match if readVariable() returns empty result
-        * @return      $rawCode        Compile code with inserted variable value
+        * @return      $rawCode                        Compile code with inserted variable value
         */
-       public function compileRawCode ($rawCode, $setMatchAsCode=false) {
+       public function compileRawCode ($rawCode, $setMatchAsCode = FALSE) {
                return $this->getTemplateInstance()->compileRawCode($rawCode, $setMatchAsCode);
        }
 
index b6309baa55ddbda99fa772f89b5c4d57a9722c64..444e4e14f4b0317b48f672f1e0b1b08ee4d2c0be 100644 (file)
@@ -70,11 +70,8 @@ class LocalPaymentDiscovery extends BaseDiscovery implements Discoverable, Regis
                // Get result back
                $resultInstance = $wrapperInstance->doSelectByCriteria($criteriaInstance);
 
-               // Advanced to next entry
-               if (!$resultInstance->next()) {
-                       // Not valid!
-                       assert(false);
-               } // END - if
+               // Advanced to next entry and assert on it as it should always be there
+               assert($resultInstance->next());
 
                // Set the result instance
                $this->setResultInstance($resultInstance);
index 060ebf8109fa6eedb3489001c10a0af3eb1d8169..be05063e4d120454d7d493bda78b26c15386aeec 100644 (file)
@@ -52,7 +52,7 @@ class XmlTemplateEngineFactory extends ObjectFactory {
                        $templateInstance = ObjectFactory::createObjectByConfiguredName($configEntry);
 
                        // Disable language support
-                       $templateInstance->enableLanguageSupport(false);
+                       $templateInstance->enableLanguageSupport(FALSE);
 
                        /*
                         * Enable compacting/rewriting of the  XML to save bandwidth from XML
index 5d21a1ce61dabb036a47cf0c4124c8a7e07e7ce5..3c9b5f9fea5d64434aea2e65ee9e3da465290a6e 100644 (file)
@@ -92,7 +92,7 @@ class UserAuthFilter extends BaseFilter implements Filterable {
                        $authInstance->destroyAuthData();
 
                        // Mark the request as invalid
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->requestIsValid(FALSE);
 
                        // Add fatal message
                        $responseInstance->addFatalMessage('auth_data_incomplete');
index f4bb048ccba50179a7edd5767685e2fb02168d32..5a2cbc91a1356687eb74df0336cef1edf7f7f10b 100644 (file)
@@ -51,6 +51,7 @@ class EmailChangeFilter extends BaseFilter implements Filterable {
         * @param       $requestInstance        An instance of a class with an Requestable interface
         * @param       $responseInstance       An instance of a class with an Responseable interface
         * @return      void
+        * @throws      FilterChainException    If this filter fails to operate
         * @todo        Implement email change of the user here. HINT: Use the User class!
         */
        public function execute (Requestable $requestInstance, Responseable $responseInstance) {
@@ -61,43 +62,43 @@ class EmailChangeFilter extends BaseFilter implements Filterable {
                // Is only first email set?
                if ((!empty($email1)) && (empty($email2))) {
                        // Request is invalid!
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->requestIsValid(FALSE);
 
                        // Email 2 is empty
                        $responseInstance->addFatalMessage('email2_empty');
 
                        // Stop processing here
-                       return false;
+                       throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED);
                } // END - if
 
                // Is only second email set?
                if ((empty($email1)) && (!empty($email2))) {
                        // Request is invalid!
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->requestIsValid(FALSE);
 
                        // Email 1 is empty
                        $responseInstance->addFatalMessage('email1_empty');
 
                        // Stop processing here
-                       return false;
+                       throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED);
                } // END - if
 
                // Do both match?
                if ($email1 != $email2) {
                        // Request is invalid!
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->requestIsValid(FALSE);
 
                        // Emails are mismatching
                        $responseInstance->addFatalMessage('emails_mismatch');
 
                        // Stop processing here
-                       return false;
+                       throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED);
                } // END - if
 
                // Are email and confirmation empty?
                if ((empty($email1)) && (empty($email2))) {
                        // No email change required!
-                       return true;
+                       return TRUE;
                } // END - if
 
                // Now, get a user instance for comparison
@@ -109,11 +110,11 @@ class EmailChangeFilter extends BaseFilter implements Filterable {
                // Are they different?
                if ($userEmail == $email1) {
                        // Nothing has been changed is fine...
-                       return true;
+                       return TRUE;
                } // END - if
 
                // Update the "new_email" field
-               $this->partialStub("Unfinished part.");
+               $this->partialStub('Unfinished part.');
        }
 }
 
index 75534a3ac075d0d5c8dcb88e821c6e781d6505c2..ed7ceefaa63636ca8470a67b76d1155cc833e50c 100644 (file)
@@ -53,6 +53,7 @@ class PasswordChangeFilter extends BaseFilter implements Filterable {
         * @param       $responseInstance       An instance of a class with an Responseable interface
         * @return      void
         * @todo        Finished updating user password hash here. HINT: Use the User class again.
+        * @throws      FilterChainException    If this filter fails to operate
         */
        public function execute (Requestable $requestInstance, Responseable $responseInstance) {
                // Get both passwords
@@ -62,50 +63,50 @@ class PasswordChangeFilter extends BaseFilter implements Filterable {
                // Is only first email set?
                if ((!empty($pass1)) && (empty($pass2))) {
                        // Request is invalid!
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->requestIsValid(FALSE);
 
                        // Email 2 is empty
                        $responseInstance->addFatalMessage('pass2_empty');
 
                        // Stop processing here
-                       return false;
+                       throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED);
                } // END - if
 
                // Is only second pass set?
                if ((empty($pass1)) && (!empty($pass2))) {
                        // Request is invalid!
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->requestIsValid(FALSE);
 
                        // Email 1 is empty
                        $responseInstance->addFatalMessage('pass1_empty');
 
                        // Stop processing here
-                       return false;
+                       throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED);
                } // END - if
 
                // Are password and confirmation empty?
                if ((empty($pass1)) && (empty($pass2))) {
                        // Don't change password here
-                       return true;
+                       return TRUE;
                } // END - if
 
                // Do both match?
                if ($pass1 != $pass2) {
                        // Request is invalid!
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->requestIsValid(FALSE);
 
                        // Emails are mismatching
                        $responseInstance->addFatalMessage('pass_mismatch');
 
                        // Stop processing here
-                       return false;
+                       throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED);
                } // END - if
 
                // Now, get a user instance for comparison
                $userInstance = Registry::getRegistry()->getInstance('user');
 
                // Update the "password" field
-               $this->partialStub("Unfinished part.");
+               $this->partialStub('Unfinished part.');
        }
 }
 
index 37b27c41815a5331f0054c71684aaf008fb5698b..b14cf530554605744b3d073ac5a0f4976c2d86cb 100644 (file)
@@ -53,6 +53,7 @@ class RulesAcceptedFilter extends BaseFilter implements Filterable {
         * @param       $requestInstance        An instance of a class with an Requestable interface
         * @param       $responseInstance       An instance of a class with an Responseable interface
         * @return      void
+        * @throws      FilterChainException    If this filter fails to operate
         */
        public function execute (Requestable $requestInstance, Responseable $responseInstance) {
                // Get the "rules" value from request
@@ -61,14 +62,14 @@ class RulesAcceptedFilter extends BaseFilter implements Filterable {
                // Was the "rules" value found in form? And is it set?
                if (is_null($rules)) {
                        // Not found in form so stop processing here
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->requestIsValid(FALSE);
 
                        // Add a message to the response
                        $responseInstance->addFatalMessage('rules_unchecked');
 
                        // Skip further processing
-                       return false;
-               }
+                       throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED);
+               } // END - if
        }
 }
 
index fc442830e57aad71af9dcb33c0048481c1c6669a..cb8d461bc26466e9935a31dd3bd6a3b19b3deba7 100644 (file)
@@ -51,6 +51,7 @@ class ???Filter extends BaseFilter implements Filterable {
         * @param       $requestInstance        An instance of a class with an Requestable interface
         * @param       $responseInstance       An instance of a class with an Responseable interface
         * @return      void
+        * @throws      FilterChainException    If this filter fails to operate
         * @todo        0% done
         */
        public function execute (Requestable $requestInstance, Responseable $responseInstance) {
index d1374a59245337d1452c7d37e168a13046acc64c..5b1e020218e10d98eb2771764762e6960a280cfa 100644 (file)
@@ -65,7 +65,8 @@ class FilterChain extends BaseFrameworkSystem implements Registerable {
        }
 
        /**
-        * Process all added filters
+        * Process all added filters. Please note that filters must throw
+        * FilterChainException if they need to interrupt the filter chain.
         *
         * @param       $requestInstance        An instance of a request class
         * @param       $responseInstance       An instance of a response class
index 93183f083d0fe307b34b5a056cc200cf10f5c707..1d54d0bebef08ad24961444348c1792ed593967f 100644 (file)
@@ -60,7 +60,7 @@ class CaptchaEncryptFilter extends BaseFilter implements Filterable {
                // Is it there?
                if (is_null($encryptRequest)) {
                        // Not found, so request is invalid
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->requestIsValid(FALSE);
 
                        // Throw exception
                        throw new EncryptMissingException($this, CryptoHelper::EXCEPTION_ENCRYPT_MISSING);
@@ -75,7 +75,7 @@ class CaptchaEncryptFilter extends BaseFilter implements Filterable {
                // Is it the expected length?
                if (strlen($decryptedString) != $this->getConfigInstance()->getConfigEntry('captcha_string_length')) {
                        // Not found, so request is invalid
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->requestIsValid(FALSE);
 
                        // Throw exception
                        throw new EncryptInvalidLengthException($this, CryptoHelper::EXCEPTION_ENCRYPT_INVALID);
index f40358d7abec5580b7706b42decaf45eed808f48..3c88d98ed021a39bcc90a5f8493c0e369d693e26 100644 (file)
@@ -110,7 +110,7 @@ class PaymentDiscoveryFilter extends BaseFilter implements Filterable {
                        Registry::getRegistry()->addInstance('payments', $discoveryInstance);
                } catch (NoConfigEntryException $e) {
                        // Something bad happend
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->requestIsValid(FALSE);
 
                        // Add a message to the response
                        $responseInstance->addFatalMessage('payment_config_entry_error');
@@ -120,7 +120,7 @@ class PaymentDiscoveryFilter extends BaseFilter implements Filterable {
                        throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED);
                } catch (NoClassException $e) {
                        // Something bad happend
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->requestIsValid(FALSE);
 
                        // Add a message to the response
                        $responseInstance->addFatalMessage('payment_class_error');
index 99c2291c5f0716cf0d2362f210e0c27b96b5d759..b46713f932e7e232d8c0057ff3d84385d0399923 100644 (file)
@@ -69,7 +69,7 @@ class EmailValidatorFilter extends BaseFilter implements Filterable {
                        // Is the email still not set?
                        if ((is_null($email1)) || (is_null($email2))) {
                                // Not found in form so stop the filtering process
-                               $requestInstance->requestIsValid(false);
+                               $requestInstance->requestIsValid(FALSE);
 
                                // Add a message to the response
                                $responseInstance->addFatalMessage('email_unset');
@@ -78,7 +78,7 @@ class EmailValidatorFilter extends BaseFilter implements Filterable {
                                throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED);
                        } elseif ((empty($email1)) || (empty($email2))) {
                                // Email is empty
-                               $requestInstance->requestIsValid(false);
+                               $requestInstance->requestIsValid(FALSE);
 
                                // Is the email empty?
                                if (empty($email1)) {
@@ -96,7 +96,7 @@ class EmailValidatorFilter extends BaseFilter implements Filterable {
                                throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED);
                        } elseif ($this->ifEmailIsTaken($email1)) {
                                // Email is already taken
-                               $requestInstance->requestIsValid(false);
+                               $requestInstance->requestIsValid(FALSE);
 
                                // Add a message to the response
                                $responseInstance->addFatalMessage('email_taken');
@@ -105,7 +105,7 @@ class EmailValidatorFilter extends BaseFilter implements Filterable {
                                throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED);
                        } elseif ($email1 != $email2) {
                                // Emails didn't match
-                               $requestInstance->requestIsValid(false);
+                               $requestInstance->requestIsValid(FALSE);
 
                                // Add a message to the response
                                $responseInstance->addFatalMessage('emails_mismatch');
@@ -115,7 +115,7 @@ class EmailValidatorFilter extends BaseFilter implements Filterable {
                        } // END - elseif
                } elseif (empty($email)) {
                        // Empty field!
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->requestIsValid(FALSE);
 
                        // Add a message to the response
                        $responseInstance->addFatalMessage('email_empty');
index 3251cc66aa613aa8cdcaa6a1e7edca6dbc258cfa..b421fe5e040b53ed216ea39e5713d15bd843f3c2 100644 (file)
@@ -62,7 +62,7 @@ class PasswordValidatorFilter extends BaseFilter implements Filterable {
                // Is the password still not set?
                if ((is_null($password1)) || (is_null($password2))) {
                        // Not found in form so stop the filtering process
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->requestIsValid(FALSE);
 
                        // Add a message to the response
                        $responseInstance->addFatalMessage('password_unset');
@@ -71,7 +71,7 @@ class PasswordValidatorFilter extends BaseFilter implements Filterable {
                        throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED);
                } elseif ((empty($password1)) || (empty($password2))) {
                        // Password is empty
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->requestIsValid(FALSE);
 
                        // Is the password empty?
                        if (empty($password1)) {
@@ -89,7 +89,7 @@ class PasswordValidatorFilter extends BaseFilter implements Filterable {
                        throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED);
                } elseif ($password1 != $password2) {
                        // Passwords didn't match
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->requestIsValid(FALSE);
 
                        // Add a message to the response
                        $responseInstance->addFatalMessage('pass_mismatch');
index 305db340aad382bd5fbdab64ab18670c8b28992b..ed8098c9392b65e8f20a1647258d8d4fabc88315 100644 (file)
@@ -62,7 +62,7 @@ class UserNameValidatorFilter extends BaseFilter implements Filterable {
                // Is the username set?
                if (is_null($userName)) {
                        // Not found in form so stop the filtering process
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->requestIsValid(FALSE);
 
                        // Add a message to the response
                        $responseInstance->addFatalMessage('username_unset');
@@ -71,7 +71,7 @@ class UserNameValidatorFilter extends BaseFilter implements Filterable {
                        throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED);
                } elseif (empty($userName)) {
                        // Empty field!
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->requestIsValid(FALSE);
 
                        // Add a message to the response
                        $responseInstance->addFatalMessage('username_empty');
@@ -80,7 +80,7 @@ class UserNameValidatorFilter extends BaseFilter implements Filterable {
                        throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED);
                } elseif ($this->ifUserNameIsTaken($userName)) {
                        // Username is already taken
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->requestIsValid(FALSE);
 
                        // Add a message to the response
                        $responseInstance->addFatalMessage('username_taken');
index c9bbff6401b5ccc65ee4ae98fea4d835cc2a1d1b..ecefb6e083e2bc7794204b72ea429ae420a3c92e 100644 (file)
@@ -68,7 +68,7 @@ class AccountPasswordVerifierFilter extends BaseFilter implements Filterable {
                        // Is the password still not set?
                        if (is_null($password)) {
                                // Not found in form so stop the filtering process
-                               $requestInstance->requestIsValid(false);
+                               $requestInstance->requestIsValid(FALSE);
 
                                // Add a message to the response
                                $responseInstance->addFatalMessage('password_unset');
@@ -80,7 +80,7 @@ class AccountPasswordVerifierFilter extends BaseFilter implements Filterable {
 
                if (empty($password)) {
                        // Password is empty
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->requestIsValid(FALSE);
 
                        // Add a message to the response
                        $responseInstance->addFatalMessage('password_empty');
index 112e63bc069f33da13d261a7578f2aee055d0d41..8992ee8f76a4d305955104c6ed408f8378ab15a3 100644 (file)
@@ -60,7 +60,7 @@ class ConfirmCodeVerifierFilter extends BaseFilter implements Filterable {
                // Is this code set?
                if (is_null($confirmCode)) {
                        // Is not in request
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->requestIsValid(FALSE);
 
                        // Add a message to the response
                        $responseInstance->addFatalMessage('confirm_code_unset');
@@ -69,7 +69,7 @@ class ConfirmCodeVerifierFilter extends BaseFilter implements Filterable {
                        throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED);
                } elseif (empty($confirmCode)) {
                        // Email is empty
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->requestIsValid(FALSE);
 
                        // Add a message to the response
                        $responseInstance->addFatalMessage('confirm_code_empty');
@@ -87,7 +87,7 @@ class ConfirmCodeVerifierFilter extends BaseFilter implements Filterable {
                // Do we have the same code or different?
                if ($userCode != $confirmCode) {
                        // Email is empty
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->requestIsValid(FALSE);
 
                        // Redirect to error page
                        $responseInstance->redirectToConfiguredUrl('confirm_code_invalid');
index f23e13e3a9d0361077aad496d1831b202317cdbf..1e23c64128e670e6d84b4a95e1c39d4e28325d74 100644 (file)
@@ -51,6 +51,7 @@ class GraphicalCodeCaptchaVerifierFilter extends BaseFilter implements Filterabl
         * @param       $requestInstance        An instance of a class with an Requestable interface
         * @param       $responseInstance       An instance of a class with an Responseable interface
         * @return      void
+        * @throws      FilterChainException    If this filter fails to operate
         */
        public function execute (Requestable $requestInstance, Responseable $responseInstance) {
                // Get the captcha code
@@ -59,22 +60,22 @@ class GraphicalCodeCaptchaVerifierFilter extends BaseFilter implements Filterabl
                // Is this set?
                if (is_null($captchaCode)) {
                        // Not set so request is invalid
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->requestIsValid(FALSE);
 
                        // Add fatal message
                        $responseInstance->addFatalMessage('captcha_code_unset');
 
                        // Skip further processing
-                       return false;
+                       throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED);
                } elseif (empty($captchaCode)) {
                        // Empty value so request is invalid
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->requestIsValid(FALSE);
 
                        // Add fatal message
                        $responseInstance->addFatalMessage('captcha_code_empty');
 
                        // Skip further processing
-                       return false;
+                       throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED);
                }
 
                // Get the hash as well
@@ -83,22 +84,22 @@ class GraphicalCodeCaptchaVerifierFilter extends BaseFilter implements Filterabl
                // Is this set?
                if (is_null($captchaHash)) {
                        // Not set so request is invalid
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->requestIsValid(FALSE);
 
                        // Add fatal message
                        $responseInstance->addFatalMessage('captcha_hash_unset');
 
                        // Skip further processing
-                       return false;
+                       throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED);
                } elseif (empty($captchaHash)) {
                        // Empty value so request is invalid
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->requestIsValid(FALSE);
 
                        // Add fatal message
                        $responseInstance->addFatalMessage('captcha_hash_empty');
 
                        // Skip further processing
-                       return false;
+                       throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED);
                }
 
                // Now, both are set hash the given one. First get a crypto instance
@@ -110,10 +111,13 @@ class GraphicalCodeCaptchaVerifierFilter extends BaseFilter implements Filterabl
                // Is this CAPTCHA valid?
                if ($hashedCode != $captchaHash) {
                        // Not the same so request is invalid
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->requestIsValid(FALSE);
 
                        // Add fatal message
                        $responseInstance->addFatalMessage('captcha_hash_mismatch');
+
+                       // Skip further processing
+                       throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED);
                } // END - not the same!
        }
 }
index 51ade97925101b03e443d6f0b2cfa21a5da5cbbc..aa6027af7ae3d651218f222835a298ae2a65550e 100644 (file)
@@ -61,7 +61,7 @@ class PasswordGuestVerifierFilter extends BaseFilter implements Filterable {
                // Is the password still not set?
                if (is_null($password)) {
                        // Not found in form so stop the filtering process
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->requestIsValid(FALSE);
 
                        // Add a message to the response
                        $responseInstance->addFatalMessage('password_unset');
@@ -70,7 +70,7 @@ class PasswordGuestVerifierFilter extends BaseFilter implements Filterable {
                        throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED);
                } elseif (empty($password)) {
                        // Password is empty
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->requestIsValid(FALSE);
 
                        // Add a message to the response
                        $responseInstance->addFatalMessage('password_empty');
index c02334519ee8cb8b00382cba1219330c4f247d40..ca5f146e85c81a4efe7526f629872a447f2f0fc6 100644 (file)
@@ -61,7 +61,7 @@ class PasswordVerifierFilter extends BaseFilter implements Filterable {
                // Is the password still not set?
                if (is_null($password)) {
                        // Not found in form so stop the filtering process
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->requestIsValid(FALSE);
 
                        // Add a message to the response
                        $responseInstance->addFatalMessage('password_unset');
@@ -70,7 +70,7 @@ class PasswordVerifierFilter extends BaseFilter implements Filterable {
                        throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED);
                } elseif (empty($password)) {
                        // Password is empty
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->requestIsValid(FALSE);
 
                        // Add a message to the response
                        $responseInstance->addFatalMessage('password_empty');
index 126073ef3a30e7f2e326980e99cb1a9a04656ee0..b17e694e54458881d9bc3fbc0836f21d8273797b 100644 (file)
@@ -62,7 +62,7 @@ class UserGuestVerifierFilter extends BaseFilter implements Filterable {
                // Is the username set?
                if (is_null($userName)) {
                        // Not found in form so stop the filtering process
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->requestIsValid(FALSE);
 
                        // Add a message to the response
                        $responseInstance->addFatalMessage('username_guest_unset');
@@ -71,7 +71,7 @@ class UserGuestVerifierFilter extends BaseFilter implements Filterable {
                        throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED);
                } elseif (empty($userName)) {
                        // Empty field!
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->requestIsValid(FALSE);
 
                        // Add a message to the response
                        $responseInstance->addFatalMessage('username_guest_empty');
@@ -80,7 +80,7 @@ class UserGuestVerifierFilter extends BaseFilter implements Filterable {
                        throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED);
                } elseif ($this->ifUserGuestIsTaken($userName) === FALSE) {
                        // Username is already taken
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->requestIsValid(FALSE);
 
                        // Add a message to the response
                        $responseInstance->addFatalMessage('username_guest_not_found');
index f82a06326741af79969c5b2dd5545c7d88f10511..d7342cdab1e1c04ede03bddbdae5ea81306fdfa4 100644 (file)
@@ -62,7 +62,7 @@ class UserNameVerifierFilter extends BaseFilter implements Filterable {
                // Is the username set?
                if (is_null($userName)) {
                        // Not found in form so stop the filtering process
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->requestIsValid(FALSE);
 
                        // Add a message to the response
                        $responseInstance->addFatalMessage('username_unset');
@@ -71,7 +71,7 @@ class UserNameVerifierFilter extends BaseFilter implements Filterable {
                        throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED);
                } elseif (empty($userName)) {
                        // Empty field!
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->requestIsValid(FALSE);
 
                        // Add a message to the response
                        $responseInstance->addFatalMessage('username_empty');
@@ -80,7 +80,7 @@ class UserNameVerifierFilter extends BaseFilter implements Filterable {
                        throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED);
                } elseif ($this->ifUserNameIsTaken($userName) === FALSE) {
                        // Username is already taken
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->requestIsValid(FALSE);
 
                        // Add a message to the response
                        $responseInstance->addFatalMessage('username_not_found');
index e4f0ef7f7df5caa09df052d3ebaae46275a66b72..0596bd5312f99f97b491152f7a8346b1e136dfab 100644 (file)
@@ -59,7 +59,7 @@ class UserStatusVerifierFilter extends BaseFilter implements Filterable {
                // Is the user account confirmed?
                if (($userInstance->getField(UserDatabaseWrapper::DB_COLUMN_USER_STATUS) != $this->getConfigInstance()->getConfigEntry('user_status_confirmed')) && ($userInstance->getField(UserDatabaseWrapper::DB_COLUMN_USER_STATUS) != $this->getConfigInstance()->getConfigEntry('user_status_guest')) && ($requestInstance->getRequestElement('action') != $this->getConfigInstance()->getConfigEntry('action_status_problem'))) {
                        // Request is invalid!
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->requestIsValid(FALSE);
 
                        // Redirect to configured URL
                        $responseInstance->redirectToConfiguredUrl('login_user_status');
index 9d34119411b5059e8c24cea39af912cef09c000d..ba8ad6f8dbccd0c7157b6fa74563cb257b2ca136 100644 (file)
@@ -62,7 +62,7 @@ class UserUnconfirmedVerifierFilter extends BaseFilter implements Filterable {
                // Is the email address valid?
                if ($userInstance->ifEmailAddressExists() === FALSE) {
                        // Request is invalid!
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->requestIsValid(FALSE);
 
                        // Redirect to configured URL
                        $responseInstance->redirectToConfiguredUrl('user_unconfirmed_email_missing');
@@ -74,7 +74,7 @@ class UserUnconfirmedVerifierFilter extends BaseFilter implements Filterable {
                // Is the user account confirmed?
                if ($userInstance->getField(UserDatabaseWrapper::DB_COLUMN_USER_STATUS) != $this->getConfigInstance()->getConfigEntry('user_status_unconfirmed')) {
                        // Request is invalid!
-                       $requestInstance->requestIsValid(false);
+                       $requestInstance->requestIsValid(FALSE);
 
                        // Redirect to configured URL
                        $responseInstance->redirectToConfiguredUrl('user_not_unconfirmed');
index e0eea486924ae1ca515eade78eb8d4e3d70e009c..97cae36407a253635cef5e29192ce6976b551bd2 100644 (file)
@@ -23,7 +23,7 @@
  */
 class WebFormHelper extends BaseWebHelper implements HelpableTemplate {
        /**
-        * Whether the form tag is opened (keep at false or else your forms will
+        * Whether the form tag is opened (keep at FALSE or else your forms will
         * never work!)
         */
        private $formOpened = FALSE;
@@ -34,7 +34,7 @@ class WebFormHelper extends BaseWebHelper implements HelpableTemplate {
        private $formName = '';
 
        /**
-        * Whether form tag is enabled (default: true)
+        * Whether form tag is enabled (default: TRUE)
         */
        private $formEnabled = TRUE;
 
@@ -79,13 +79,13 @@ class WebFormHelper extends BaseWebHelper implements HelpableTemplate {
                // Set form name
                $helperInstance->setFormName($formName);
 
-               // A form-less field may say 'false' here...
+               // A form-less field may say 'FALSE' here...
                if ($withForm === TRUE) {
                        // Create the form
                        $helperInstance->addFormTag($formName, $formId);
                } else {
                        // Disable form
-                       $helperInstance->enableForm(false);
+                       $helperInstance->enableForm(FALSE);
                }
 
                // Return the prepared instance
@@ -95,8 +95,8 @@ class WebFormHelper extends BaseWebHelper implements HelpableTemplate {
        /**
         * Add the form tag or close it an already opened form tag
         *
-        * @param       $formName       Name of the form (default: false)
-        * @param       $formId         Id of the form (attribute 'id'; default: false)
+        * @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)
         * @todo        Add some unique PIN here to bypass problems with some browser and/or extensions
@@ -389,7 +389,7 @@ class WebFormHelper extends BaseWebHelper implements HelpableTemplate {
                // Same group to open?
                if (($this->ifGroupOpenedPreviously() === FALSE) && ($groupId === $this->getPreviousGroupId())) {
                        // Abort here silently
-                       return false;
+                       return FALSE;
                } // END - if
 
                // Initialize content with closing div by default
@@ -464,7 +464,7 @@ class WebFormHelper extends BaseWebHelper implements HelpableTemplate {
                // Same sub group to open?
                if (($this->ifSubGroupOpenedPreviously() === FALSE) && ($subGroupId == $this->getPreviousSubGroupId())) {
                        // Abort here silently
-                       return false;
+                       return FALSE;
                } // END - if
 
                // Initialize content with closing div by default
@@ -852,7 +852,7 @@ class WebFormHelper extends BaseWebHelper implements HelpableTemplate {
         * @todo        Implement check if rules have been changed
         */
        public function ifRulesHaveChanged () {
-               return false;
+               return FALSE;
        }
 
        /**
index 7a556111e88e49f4c37e737b578871c90345f358..cb7c8a887d2abd9dbc635a586897c852f336caee 100644 (file)
@@ -505,7 +505,7 @@ class BaseImage extends BaseFrameworkSystem implements Registerable {
                                // Walk through all groups
                                foreach ($templateInstance->getVariableGroups() as $group => $set) {
                                        // Set the group
-                                       $templateInstance->setVariableGroup($group, false);
+                                       $templateInstance->setVariableGroup($group, FALSE);
 
                                        // Compile image string
                                        $imageString = $templateInstance->compileRawCode($this->getString());
index 4be2d02e123722d4243c31a964305b54912fe862..24633cd19da8433487b157faab388c26e1a60782 100644 (file)
@@ -73,7 +73,7 @@ class FrameworkFileOutputPointer extends BaseFrameworkSystem {
 
                // Try to open a handler
                $filePointer = @fopen($fileName, $mode);
-               if (($filePointer === null) || ($filePointer === FALSE)) {
+               if ((is_null($filePointer)) || ($filePointer === FALSE)) {
                        // Something bad happend
                        throw new FileIoException ($fileName, self::EXCEPTION_FILE_POINTER_INVALID);
                } // END - if
index 85b6ab7304c097c1da84f73fc0ca6503180959fe..5e88beb7335bac9fd2e0adab311d6efecdb8b831 100644 (file)
@@ -84,7 +84,7 @@ class XmlParser extends BaseParser implements Parseable {
                $xmlParser = xml_parser_create();
 
                // Force case-folding to on
-               xml_parser_set_option($xmlParser, XML_OPTION_CASE_FOLDING, true);
+               xml_parser_set_option($xmlParser, XML_OPTION_CASE_FOLDING, TRUE);
 
                // Set UTF-8
                xml_parser_set_option($xmlParser, XML_OPTION_TARGET_ENCODING, 'UTF-8');
index 01207d18502bc00bfa0d3d996a378ada8ab858e1..d2ca3867a10b5a8f20d3038b21d9097e876a3c12 100644 (file)
@@ -29,7 +29,7 @@ class BaseRequest extends BaseFrameworkSystem {
 
        /**
         * Whether this request is valid and can be further processed. The default is
-        * valid so make sure your intercepting filters sets this attribute to false
+        * valid so make sure your intercepting filters sets this attribute to FALSE
         * when they need to intercept the data flow.
         */
        private $requestIsValid = TRUE;
@@ -113,7 +113,7 @@ class BaseRequest extends BaseFrameworkSystem {
        }
 
        /**
-        * Sets whether the request was valid (default: true)
+        * Sets whether the request was valid (default: TRUE)
         *
         * @param       $isValid        Whether the request is valid
         * @return      void
index 3130e345bd5d978ab292ffe20324e1c62fb1eb45..23f4a38a8e70c1af761452f04bbefa32b65a5395 100644 (file)
@@ -177,7 +177,7 @@ class HttpResponse extends BaseResponse implements Responseable {
                // Is the cookie there?
                if (isset($_COOKIE[$cookieName])) {
                        // Then expire it with 20 minutes past
-                       $this->addCookie($cookieName, '', false, (time() - 1200));
+                       $this->addCookie($cookieName, '', FALSE, (time() - 1200));
 
                        // Remove it from array
                        unset($_COOKIE[$cookieName]);
@@ -194,7 +194,7 @@ class HttpResponse extends BaseResponse implements Responseable {
                // Only update existing cookies
                if (isset($_COOKIE[$cookieName])) {
                        // Update the cookie
-                       $this->addCookie($cookieName, $_COOKIE[$cookieName], false);
+                       $this->addCookie($cookieName, $_COOKIE[$cookieName], FALSE);
                } // END - if
        }
 
index 0a6170e4a645dbac46f35b35d779d417a752871e..1aeb0a7977a9fe3d584627e5a9417484916f405e 100644 (file)
@@ -210,7 +210,7 @@ class ImageResponse extends BaseResponse implements Responseable {
                // Is the cookie there?
                if (isset($_COOKIE[$cookieName])) {
                        // Then expire it with 20 minutes past
-                       $this->addCookie($cookieName, '', false, (time() - 1200));
+                       $this->addCookie($cookieName, '', FALSE, (time() - 1200));
 
                        // Remove it from array
                        unset($_COOKIE[$cookieName]);
@@ -227,7 +227,7 @@ class ImageResponse extends BaseResponse implements Responseable {
                // Only update existing cookies
                if (isset($_COOKIE[$cookieName])) {
                        // Update the cookie
-                       $this->addCookie($cookieName, $_COOKIE[$cookieName], false);
+                       $this->addCookie($cookieName, $_COOKIE[$cookieName], FALSE);
                } // END - if
        }
 
index 6b26fe848510cbd30a320ce818efae737ad85214..dc3e6028c4c111172b3efb7ec0d290926d339803 100644 (file)
@@ -105,7 +105,7 @@ class RandomNumberGenerator extends BaseFrameworkSystem {
                $this->extraNumber = ($this->prime * $this->prime / pow(pi(), 2));
 
                // Seed mt_rand()
-               mt_srand((double) sqrt(microtime(true) * 100000000 * $this->extraNumber));
+               mt_srand((double) sqrt(microtime(TRUE) * 100000000 * $this->extraNumber));
 
                // Set the server IP to cluster
                $serverIp = 'cluster';
index 22262c0952d2ab8ac972b52dc1573a74477f9cf0..8d978eb0d55c03a25dbc78cd72e6f3df5614733b 100644 (file)
@@ -221,11 +221,11 @@ class ImageTemplateEngine extends BaseTemplateEngine implements CompileableTempl
                // Is this string empty?
                if (empty($characters)) {
                        // Then skip it silently
-                       return false;
+                       return;
                } // END - if
 
                // Unfinished work!
-               $this->partialStub("Handling extra characters is not yet supported!");
+               $this->partialStub('Handling extra characters is not yet supported!');
        }
 
        /**
index 308b266782c708bd99024cbc11708c9c2fc50d94..7615a56710b8ceca43424b4e6189940bf515f830 100644 (file)
@@ -214,7 +214,7 @@ class MailTemplateEngine extends BaseTemplateEngine implements CompileableTempla
                // Is this string empty?
                if (empty($characters)) {
                        // Then skip it silently
-                       return false;
+                       return;
                } // END - if
 
                // Add the message now
index 9adf01e6c1bd5015952b4883f8773002aa7e3d70..7b638fbffeb1cdda9d2ef2ba9b18ee5a4bced7ba 100644 (file)
@@ -273,7 +273,7 @@ class MenuTemplateEngine extends BaseTemplateEngine implements CompileableTempla
                // Is this string empty?
                if (empty($characters)) {
                        // Then skip it silently
-                       return false;
+                       return;
                } // END - if
 
                // Assign the found characters to variable and use the last entry from
index bb0defe49daae41bae1b5e4af19becf517bf6478..dfefbcb9b09d235d8b303b0d4fce6eab64d0a1c1 100644 (file)
@@ -48,7 +48,7 @@ $cfg->setConfigEntry('local_db_path', $cfg->getConfigEntry('base_path') . 'db/')
 $cfg->setDefaultTimezone('Europe/Berlin');
 
 // CFG: MAGIC-QUOTES-RUNTIME
-$cfg->setMagicQuotesRuntime(false);
+$cfg->setMagicQuotesRuntime(FALSE);
 
 // CFG: CLASS-PREFIX
 $cfg->setConfigEntry('class_prefix', 'class_');
index 0c54eb6343bd6950db1879e92b14981edb4e6a91..50f34f3772edeabfe11fe5d2da8996c9bff37b9f 100644 (file)
@@ -69,7 +69,7 @@ class ClassLoader {
        private $ignoreList = array();
 
        /**
-        * Debug this class loader? (true = yes, false = no)
+        * Debug this class loader? (TRUE = yes, FALSE = no)
         */
        private $debug = FALSE;
 
@@ -268,7 +268,7 @@ class ClassLoader {
                 */
                $basePath2 = realpath($basePath);
 
-               // If the basePath is false it is invalid
+               // If the basePath is FALSE it is invalid
                if ($basePath2 === FALSE) {
                        /* @todo: Do not die here. */
                        exit(__METHOD__ . ':Cannot read ' . $basePath . ' !');