]> git.mxchange.org Git - core.git/commitdiff
Some minor rewrites
authorRoland Häder <roland@mxchange.org>
Sat, 11 Feb 2012 00:08:16 +0000 (00:08 +0000)
committerRoland Häder <roland@mxchange.org>
Sat, 11 Feb 2012 00:08:16 +0000 (00:08 +0000)
inc/classes/exceptions/socket/class_InvalidSocketException.php
inc/classes/exceptions/socket/class_NoSocketErrorDetectedException.php
inc/classes/main/class_BaseFrameworkSystem.php
inc/classes/main/helper/web/forms/class_WebFormHelper.php
inc/classes/main/io/class_FrameworkDirectoryPointer.php
inc/classes/main/io/class_FrameworkFileInputPointer.php
inc/classes/main/io/class_FrameworkFileOutputPointer.php
inc/classes/main/stacker/class_BaseStacker.php

index e7de2fb36fc190376a305305a7c43b0b932491ba..a8fbb889c1a1c55168b21fb1b7aa4dfdcdfe19ff 100644 (file)
@@ -45,9 +45,10 @@ class InvalidSocketException extends AbstractSocketException {
                        );
                } else {
                        // Construct the message
                        );
                } else {
                        // Construct the message
-                       $message = sprintf("[%s:] Invalid socket, type=%s, errno=%s, errstr=%s",
+                       $message = sprintf("[%s:] Invalid socket, type=%s(%s), errno=%s, errstr=%s",
                                $messageData[0]->__toString(),
                                $messageData[1],
                                $messageData[0]->__toString(),
                                $messageData[1],
+                               gettype($messageData[1]),
                                $messageData[2],
                                $messageData[3]
                        );
                                $messageData[2],
                                $messageData[3]
                        );
index 1a5db63664a09ea7e99f03db0ae0aa00f784e400..8217ad44633e7d6e1a9976679f6c63df1e3c565b 100644 (file)
@@ -35,7 +35,7 @@ class NoSocketErrorDetectedException extends AbstractSocketException {
                // Construct the message
                $message = sprintf("[%s:] Socket %s has no error reported.",
                        $messageData[0]->__toString(),
                // Construct the message
                $message = sprintf("[%s:] Socket %s has no error reported.",
                        $messageData[0]->__toString(),
-                       $messageData[1],
+                       $messageData[1]
                );
 
                // Call parent exception constructor
                );
 
                // Call parent exception constructor
index fcd7dab773ce99d083c2f8a8309fdd7689a6cbb0..10ce072b8d43c420bd3e71fab6dd23b94f559715 100644 (file)
@@ -364,10 +364,19 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
                                // Add the type
                                $argsString .= $this->replaceControlCharacters($arg) . ' (' . gettype($arg);
 
                                // Add the type
                                $argsString .= $this->replaceControlCharacters($arg) . ' (' . gettype($arg);
 
-                               // Add length if type is string
                                if (is_string($arg)) {
                                if (is_string($arg)) {
+                                       // Add length for strings
                                        $argsString .= ', '.strlen($arg);
                                        $argsString .= ', '.strlen($arg);
-                               } // END - if
+                               } elseif (is_array($arg)) {
+                                       // .. or size if array
+                                       $argsString .= ', '.count($arg);
+                               } elseif ($arg === true) {
+                                       // ... is boolean 'true'
+                                       $argsString .= ', true';
+                               } elseif ($arg === false) {
+                                       // ... is boolean 'true'
+                                       $argsString .= ', false';
+                               }
 
                                // Closing bracket
                                $argsString .= '), ';
 
                                // Closing bracket
                                $argsString .= '), ';
index 7c3e29df7e9ab080d12db6aa0970966f83c54fc8..ad605ce776493f6e53789f9ccd31d6df5d8c8ee8 100644 (file)
@@ -679,7 +679,7 @@ class WebFormHelper extends BaseWebHelper implements HelpableTemplate {
                        // Get last executed pre filter
                        $extraInstance = Registry::getRegistry()->getInstance('extra');
                } catch (NullPointerException $e) {
                        // Get last executed pre filter
                        $extraInstance = Registry::getRegistry()->getInstance('extra');
                } catch (NullPointerException $e) {
-                       // Instance in registry is not set (null)
+                       // Instance in registry is not set (NULL)
                        // @TODO We need to log this later
                }
 
                        // @TODO We need to log this later
                }
 
index c0728738a1fe947518681855f8fe05e02e6768d8..24c2ee3426c84b8adaf32ef99e1826fb138f679c 100644 (file)
@@ -179,7 +179,7 @@ class FrameworkDirectoryPointer extends BaseFrameworkSystem {
        public function closeDirectory () {
                // Close the directory pointer and reset the instance variable
                @closedir($this->getPointer());
        public function closeDirectory () {
                // Close the directory pointer and reset the instance variable
                @closedir($this->getPointer());
-               $this->setPointer(null);
+               $this->setPointer(NULL);
                $this->setPathName('');
        }
 
                $this->setPathName('');
        }
 
index f1d0b9e4c532ed416894f472a3b8b55280f31528..c7a6ad178902b1bc5be94fb430c27676f95fb4db 100644 (file)
@@ -162,7 +162,7 @@ class FrameworkFileInputPointer extends BaseFrameworkSystem {
 
                // Close the file pointer and reset the instance variable
                @fclose($this->getPointer());
 
                // Close the file pointer and reset the instance variable
                @fclose($this->getPointer());
-               $this->setPointer(null);
+               $this->setPointer(NULL);
                $this->setFileName('');
        }
 
                $this->setFileName('');
        }
 
index 5fb5e7510b13581fcd339815f477b0dc750496de..0b05f8c41e2a05b15acb2e2df7c656f2877ab8d7 100644 (file)
@@ -132,7 +132,7 @@ class FrameworkFileOutputPointer extends BaseFrameworkSystem {
 
                // Close the file pointer and reset the instance variable
                @fclose($this->getPointer());
 
                // Close the file pointer and reset the instance variable
                @fclose($this->getPointer());
-               $this->setPointer(null);
+               $this->setPointer(NULL);
                $this->setFileName('');
        }
 
                $this->setFileName('');
        }
 
index 1bfd88063616920d943e4430c44d2c9798af975e..ea31904d0797a14ef86c083456115cf78bf19d42 100644 (file)
@@ -104,7 +104,7 @@ class BaseStacker extends BaseFrameworkSystem {
        /**
         * Checks wether the given stack is empty
         *
        /**
         * Checks wether the given stack is empty
         *
-        * @param       $stackerName    Name of the stack
+        * @param       $stackerName            Name of the stack
         * @return      $isEmpty                        Wether the stack is empty
         * @throws      NoStackerException      If given stack is missing
         */
         * @return      $isEmpty                        Wether the stack is empty
         * @throws      NoStackerException      If given stack is missing
         */
@@ -116,10 +116,10 @@ class BaseStacker extends BaseFrameworkSystem {
                } // END - if
 
                // So, is the stack empty?
                } // END - if
 
                // So, is the stack empty?
-               $isFull = (($this->getStackCount($stackerName)) == 0);
+               $isEmpty = (($this->getStackCount($stackerName)) == 0);
 
                // Return result
 
                // Return result
-               return $isFull;
+               return $isEmpty;
        }
 
        /**
        }
 
        /**