From: Roland Häder Date: Sun, 12 Dec 2021 07:05:34 +0000 (+0100) Subject: Continued: X-Git-Url: https://git.mxchange.org/?p=core.git;a=commitdiff_plain;h=08a0c865dd2c8ee0b6dbf96f4f07e9ee0ce0f02b Continued: - removed more // END - occurances as I don't do them anymore Signed-off-by: Roland Häder --- diff --git a/application/tests/exceptions.php b/application/tests/exceptions.php index a336bb98..bdcf2cb5 100644 --- a/application/tests/exceptions.php +++ b/application/tests/exceptions.php @@ -42,7 +42,7 @@ function tests_exception_handler ($exceptionInstance) { // Convert arguments type into human-readable foreach ($traceArray['args'] as $arg) { $argsString .= ', ' . gettype($arg); - } // END - foreach + } $argsString = substr($argsString, 2); // Set missing file/line @@ -64,7 +64,7 @@ Line : %d\n", basename($traceArray['file']), $traceArray['line'] ); - } // END - foreach + } // Construct the message $message = sprintf("-------------------------------------------------------------------------------- @@ -121,7 +121,7 @@ function tests_assert_handler (string $file, int $line, $code) { // Empty code? if ($code === '') { $code = 'Unknown'; - } // END - if + } // Create message $message = sprintf('File: %s, Line: %s, Code: %s', diff --git a/contrib/chash/chash.php b/contrib/chash/chash.php index 4dfc6075..4911ba57 100644 --- a/contrib/chash/chash.php +++ b/contrib/chash/chash.php @@ -169,7 +169,7 @@ while (true) { // Reset timer $timeDisplay = microtime(true); $GLOBALS['iteration_second'] = 0; - } // END - if + } // Time spend from last flush $testTime = abs(microtime(true) - $GLOBALS['time_flush']); @@ -178,7 +178,7 @@ while (true) { if ($testTime >= $GLOBALS['flush_file_time']) { // Flush check-point file flushCheckPointFile($GLOBALS['current_hash']); - } // END - if + } // Time spend from last found block $testTime = abs(microtime(true) - $GLOBALS['found_time']); @@ -200,7 +200,7 @@ while (true) { if (!isset($hash['root_hash'])) { // Bad file die('INCONSISTENCY: hash=' . print_r($hash, true)); - } // END - if + } if (isset($rootHashes[$hash['root_hash']])) { // Count up @@ -209,23 +209,21 @@ while (true) { // First entry found $rootHashes[$hash['root_hash']] = 1; } - } // END - foreach - } // END - foreach + } + } // Find best root hash $bestRootHash = ''; $bestRootCount = 0; foreach ($rootHashes as $hash => $count) { - // Debug message - //* NOISY-DEBUG: */ print ('hash=' . $hash . ',count=' . $count . ',bestRootHash=' . $bestRootHash . ',bestRootCount=' . $bestRootCount . PHP_EOL); - // Is a better one found? + //* NOISY-DEBUG: */ print ('hash=' . $hash . ',count=' . $count . ',bestRootHash=' . $bestRootHash . ',bestRootCount=' . $bestRootCount . PHP_EOL); if ($count > $bestRootCount) { // Remember it $bestRootHash = $hash; $bestRootCount = $count; - } // END - if - } // END - foreach + } + } // Output message print ('bestRootHash=' . $bestRootHash . ',bestRootCount=' . $bestRootCount . PHP_EOL); @@ -249,10 +247,10 @@ while (true) { // Abort search break; - } // END - if - } // END - for - } // END - foreach - } // END - if + } + } + } + } // Next round $GLOBALS['iteration']++; @@ -261,27 +259,25 @@ while (true) { //* NOISY-DEBUG: */ print('nonceHash=' . $nonceHash . PHP_EOL); //* NOISY-DEBUG: */ print('sumNonce=' . $sumNonce . PHP_EOL); //* NOISY-DEBUG: */ print('sumGenesis=' . $GLOBALS['sum_genesis'] . PHP_EOL); - } // END - while + } // If the iteration is zero, then no hash is found if ($GLOBALS['iteration'] == 0) { // Bad hash found $timeBadHashes += abs(microtime(true) - $timeHash); - // And next round - //* NOISY-DEBUG: */ print('BAD:nonce=' . $GLOBALS['nonce'] . PHP_EOL); - // Nothing found, so calculate new nonce + //* NOISY-DEBUG: */ print('BAD:nonce=' . $GLOBALS['nonce'] . PHP_EOL); calculateNonce(); continue; - } // END - if + } // Add amount of hashes per block (multiple-hash) $GLOBALS['hashes_block'] += $GLOBALS['iteration'] * $GLOBALS['hash_cycles'] + $GLOBALS['hash_cycles']; // Push found hash addFoundHash($nonceHash); - } // END - while + } // Flush check-point file flushCheckPointFile($GLOBALS['current_hash']); @@ -317,4 +313,4 @@ while (true) { $rewardPerHour = $GLOBALS['total_reward'] / abs(microtime(true) - START_TIME) * 3600; print ('totalReward=' . $GLOBALS['total_reward'] . ',blockValue=' . $blockValue . ',rewardPerHour=' . $rewardPerHour . PHP_EOL); -} // END - while +} diff --git a/contrib/chash/lib/functions.php b/contrib/chash/lib/functions.php index 666d4000..fe05fd38 100644 --- a/contrib/chash/lib/functions.php +++ b/contrib/chash/lib/functions.php @@ -29,7 +29,7 @@ function multipleHashString ($str) { for ($idx = 0; $idx < ($GLOBALS['hash_cycles'] - 1); $idx++) { // Over-hash the given hash $hash = hashString($hash); - } // END - for + } // Return it return $hash; @@ -55,7 +55,7 @@ function calculateSumFromHash ($hash) { for ($idx = 0; $idx < (strlen($decode) / 2); $idx++) { // And add it $sum = $sum + hexdec(substr($decode, $idx, 2)); - } // END - for + } // And return it //* NOISY-DEBUG: */ printf('[%s:%d]: sum=%d - EXIT!' . PHP_EOL, __FUNCTION__, __LINE__, $sum); @@ -207,5 +207,5 @@ function loadCheckpointFile () { $GLOBALS['current_hash'] = $data[9]; $GLOBALS['root_hash'] = $data[10]; $GLOBALS['found_hashes'] = json_decode(gzuncompress(base64_decode($data[11])), TRUE); - } // END - if + } } diff --git a/contrib/exp/exp1.php b/contrib/exp/exp1.php index c750e12c..48089352 100644 --- a/contrib/exp/exp1.php +++ b/contrib/exp/exp1.php @@ -12,7 +12,7 @@ $x = 1; $y = 0; for ($i = 1; $i <= $totalDays; $i++) { $x = bcmul($x, 2); $y = bcadd($y, $x); -} // END - foreach +} print 'After ' . $totalDays . ' days (' . $years . ' years) you have eaten ' . $y . ' fruits.' . PHP_EOL; print 'Length:' . strlen($y) . PHP_EOL; diff --git a/contrib/exp/exp2.php b/contrib/exp/exp2.php index d83a33c6..c51211e0 100644 --- a/contrib/exp/exp2.php +++ b/contrib/exp/exp2.php @@ -22,7 +22,7 @@ for ($i = 1; $i <= $totalMonths; $i++) { $balance = bcadd($balance, $interest); print 'Month ' . $i . ': rate=' . bcmul($rate, 100) . '%,interest=' . $interest . ',balance=' . $balance . PHP_EOL; -} // END - foreach +} print 'After ' . $totalMonths . ' months (' . $years . ' years) you have ' . $balance . ' EUR back.' . PHP_EOL; //print 'Length:' . strlen($balance) . PHP_EOL; diff --git a/contrib/lfdb2/read.php b/contrib/lfdb2/read.php index da41e102..b68b879b 100644 --- a/contrib/lfdb2/read.php +++ b/contrib/lfdb2/read.php @@ -19,7 +19,7 @@ if (PHP_INT_SIZE === 8) { $__factor = constant('__FACTOR_64'); $__format = constant('__FORMAT_READ_64'); $__step = constant('__STEP_64'); -} // END - if +} $buffer = file_get_contents('test.data.bin' . ($__factor * 2)) or die('Please run write.php first!' . PHP_EOL); @@ -58,8 +58,8 @@ for ($pos = 0; $pos < strlen($buffer); $pos += 8) { //print 'chr=' . $chr . PHP_EOL; $decoded .= chr($chr); - } // END - for -} // END - for + } +} $decoded = gzuncompress($decoded); diff --git a/contrib/lfdb2/write.php b/contrib/lfdb2/write.php index 2b25a6a6..9d1445c5 100644 --- a/contrib/lfdb2/write.php +++ b/contrib/lfdb2/write.php @@ -27,7 +27,7 @@ if (PHP_INT_SIZE === 8) { $__right = constant('__RIGHT_64'); $__format = constant('__FORMAT_WRITE_64'); $__step = constant('__STEP_64'); -} // END - if +} $str = gzcompress(file_get_contents('test.data'), 9); @@ -46,8 +46,8 @@ for ($idx = 0; $idx < strlen($str); $idx += $__step) { $big += $add; //print 'idx=' . $idx . ',i=' . $i . ',ord=' . $ord . ',factor=' . $factor . ',add=' . $add . ',big=' . $big . PHP_EOL; - } // END - if - } // END - for + } + } $l = ($big & $__left) >>$__factor; $r = $big & $__right; @@ -56,7 +56,7 @@ for ($idx = 0; $idx < strlen($str); $idx += $__step) { //print 'big=' . $big . ',unpacked('.strlen($unpacked) . ')='.md5($unpacked).PHP_EOL; $encoded .= $unpacked; -} // END - for +} print 'Hash(' . strlen($encoded) . ')=' . md5($encoded) . PHP_EOL; print 'Encoded ' . strlen($str) . ' bytes into ' . strlen($encoded) . ' bytes ...' . PHP_EOL; diff --git a/framework/main/classes/cache/class_MemoryCache.php b/framework/main/classes/cache/class_MemoryCache.php index ee26ab36..6dae7c1b 100644 --- a/framework/main/classes/cache/class_MemoryCache.php +++ b/framework/main/classes/cache/class_MemoryCache.php @@ -97,7 +97,7 @@ class MemoryCache extends BaseFrameworkSystem implements Cacheable { // Not found $exists = false; } - } // END - if + } // Return status return $exists; @@ -128,7 +128,7 @@ class MemoryCache extends BaseFrameworkSystem implements Cacheable { if ($this->offsetExists($offset)) { // Then get the data from it $data = $this->dataCache->offsetGet($offset); - } // END - if + } // Return data return $data; @@ -146,7 +146,7 @@ class MemoryCache extends BaseFrameworkSystem implements Cacheable { // Purge only existing keys //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CACHE: Unsetting cache ' . $offset); $this->dataCache->offsetUnset($offset); - } // END - if + } } } diff --git a/framework/main/classes/commands/console/class_ConsoleFuseCommand.php b/framework/main/classes/commands/console/class_ConsoleFuseCommand.php index 7b62c8fd..7d38e84f 100644 --- a/framework/main/classes/commands/console/class_ConsoleFuseCommand.php +++ b/framework/main/classes/commands/console/class_ConsoleFuseCommand.php @@ -79,7 +79,7 @@ class ConsoleFuseCommand extends BaseCommand implements Commandable { // Abort here return; - } // END - if + } // @TODO Unfinished $this->partialStub('Still unfinished! ;-)'); diff --git a/framework/main/classes/criteria/class_BaseCriteria.php b/framework/main/classes/criteria/class_BaseCriteria.php index 9331121c..de4cd3ee 100644 --- a/framework/main/classes/criteria/class_BaseCriteria.php +++ b/framework/main/classes/criteria/class_BaseCriteria.php @@ -50,7 +50,7 @@ abstract class BaseCriteria extends BaseFrameworkSystem implements Criteria { foreach (array('default', 'choice', 'exclude') as $criteriaType) { // Init it $this->initGenericArrayKey('criteria', $criteriaType, 'entries'); - } // END - foreach + } } /** @@ -169,7 +169,7 @@ abstract class BaseCriteria extends BaseFrameworkSystem implements Criteria { foreach ($this->getGenericArray('criteria') as $criteriaType => $dummy) { // Remove it $this->unsetGenericArrayElement('criteria', $criteriaType, 'entries', $criteriaKey); - } // END - foreach + } } /** @@ -353,8 +353,8 @@ abstract class BaseCriteria extends BaseFrameworkSystem implements Criteria { // Then count this one up $counted++; } - } // END - foreach - } // END - foreach + } + } // Now check if expected criteria counts match $matches = ($counted == $this->countGenericArrayGroup('criteria', $criteriaType)); @@ -421,7 +421,7 @@ abstract class BaseCriteria extends BaseFrameworkSystem implements Criteria { urlencode($criteriaValue) ); } - } // END - foreach + } // Remove last semicolon $cacheKey = substr($cacheKey, 0, -1); diff --git a/framework/main/classes/criteria/dataset/class_DataSetCriteria.php b/framework/main/classes/criteria/dataset/class_DataSetCriteria.php index 5413cfea..7341889e 100644 --- a/framework/main/classes/criteria/dataset/class_DataSetCriteria.php +++ b/framework/main/classes/criteria/dataset/class_DataSetCriteria.php @@ -209,7 +209,7 @@ class DataSetCriteria extends BaseCriteria implements StoreableCriteria { foreach ($primaryKeys as $primaryKey) { // Add it $return .= trim($this->getCriteriaElemnent($primaryKey)); - } // END - foreach + } // Debug message //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DATA-SET-CRITERIA: tableName=' . $this->getTableName() . ',return=' . $return . ' - EXIT!'); diff --git a/framework/main/classes/criteria/search/class_SearchCriteria.php b/framework/main/classes/criteria/search/class_SearchCriteria.php index 1cac25ba..fd1e8044 100644 --- a/framework/main/classes/criteria/search/class_SearchCriteria.php +++ b/framework/main/classes/criteria/search/class_SearchCriteria.php @@ -202,7 +202,7 @@ class SearchCriteria extends BaseCriteria implements LocalSearchCriteria { // Debug message //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SEARCH-CRITERIA: match=' . $match . ',isMatching=' . intval($isMatching)); - } // END - foreach + } // Debug message //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SEARCH-CRITERIA: getCriteriaChoiceElement(' . $key . ')[]=' . gettype($searchChoice) . ',value[]=' . count($valueArray) . ',idx=' . $idx . ',isMatching=' . intval($isMatching) . ' - CHOICE-MATCH'); diff --git a/framework/main/classes/crypto/class_CryptoHelper.php b/framework/main/classes/crypto/class_CryptoHelper.php index 133cc135..0455b2a1 100644 --- a/framework/main/classes/crypto/class_CryptoHelper.php +++ b/framework/main/classes/crypto/class_CryptoHelper.php @@ -95,7 +95,7 @@ class CryptoHelper extends BaseFrameworkSystem implements Cryptable { if (is_null(self::$selfInstance)) { // Then get a new one self::$selfInstance = self::createCryptoHelper(); - } // END - if + } // Return the instance return self::$selfInstance; @@ -184,7 +184,7 @@ class CryptoHelper extends BaseFrameworkSystem implements Cryptable { if (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('extension_uuid_loaded') === true) { // Then add it as well $uuid = uuid_create(); - } // END - if + } // Return it return $uuid; @@ -212,7 +212,7 @@ class CryptoHelper extends BaseFrameworkSystem implements Cryptable { // Then extract the X first characters from the hash as our salt $salt = substr($oldHash, 0, $length); - } // END - if + } // Hash the password with salt //* DEBUG: */ echo "salt=".$salt."/plain=".$str."
\n"; diff --git a/framework/main/classes/database/frontend/class_BaseDatabaseFrontend.php b/framework/main/classes/database/frontend/class_BaseDatabaseFrontend.php index f85f4bad..455213ec 100644 --- a/framework/main/classes/database/frontend/class_BaseDatabaseFrontend.php +++ b/framework/main/classes/database/frontend/class_BaseDatabaseFrontend.php @@ -67,7 +67,7 @@ abstract class BaseDatabaseFrontend extends BaseFrameworkSystem { if (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('database_cache_enabled') === true) { // Set the new instance $this->setCacheInstance(ObjectFactory::createObjectByConfiguredName('cache_class')); - } // END - if + } } /** @@ -126,7 +126,7 @@ abstract class BaseDatabaseFrontend extends BaseFrameworkSystem { // First get a key suitable for our cache and extend it with this class name $cacheKey = $this->getCacheKeyByCriteria($dataSetInstance, $onlyKeys); //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-FRONTEND: Using cache key ' . $cacheKey . ' for purging ...'); - } // END - if + } // Does this key exists in cache? //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-FRONTEND: cacheKey[%s]=%s', gettype($cacheKey), $cacheKey)); @@ -134,7 +134,7 @@ abstract class BaseDatabaseFrontend extends BaseFrameworkSystem { // Purge the cache //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-FRONTEND: Calling this->cacheInstance->purgeOffset(%s) ...', $cacheKey)); $this->getCacheInstance()->purgeOffset($cacheKey); - } // END - if + } // Handle it over to the middleware FrameworkBootstrap::getDatabaseInstance()->queryInsertDataSet($dataSetInstance); @@ -159,13 +159,13 @@ abstract class BaseDatabaseFrontend extends BaseFrameworkSystem { // First get a key suitable for our cache and extend it with this class name $cacheKey = $this->getCacheKeyByCriteria($dataSetInstance, $onlyKeys); //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-FRONTEND: Using cache key ' . $cacheKey . ' for purging ...'); - } // END - if + } // Does this key exists in cache? if ((FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('database_cache_enabled') === true) && ($this->getCacheInstance()->offsetExists($cacheKey))) { // Purge the cache $this->getCacheInstance()->purgeOffset($cacheKey); - } // END - if + } // Handle it over to the middleware FrameworkBootstrap::getDatabaseInstance()->queryUpdateDataSet($dataSetInstance); @@ -207,7 +207,7 @@ abstract class BaseDatabaseFrontend extends BaseFrameworkSystem { if (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('database_cache_enabled') === true) { // First get a key suitable for our cache and extend it with this class name $cacheKey = $this->getCacheKeyByCriteria($criteriaInstance, $onlyKeys); - } // END - if + } // Does this key exists in cache? //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-FRONTEND: cacheKey[%s]=%s', gettype($cacheKey), $cacheKey)); @@ -228,7 +228,7 @@ abstract class BaseDatabaseFrontend extends BaseFrameworkSystem { // A valid result has returned from the database layer //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-FRONTEND: Setting cacheKey=%s with result()=%d entries', $cacheKey, count($result))); $this->getCacheInstance()->offsetSet($cacheKey, $result); - } // END - if + } } else { // This invalid result must be wrapped $result = array( @@ -269,7 +269,7 @@ abstract class BaseDatabaseFrontend extends BaseFrameworkSystem { // Debug message //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-FRONTEND: numRows=' . $numRows); - } // END - if + } // Return the result return $numRows; diff --git a/framework/main/classes/database/frontend/user/class_UserDatabaseFrontend.php b/framework/main/classes/database/frontend/user/class_UserDatabaseFrontend.php index 9b303a73..e49d7723 100644 --- a/framework/main/classes/database/frontend/user/class_UserDatabaseFrontend.php +++ b/framework/main/classes/database/frontend/user/class_UserDatabaseFrontend.php @@ -114,7 +114,7 @@ class UserDatabaseFrontend extends BaseDatabaseFrontend implements ManageableAcc if (is_null($updateInstance)) { // Throw an exception here throw new NullPointerException($this, self::EXCEPTION_IS_NULL_POINTER); - } // END - if + } // Get search instance from update instance $searchInstance = $updateInstance->getSearchInstance(); @@ -123,8 +123,8 @@ class UserDatabaseFrontend extends BaseDatabaseFrontend implements ManageableAcc if (is_null($searchInstance)) { // Throw an exception here throw new NullPointerException($updateInstance, self::EXCEPTION_IS_NULL_POINTER); - } // END - if - } // END - if + } + } // Generate a data set object $dataSetInstance = ObjectFactory::createObjectByConfiguredName('dataset_criteria_class', array(self::DB_TABLE_USER)); diff --git a/framework/main/classes/feature/class_FrameworkFeature.php b/framework/main/classes/feature/class_FrameworkFeature.php index 5bfb48f5..0f67a15b 100644 --- a/framework/main/classes/feature/class_FrameworkFeature.php +++ b/framework/main/classes/feature/class_FrameworkFeature.php @@ -82,7 +82,7 @@ class FrameworkFeature extends BaseFrameworkSystem { // Check configuration self::$enabledFeatures[$featureName]['is_enabled'] = (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry($configKey) === 'Y'); - } // END - if + } // Return "cached" status return self::$enabledFeatures[$featureName]['is_enabled']; @@ -111,7 +111,7 @@ class FrameworkFeature extends BaseFrameworkSystem { // Then it can't be available self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('FRAMEWORK-FEATURE: Feature "%s"is not enabled.', $featureName)); return false; - } // END - if + } // Create config key (for feature class lookup) $configKey = sprintf('feature_%s_class', $featureName); @@ -128,7 +128,7 @@ class FrameworkFeature extends BaseFrameworkSystem { // Feature class not found self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('FRAMEWORK-FEATURE: Feature "%s"is not available due to missing feature class. Disabling feature ...', $featureName)); } - } // END - if + } // Return "cached" status //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('FRAMEWORK-FEATURE: featureName=%s,isAvailable=%d - EXIT!', $featureName, intval(self::$enabledFeatures[$featureName]['is_available']))); @@ -164,7 +164,7 @@ class FrameworkFeature extends BaseFrameworkSystem { if (!is_callable($callable)) { // Not callable method requested throw new FeatureMethodNotCallableException(array(self::$enabledFeatures[$featureName]['instance'], $featureMethod), self::EXCEPTION_FEATURE_METHOD_NOT_CALLABLE); - } // END - if + } // Then call it $return = call_user_func_array($callable, $args); diff --git a/framework/main/classes/file_directories/directory/class_FrameworkDirectoryPointer.php b/framework/main/classes/file_directories/directory/class_FrameworkDirectoryPointer.php index 7eb73dfa..d6c195b4 100644 --- a/framework/main/classes/file_directories/directory/class_FrameworkDirectoryPointer.php +++ b/framework/main/classes/file_directories/directory/class_FrameworkDirectoryPointer.php @@ -63,7 +63,7 @@ class FrameworkDirectoryPointer extends BaseFrameworkSystem implements Framework if ($this->getDirectoryIteratorInstance() instanceof DirectoryIterator) { // Try to close a directory $this->closeDirectory(); - } // END - if + } // Call the parent destructor parent::__destruct(); @@ -170,8 +170,8 @@ class FrameworkDirectoryPointer extends BaseFrameworkSystem implements Framework // To next entry //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DIRECTORY-POINTER: Invoking directoryIteratorInstance->next() ...'); $this->getDirectoryIteratorInstance()->next(); - } // END - while - } // END - if + } + } // Return read line //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('DIRECTORY-POINTER: fileInfoInstance[%s]=%s - EXIT!', gettype($fileInfoInstance), $fileInfoInstance)); diff --git a/framework/main/classes/file_directories/input/raw/class_FrameworkRawFileInputPointer.php b/framework/main/classes/file_directories/input/raw/class_FrameworkRawFileInputPointer.php index e679aadf..61fc5f12 100644 --- a/framework/main/classes/file_directories/input/raw/class_FrameworkRawFileInputPointer.php +++ b/framework/main/classes/file_directories/input/raw/class_FrameworkRawFileInputPointer.php @@ -76,7 +76,7 @@ class FrameworkRawFileInputPointer extends BaseFileIo implements InputPointer { if ((is_null($fileObject)) || ($fileObject === false)) { // Something bad happend throw new FileIoException($infoInstance, self::EXCEPTION_FILE_POINTER_INVALID); - } // END - if + } // Create new instance $pointerInstance = new FrameworkRawFileInputPointer(); diff --git a/framework/main/classes/file_directories/input/text/class_FrameworkTextFileInputPointer.php b/framework/main/classes/file_directories/input/text/class_FrameworkTextFileInputPointer.php index 46eb3761..27565cef 100644 --- a/framework/main/classes/file_directories/input/text/class_FrameworkTextFileInputPointer.php +++ b/framework/main/classes/file_directories/input/text/class_FrameworkTextFileInputPointer.php @@ -80,7 +80,7 @@ class FrameworkTextFileInputPointer extends BaseFileIo implements InputPointer { if ((is_null($fileObject)) || ($fileObject === false)) { // Something bad happend throw new FileIoException($infoInstance, self::EXCEPTION_FILE_POINTER_INVALID); - } // END - if + } // Create new instance $pointerInstance = new FrameworkTextFileInputPointer(); diff --git a/framework/main/classes/file_directories/io_stream/class_FileIoStream.php b/framework/main/classes/file_directories/io_stream/class_FileIoStream.php index 6c793b84..551791f3 100644 --- a/framework/main/classes/file_directories/io_stream/class_FileIoStream.php +++ b/framework/main/classes/file_directories/io_stream/class_FileIoStream.php @@ -101,7 +101,7 @@ class FileIoStream extends BaseFrameworkSystem implements FileInputStreamer, Fil // Bail out ApplicationEntryPoint::exitApplication('The application has made a fatal error. Exception: ' . $e->__toString() . ' with message: ' . $e->getMessage()); } - } // END - for + } // Write a header information for validation purposes $fileInstance->writeToFile(sprintf('%s%s%s%s%s%s%s%s%s' . PHP_EOL, @@ -136,7 +136,7 @@ class FileIoStream extends BaseFrameworkSystem implements FileInputStreamer, Fil // Advance to the next 50-chars block $idx += 50; - } // END - while + } // Close the file unset($fileInstance); @@ -168,11 +168,11 @@ class FileIoStream extends BaseFrameworkSystem implements FileInputStreamer, Fil // Break infinite loop maybe caused by the input handler if ($lastBuffer == $inputBuffer) { break; - } // END - if + } // Remember last read line for avoiding possible infinite loops $lastBuffer = $inputBuffer; - } // END - while + } // Close directory handle unset($fileInstance); @@ -198,7 +198,7 @@ class FileIoStream extends BaseFrameworkSystem implements FileInputStreamer, Fil if (count($header) != 4) { // Throw an exception throw new InvalidArrayCountException(array($this, 'header', count($header), 4), self::EXCEPTION_ARRAY_HAS_INVALID_COUNT); - } // END - if + } } elseif (substr($rawLine, 0, 5) == self::FILE_IO_DATA_BLOCK_ID) { // Is a data line! $data = explode(self::FILE_IO_SEPARATOR, $rawLine); @@ -212,7 +212,7 @@ class FileIoStream extends BaseFrameworkSystem implements FileInputStreamer, Fil if (md5($data[0]) != $data[1]) { // MD5 hash did not match! throw new InvalidMD5ChecksumException(array($this, md5($data[0]), $data[1]), self::EXCEPTION_MD5_CHECKSUMS_MISMATCH); - } // END - if + } } else { // Invalid count! throw new InvalidArrayCountException(array($this, 'data', count($data), 2), self::EXCEPTION_ARRAY_HAS_INVALID_COUNT); @@ -224,19 +224,19 @@ class FileIoStream extends BaseFrameworkSystem implements FileInputStreamer, Fil // Other raw lines than header/data tagged lines and re-add the new-line char $readData .= $rawLine . PHP_EOL; } - } // END - foreach + } // Was raw lines read and no header/data? if ((!empty($readData)) && (count($header) == 0) && (count($data) == 0)) { // Return raw lines back return $readData; - } // END - if + } // Was a header found? if (count($header) != 4) { // Throw an exception throw new InvalidArrayCountException(array($this, 'header', count($header), 4), self::EXCEPTION_ARRAY_HAS_INVALID_COUNT); - } // END - if + } // Decode all from Base64 $readData = @base64_decode($readData); @@ -245,13 +245,13 @@ class FileIoStream extends BaseFrameworkSystem implements FileInputStreamer, Fil if (strlen($readData) != $header[2]) { // Size did not match throw new InvalidDataLengthException(array($this, strlen($readData), $header[2]), self::EXCEPTION_UNEXPECTED_STRING_SIZE); - } // END - if + } // Validate the decoded data with the final MD5 hash if (md5($readData) != $header[3]) { // MD5 hash did not match! throw new InvalidMD5ChecksumException(array($this, md5($readData), $header[3]), self::EXCEPTION_MD5_CHECKSUMS_MISMATCH); - } // END - if + } // Return all in an array return array( diff --git a/framework/main/classes/file_directories/output/raw/class_FrameworkRawFileOutputPointer.php b/framework/main/classes/file_directories/output/raw/class_FrameworkRawFileOutputPointer.php index 7b4e0986..2436b0f4 100644 --- a/framework/main/classes/file_directories/output/raw/class_FrameworkRawFileOutputPointer.php +++ b/framework/main/classes/file_directories/output/raw/class_FrameworkRawFileOutputPointer.php @@ -59,14 +59,14 @@ class FrameworkRawFileOutputPointer extends BaseFileIo implements OutputPointer if (is_null($mode)) { // No infoInstance given throw new InvalidArgumentException('Parameter "mode" is empty'); - } // END - if + } // Try to open a handler $fileObject = $infoInstance->openFile($mode); if ((is_null($fileObject)) || ($fileObject === false)) { // Something bad happend throw new FileIoException($infoInstance, self::EXCEPTION_FILE_POINTER_INVALID); - } // END - if + } // Create new instance $pointerInstance = new FrameworkRawFileOutputPointer(); diff --git a/framework/main/classes/file_directories/output/text/class_FrameworkTextFileOutputPointer.php b/framework/main/classes/file_directories/output/text/class_FrameworkTextFileOutputPointer.php index a1bc2cac..33aa707c 100644 --- a/framework/main/classes/file_directories/output/text/class_FrameworkTextFileOutputPointer.php +++ b/framework/main/classes/file_directories/output/text/class_FrameworkTextFileOutputPointer.php @@ -60,7 +60,7 @@ class FrameworkTextFileOutputPointer extends BaseFileIo implements OutputPointer if (empty($mode)) { // No filename given throw new InvalidArgumentException('Parameter "mode" is empty'); - } // END - if + } // Try to open a handler $fileObject = $fileInstance->openFile($mode); @@ -69,7 +69,7 @@ class FrameworkTextFileOutputPointer extends BaseFileIo implements OutputPointer if ((is_null($fileObject)) || ($fileObject === false)) { // Something bad happend throw new FileIoException($fileInstance, self::EXCEPTION_FILE_POINTER_INVALID); - } // END - if + } // Create new instance $pointerInstance = new FrameworkTextFileOutputPointer(); diff --git a/framework/main/classes/filter/validator/class_EmailValidatorFilter.php b/framework/main/classes/filter/validator/class_EmailValidatorFilter.php index 8d1d827c..44da75c3 100644 --- a/framework/main/classes/filter/validator/class_EmailValidatorFilter.php +++ b/framework/main/classes/filter/validator/class_EmailValidatorFilter.php @@ -124,7 +124,7 @@ class EmailValidatorFilter extends BaseFilter implements Filterable { // Abort here throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED); - } // END - elseif + } } elseif (empty($email)) { // Empty field! $requestInstance->requestIsValid(false); @@ -134,7 +134,7 @@ class EmailValidatorFilter extends BaseFilter implements Filterable { // Abort here throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED); - } // END - elseif + } } /** @@ -151,19 +151,19 @@ class EmailValidatorFilter extends BaseFilter implements Filterable { $userInstance = NULL; // Get a registry instance - $registry = GenericRegistry::getRegistry(); + $registryInstance = GenericRegistry::getRegistry(); // Is the user already there? - if ($registry->instanceExists('user')) { + if ($registryInstance->instanceExists('user')) { // Use the instance for checking for the email - $userInstance = $registry->getInstance('user'); + $userInstance = $registryInstance->getInstance('user'); $userInstance->setEmailAddress($email); } else { // If this instance is created then the username *does* exist $userInstance = call_user_func_array(array(FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('user_class'), 'createMemberByEmail'), array($email)); // Remember this user instance in our registry for later usage - $registry->addInstance('user', $userInstance); + $registryInstance->addInstance('user', $userInstance); } // Does the email exist? diff --git a/framework/main/classes/filter/validator/class_PasswordValidatorFilter.php b/framework/main/classes/filter/validator/class_PasswordValidatorFilter.php index d910bdf7..87a8ebe6 100644 --- a/framework/main/classes/filter/validator/class_PasswordValidatorFilter.php +++ b/framework/main/classes/filter/validator/class_PasswordValidatorFilter.php @@ -106,7 +106,7 @@ class PasswordValidatorFilter extends BaseFilter implements Filterable { // Abort here throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED); - } // END - elseif + } } } diff --git a/framework/main/classes/filter/validator/class_UserNameValidatorFilter.php b/framework/main/classes/filter/validator/class_UserNameValidatorFilter.php index 97eb61df..e42a4748 100644 --- a/framework/main/classes/filter/validator/class_UserNameValidatorFilter.php +++ b/framework/main/classes/filter/validator/class_UserNameValidatorFilter.php @@ -117,12 +117,12 @@ class UserNameValidatorFilter extends BaseFilter implements Filterable { $userInstance = NULL; // Get a registry instance - $registry = GenericRegistry::getRegistry(); + $registryInstance = GenericRegistry::getRegistry(); // Is the user already there? - if ($registry->instanceExists('user')) { + if ($registryInstance->instanceExists('user')) { // Use the instance for checking for the email - $userInstance = $registry->getInstance('user'); + $userInstance = $registryInstance->getInstance('user'); $userInstance->setUserName($userName); } else { // If this instance is created then the username *does* exist @@ -131,7 +131,7 @@ class UserNameValidatorFilter extends BaseFilter implements Filterable { $userInstance = call_user_func_array(array(FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('user_class'), 'createMemberByUsername'), array($userName)); // Remember this user instance in our registry for later usage - $registry->addInstance('user', $userInstance); + $registryInstance->addInstance('user', $userInstance); } catch (UsernameMissingException $e) { // User was not found } diff --git a/framework/main/classes/filter/verifier/class_AccountPasswordVerifierFilter.php b/framework/main/classes/filter/verifier/class_AccountPasswordVerifierFilter.php index d0a5da97..1fd67958 100644 --- a/framework/main/classes/filter/verifier/class_AccountPasswordVerifierFilter.php +++ b/framework/main/classes/filter/verifier/class_AccountPasswordVerifierFilter.php @@ -88,8 +88,8 @@ class AccountPasswordVerifierFilter extends BaseFilter implements Filterable { // Abort here throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED); - } // END - if - } // END - if + } + } if (empty($password)) { // Password is empty @@ -100,7 +100,7 @@ class AccountPasswordVerifierFilter extends BaseFilter implements Filterable { // Abort here throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED); - } // END - if + } // Get a user instance $userInstance = GenericRegistry::getRegistry()->getInstance('user'); @@ -115,7 +115,7 @@ class AccountPasswordVerifierFilter extends BaseFilter implements Filterable { if ($currentHash != $passHash) { // Throw an exception here to stop the proccessing throw new AccountPasswordMismatchException($this, BaseUser::EXCEPTION_USER_PASS_MISMATCH); - } // END - if + } } } diff --git a/framework/main/classes/filter/verifier/class_BirthdayVerifierFilter.php b/framework/main/classes/filter/verifier/class_BirthdayVerifierFilter.php index 80bab34a..e7c44c41 100644 --- a/framework/main/classes/filter/verifier/class_BirthdayVerifierFilter.php +++ b/framework/main/classes/filter/verifier/class_BirthdayVerifierFilter.php @@ -70,7 +70,7 @@ class BirthdayVerifierFilter extends BaseFilter implements Filterable { // Add a message to the response $responseInstance->addFatalMessage('day_of_birth_unset'); - } // END - if + } // Month of birth set? if (!$requestInstance->isRequestElementSet('birth_month')) { @@ -79,7 +79,7 @@ class BirthdayVerifierFilter extends BaseFilter implements Filterable { // Add a message to the response $responseInstance->addFatalMessage('month_of_birth_unset'); - } // END - if + } // Year of birth set? if (!$requestInstance->isRequestElementSet('birth_year')) { @@ -88,13 +88,13 @@ class BirthdayVerifierFilter extends BaseFilter implements Filterable { // Add a message to the response $responseInstance->addFatalMessage('year_of_birth_unset'); - } // END - if + } // Is the request still valid? if (!$requestInstance->isRequestValid()) { // Abort here throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED); - } // END - if + } // Now comes the final check $birthCheck = mktime( @@ -116,7 +116,7 @@ class BirthdayVerifierFilter extends BaseFilter implements Filterable { // Abort here throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED); - } // END - if + } } } diff --git a/framework/main/classes/filter/verifier/class_ConfirmCodeVerifierFilter.php b/framework/main/classes/filter/verifier/class_ConfirmCodeVerifierFilter.php index 7cc1256f..7330ae39 100644 --- a/framework/main/classes/filter/verifier/class_ConfirmCodeVerifierFilter.php +++ b/framework/main/classes/filter/verifier/class_ConfirmCodeVerifierFilter.php @@ -106,7 +106,7 @@ class ConfirmCodeVerifierFilter extends BaseFilter implements Filterable { // Stop processing here exit(); - } // END - if + } } } diff --git a/framework/main/classes/filter/verifier/class_GraphicalCodeCaptchaVerifierFilter.php b/framework/main/classes/filter/verifier/class_GraphicalCodeCaptchaVerifierFilter.php index 21ee3765..637dedb9 100644 --- a/framework/main/classes/filter/verifier/class_GraphicalCodeCaptchaVerifierFilter.php +++ b/framework/main/classes/filter/verifier/class_GraphicalCodeCaptchaVerifierFilter.php @@ -76,7 +76,7 @@ class GraphicalCodeCaptchaVerifierFilter extends BaseFilter implements Filterabl // Skip further processing throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED); - } // END - if + } // Create config entry $configKey = sprintf('%s_captcha_secured', @@ -87,7 +87,7 @@ class GraphicalCodeCaptchaVerifierFilter extends BaseFilter implements Filterabl if (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry($configKey) != 'Y') { // Not enabled, so don't check return; - } // END - if + } // Get the captcha code $captchaCode = $requestInstance->getRequestElement('c_code'); @@ -153,7 +153,7 @@ class GraphicalCodeCaptchaVerifierFilter extends BaseFilter implements Filterabl // Skip further processing throw new FilterChainException($this, self::EXCEPTION_FILTER_CHAIN_INTERCEPTED); - } // END - not the same! + } } } diff --git a/framework/main/classes/filter/verifier/class_UserGuestVerifierFilter.php b/framework/main/classes/filter/verifier/class_UserGuestVerifierFilter.php index 0cd03f94..b273870f 100644 --- a/framework/main/classes/filter/verifier/class_UserGuestVerifierFilter.php +++ b/framework/main/classes/filter/verifier/class_UserGuestVerifierFilter.php @@ -119,12 +119,12 @@ class UserGuestVerifierFilter extends BaseFilter implements Filterable { $userInstance = NULL; // Get a registry instance - $registry = GenericRegistry::getRegistry(); + $registryInstance = GenericRegistry::getRegistry(); // Is the user already there? - if ($registry->instanceExists('user')) { + if ($registryInstance->instanceExists('user')) { // Use the instance for checking for the email - $userInstance = $registry->getInstance('user'); + $userInstance = $registryInstance->getInstance('user'); $userInstance->setUserGuest($userName); } else { // If this instance is created then the username *does* exist @@ -133,7 +133,7 @@ class UserGuestVerifierFilter extends BaseFilter implements Filterable { $userInstance = call_user_func_array(array(FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('guest_class'), 'createGuestByUsername'), array($userName)); // Remember this user instance in our registry for later usage - $registry->addInstance('user', $userInstance); + $registryInstance->addInstance('user', $userInstance); } catch (UsernameMissingException $e) { // User was not found } diff --git a/framework/main/classes/filter/verifier/class_UserNameVerifierFilter.php b/framework/main/classes/filter/verifier/class_UserNameVerifierFilter.php index e57bfda2..f55b632d 100644 --- a/framework/main/classes/filter/verifier/class_UserNameVerifierFilter.php +++ b/framework/main/classes/filter/verifier/class_UserNameVerifierFilter.php @@ -117,12 +117,12 @@ class UserNameVerifierFilter extends BaseFilter implements Filterable { $userInstance = NULL; // Get a registry instance - $registry = GenericRegistry::getRegistry(); + $registryInstance = GenericRegistry::getRegistry(); // Is the user already there? - if ($registry->instanceExists('user')) { + if ($registryInstance->instanceExists('user')) { // Use the instance for checking for the email - $userInstance = $registry->getInstance('user'); + $userInstance = $registryInstance->getInstance('user'); $userInstance->setUserName($userName); } else { // If this instance is created then the username *does* exist @@ -131,7 +131,7 @@ class UserNameVerifierFilter extends BaseFilter implements Filterable { $userInstance = call_user_func_array(array(FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('user_class'), 'createMemberByUsername'), array($userName)); // Remember this user instance in our registry for later usage - $registry->addInstance('user', $userInstance); + $registryInstance->addInstance('user', $userInstance); } catch (UsernameMissingException $e) { // User was not found } @@ -141,7 +141,7 @@ class UserNameVerifierFilter extends BaseFilter implements Filterable { if ((is_null($userInstance)) || ($userInstance->ifUsernameExists() === false)) { // This username is still available $alreadyTaken = false; - } // END - if + } // Return the result return $alreadyTaken; diff --git a/framework/main/classes/filter/verifier/class_UserStatusVerifierFilter.php b/framework/main/classes/filter/verifier/class_UserStatusVerifierFilter.php index 47dbb780..8c31ee9d 100644 --- a/framework/main/classes/filter/verifier/class_UserStatusVerifierFilter.php +++ b/framework/main/classes/filter/verifier/class_UserStatusVerifierFilter.php @@ -77,7 +77,7 @@ class UserStatusVerifierFilter extends BaseFilter implements Filterable { // Stop processing here exit(); - } // END - if + } } } diff --git a/framework/main/classes/filter/verifier/class_UserUnconfirmedVerifierFilter.php b/framework/main/classes/filter/verifier/class_UserUnconfirmedVerifierFilter.php index d2524dee..ea98a930 100644 --- a/framework/main/classes/filter/verifier/class_UserUnconfirmedVerifierFilter.php +++ b/framework/main/classes/filter/verifier/class_UserUnconfirmedVerifierFilter.php @@ -79,7 +79,7 @@ class UserUnconfirmedVerifierFilter extends BaseFilter implements Filterable { // Stop processing here exit(); - } // END - if + } // Is the user account confirmed? if ($userInstance->getField(UserDatabaseFrontend::DB_COLUMN_USER_STATUS) != FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('user_status_unconfirmed')) { @@ -91,7 +91,7 @@ class UserUnconfirmedVerifierFilter extends BaseFilter implements Filterable { // Stop processing here exit(); - } // END - if + } // Add this instance to registry GenericRegistry::getRegistry()->addInstance('user', $userInstance); diff --git a/framework/main/classes/fuse/class_FrameworkFuseWrapper.php_discontinued b/framework/main/classes/fuse/class_FrameworkFuseWrapper.php_discontinued index 3b6582ed..6736a78c 100644 --- a/framework/main/classes/fuse/class_FrameworkFuseWrapper.php_discontinued +++ b/framework/main/classes/fuse/class_FrameworkFuseWrapper.php_discontinued @@ -68,7 +68,7 @@ class FrameworkFuseWrapper extends FuseWrapper implements Registerable { public function FsOpen ($path, FuseFileInfo $fi) { if (($fi->flags & FUSE_O_ACCMODE) != FUSE_O_RDONLY) { return -FUSE_ENOACCES; - } // END - if + } return -FUSE_ENOERR; } @@ -88,7 +88,7 @@ class FrameworkFuseWrapper extends FuseWrapper implements Registerable { if ($offset > strlen($data)) { return 0; - } // END - if + } $buf = substr( $data, $offset, $size ); @@ -105,7 +105,7 @@ class FrameworkFuseWrapper extends FuseWrapper implements Registerable { public function FsReadDir ($path, array &$buf) { if (strcmp($path, '/') != 0) { return -FUSE_ENOENT; - } // END - if + } $buf[] = '.'; $buf[] = '..'; diff --git a/framework/main/classes/helper/html/forms/class_HtmlFormHelper.php b/framework/main/classes/helper/html/forms/class_HtmlFormHelper.php index 31fa98b0..01793e50 100644 --- a/framework/main/classes/helper/html/forms/class_HtmlFormHelper.php +++ b/framework/main/classes/helper/html/forms/class_HtmlFormHelper.php @@ -94,7 +94,7 @@ class HtmlFormHelper extends BaseHtmlHelper implements HelpableTemplate { if (is_null($formId)) { // Use form id from form name $formId = $formName; - } // END - if + } // Set form name $helperInstance->setFormName($formName); @@ -158,7 +158,7 @@ class HtmlFormHelper extends BaseHtmlHelper implements HelpableTemplate { if ($this->ifGroupOpenedPreviously()) { // Then automatically close it here $this->addFormGroup(); - } // END - if + } // Simply close it $this->formOpened = false; @@ -182,7 +182,7 @@ class HtmlFormHelper extends BaseHtmlHelper implements HelpableTemplate { if (($this->formOpened === false) && ($this->formEnabled === true)) { // Throw an exception throw new FormClosedException (array($this, $fieldName), self::EXCEPTION_CLOSED_FORM); - } // END - if + } // Generate the content $inputContent = sprintf('', @@ -225,7 +225,7 @@ class HtmlFormHelper extends BaseHtmlHelper implements HelpableTemplate { if (($this->formOpened === false) && ($this->formEnabled === true)) { // Throw an exception throw new FormClosedException (array($this, $fieldName), self::EXCEPTION_CLOSED_FORM); - } // END - if + } // Generate the content $inputContent = sprintf('', @@ -253,7 +253,7 @@ class HtmlFormHelper extends BaseHtmlHelper implements HelpableTemplate { if (($this->formOpened === false) && ($this->formEnabled === true)) { // Throw an exception throw new FormClosedException (array($this, $fieldName), self::EXCEPTION_CLOSED_FORM); - } // END - if + } // Generate the content $inputContent = sprintf('', @@ -310,7 +310,7 @@ class HtmlFormHelper extends BaseHtmlHelper implements HelpableTemplate { 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 = ($fieldChecked ? ' checked="checked"' : ' '); @@ -340,7 +340,7 @@ class HtmlFormHelper extends BaseHtmlHelper implements HelpableTemplate { if (($this->formOpened === false) && ($this->formEnabled === true)) { // Throw an exception throw new FormClosedException (array($this, 'reset'), self::EXCEPTION_CLOSED_FORM); - } // END - if + } // Generate the content $inputContent = sprintf('', @@ -365,7 +365,7 @@ class HtmlFormHelper extends BaseHtmlHelper implements HelpableTemplate { if (($this->formOpened === false) && ($this->formEnabled === true)) { // Throw an exception throw new FormClosedException (array($this, 'submit'), self::EXCEPTION_CLOSED_FORM); - } // END - if + } // Generate the content $inputContent = sprintf('', @@ -404,7 +404,7 @@ class HtmlFormHelper extends BaseHtmlHelper implements HelpableTemplate { if (($this->ifGroupOpenedPreviously() === false) && ($groupId === $this->getPreviousGroupId())) { // Abort here silently return false; - } // END - if + } // Initialize content with closing div by default $content = " \n"; @@ -432,7 +432,7 @@ class HtmlFormHelper extends BaseHtmlHelper implements HelpableTemplate { if ($this->ifSubGroupOpenedPreviously()) { // Close it here $this->addFormSubGroup(); - } // END - if + } // Get previous group id $prevGroupId = $this->getPreviousGroupId(); @@ -444,7 +444,7 @@ class HtmlFormHelper extends BaseHtmlHelper implements HelpableTemplate { if ((!empty($groupId)) && ($groupId != $prevGroupId)) { //* DEBUG: */ echo $groupId.'/'.$prevGroupId."
\n"; $this->addFormGroup($groupId, $groupText); - } // END - if + } } } @@ -476,7 +476,7 @@ class HtmlFormHelper extends BaseHtmlHelper implements HelpableTemplate { if (($this->ifSubGroupOpenedPreviously() === false) && ($subGroupId == $this->getPreviousSubGroupId())) { // Abort here silently return false; - } // END - if + } // Initialize content with closing div by default $content = " \n"; @@ -509,7 +509,7 @@ class HtmlFormHelper extends BaseHtmlHelper implements HelpableTemplate { // All call it again if sub group name is not empty if ((!empty($subGroupId)) && ($subGroupId != $prevSubGroupId)) { $this->addFormSubGroup($subGroupId, $subGroupText); - } // END - if + } } } @@ -527,7 +527,7 @@ class HtmlFormHelper extends BaseHtmlHelper implements HelpableTemplate { if (($this->formOpened === false) && ($this->formEnabled === true)) { // Throw an exception throw new FormClosedException (array($this, $fieldName), self::EXCEPTION_CLOSED_FORM); - } // END - if + } // Default is no title attribute $titleAttribute = ''; @@ -536,7 +536,7 @@ class HtmlFormHelper extends BaseHtmlHelper implements HelpableTemplate { if (!empty($fieldTitle)) { // Create title attribute $titleAttribute = sprintf(' title="%s" data-toggle="tooltip"', $fieldTitle); - } // END - if + } // Generate the content $inputContent = sprintf('