diff --git a/src/Filter/Validator.php b/src/Filter/Validator.php index 1b844017..95b0caeb 100644 --- a/src/Filter/Validator.php +++ b/src/Filter/Validator.php @@ -21,8 +21,8 @@ namespace Zend\Log\Filter; -use Zend\Log\Exception, - Zend\Validator\ValidatorInterface as ZendValidator; +use Zend\Log\Exception; +use Zend\Validator\ValidatorInterface as ZendValidator; /** * @category Zend diff --git a/src/Formatter/Xml.php b/src/Formatter/Xml.php index 6594163c..0d69ba22 100644 --- a/src/Formatter/Xml.php +++ b/src/Formatter/Xml.php @@ -21,10 +21,10 @@ namespace Zend\Log\Formatter; -use Traversable, - Zend\Stdlib\ArrayUtils, - DOMDocument, - DOMElement; +use Traversable; +use Zend\Stdlib\ArrayUtils; +use DOMDocument; +use DOMElement; /** * @category Zend diff --git a/src/Logger.php b/src/Logger.php index 900a9a1e..ad4c2152 100644 --- a/src/Logger.php +++ b/src/Logger.php @@ -20,10 +20,10 @@ namespace Zend\Log; -use DateTime, - Zend\Stdlib\SplPriorityQueue, - Traversable, - Zend\Stdlib\ArrayUtils; +use DateTime; +use Zend\Stdlib\SplPriorityQueue; +use Traversable; +use Zend\Stdlib\ArrayUtils; /** * Logging messages with a stack of backends @@ -50,7 +50,7 @@ class Logger implements LoggerInterface /** * The format of the date used for a log entry (ISO 8601 date) - * + * * @see http://nl3.php.net/manual/en/function.date.php * @var string */ @@ -88,18 +88,18 @@ class Logger implements LoggerInterface /** * Registered error handler - * + * * @var boolean */ protected static $registeredErrorHandler = false; - + /** * Registered exception handler - * + * * @var boolean */ protected static $registeredExceptionHandler = false; - + /** * Constructor * @@ -215,7 +215,7 @@ public function addWriter($writer, $priority=1) is_object($writer) ? get_class($writer) : gettype($writer) )); } - + $this->writers->insert($writer, $priority); return $this; @@ -223,8 +223,8 @@ public function addWriter($writer, $priority=1) /** * Get writers - * - * @return SplPriorityQueue + * + * @return SplPriorityQueue */ public function getWriters() { @@ -232,8 +232,8 @@ public function getWriters() } /** * Set the writers - * - * @param SplPriorityQueue $writers + * + * @param SplPriorityQueue $writers * @throws Exception\InvalidArgumentException * @return Logger */ @@ -283,14 +283,14 @@ public function log($priority, $message, $extra = array()) if ($this->writers->count() === 0) { throw new Exception\RuntimeException('No log writer specified'); } - + $date = new DateTime(); $timestamp = $date->format($this->getDateTimeFormat()); if (is_array($message)) { $message = var_export($message, true); } - + foreach ($this->writers->toArray() as $writer) { $writer->write(array( 'timestamp' => $timestamp, @@ -383,11 +383,11 @@ public function debug($message, $extra = array()) { return $this->log(self::DEBUG, $message, $extra); } - + /** * Register logging system as an error handler to log PHP errors * - * @link http://www.php.net/manual/en/function.set-error-handler.php + * @link http://www.php.net/manual/en/function.set-error-handler.php * * @param Logger $logger * @return boolean @@ -402,7 +402,7 @@ public static function registerErrorHandler(Logger $logger) if ($logger === null) { throw new Exception\InvalidArgumentException('Invalid Logger specified'); } - + $errorHandlerMap = array( E_NOTICE => self::NOTICE, E_USER_NOTICE => self::NOTICE, @@ -417,7 +417,7 @@ public static function registerErrorHandler(Logger $logger) E_DEPRECATED => self::DEBUG, E_USER_DEPRECATED => self::DEBUG ); - + set_error_handler(function($errno, $errstr, $errfile, $errline, $errcontext) use ($errorHandlerMap, $logger) { $errorLevel = error_reporting(); @@ -435,7 +435,7 @@ public static function registerErrorHandler(Logger $logger) } /** * Unregister error handler - * + * */ public static function unregisterErrorHandler() { @@ -444,11 +444,11 @@ public static function unregisterErrorHandler() } /** * Register logging system as an exception handler to log PHP exceptions - * + * * @link http://www.php.net/manual/en/function.set-exception-handler.php - * + * * @param Logger $logger - * @return type + * @return type */ public static function registerExceptionHandler(Logger $logger) { @@ -456,15 +456,15 @@ public static function registerExceptionHandler(Logger $logger) if (self::$registeredExceptionHandler) { return false; } - + if ($logger === null) { throw new Exception\InvalidArgumentException('Invalid Logger specified'); } - + set_exception_handler(function ($exception) use ($logger){ - $extra = array ('file' => $exception->getFile(), + $extra = array ('file' => $exception->getFile(), 'line' => $exception->getLine(), - 'trace' => $exception->getTrace()); + 'trace' => $exception->getTrace()); if (isset($exception->xdebug_message)) { $extra['xdebug'] = $exception->xdebug_message; } @@ -473,7 +473,7 @@ public static function registerExceptionHandler(Logger $logger) self::$registeredExceptionHandler = true; return true; } - + /** * Unregister exception handler */ diff --git a/src/Writer/AbstractWriter.php b/src/Writer/AbstractWriter.php index 292cbc68..be2e1091 100644 --- a/src/Writer/AbstractWriter.php +++ b/src/Writer/AbstractWriter.php @@ -21,9 +21,9 @@ namespace Zend\Log\Writer; -use Zend\Log\Filter, - Zend\Log\Formatter\FormatterInterface as Formatter, - Zend\Log\Exception; +use Zend\Log\Filter; +use Zend\Log\Formatter\FormatterInterface as Formatter; +use Zend\Log\Exception; /** * @category Zend diff --git a/src/Writer/Db.php b/src/Writer/Db.php index a0c9d49d..c0ff9438 100644 --- a/src/Writer/Db.php +++ b/src/Writer/Db.php @@ -21,9 +21,9 @@ namespace Zend\Log\Writer; -use Zend\Log\Formatter, - Zend\Log\Exception, - Zend\Db\Adapter\Adapter; +use Zend\Log\Formatter; +use Zend\Log\Exception; +use Zend\Db\Adapter\Adapter; /** * @category Zend diff --git a/src/Writer/Mail.php b/src/Writer/Mail.php index 879d95f8..13e0faf6 100644 --- a/src/Writer/Mail.php +++ b/src/Writer/Mail.php @@ -21,11 +21,11 @@ namespace Zend\Log\Writer; -use Zend\Log\Formatter\Simple as SimpleFormatter, - Zend\Log\Exception, - Zend\Mail\Message as MailMessage, - Zend\Mail\Transport, - Zend\Mail\Transport\Exception as TransportException; +use Zend\Log\Formatter\Simple as SimpleFormatter; +use Zend\Log\Exception; +use Zend\Mail\Message as MailMessage; +use Zend\Mail\Transport; +use Zend\Mail\Transport\Exception as TransportException; /** * Class used for writing log messages to email via Zend\Mail. diff --git a/src/Writer/Stream.php b/src/Writer/Stream.php index cf9d2b21..84234a9b 100644 --- a/src/Writer/Stream.php +++ b/src/Writer/Stream.php @@ -21,8 +21,8 @@ namespace Zend\Log\Writer; -use Zend\Log\Formatter\Simple as SimpleFormatter, - Zend\Log\Exception; +use Zend\Log\Formatter\Simple as SimpleFormatter; +use Zend\Log\Exception; /** * @category Zend diff --git a/src/Writer/Syslog.php b/src/Writer/Syslog.php index ba98ae17..dca550ca 100644 --- a/src/Writer/Syslog.php +++ b/src/Writer/Syslog.php @@ -21,9 +21,9 @@ namespace Zend\Log\Writer; -use Zend\Log\Logger, - Zend\Log\Formatter, - Zend\Log\Exception; +use Zend\Log\Logger; +use Zend\Log\Formatter; +use Zend\Log\Exception; /** * Writes log messages to syslog diff --git a/src/Writer/WriterInterface.php b/src/Writer/WriterInterface.php index 4b88d872..83ab5a50 100644 --- a/src/Writer/WriterInterface.php +++ b/src/Writer/WriterInterface.php @@ -20,8 +20,8 @@ namespace Zend\Log\Writer; -use Zend\Log\Formatter\FormatterInterface as Formatter, - Zend\Log\Filter\FilterInterface as Filter; +use Zend\Log\Formatter\FormatterInterface as Formatter; +use Zend\Log\Filter\FilterInterface as Filter; /** * @category Zend diff --git a/test/Filter/ChainingTest.php b/test/Filter/ChainingTest.php index 484a797c..b55c2116 100644 --- a/test/Filter/ChainingTest.php +++ b/test/Filter/ChainingTest.php @@ -21,8 +21,8 @@ namespace ZendTest\Log\Filter; -use \Zend\Log\Logger, - \Zend\Log\Writer; +use \Zend\Log\Logger; +use \Zend\Log\Writer; /** * @category Zend diff --git a/test/Filter/PriorityTest.php b/test/Filter/PriorityTest.php index b0946343..65f97d14 100644 --- a/test/Filter/PriorityTest.php +++ b/test/Filter/PriorityTest.php @@ -21,8 +21,8 @@ namespace ZendTest\Log\Filter; -use \Zend\Log\Logger, - \Zend\Log\Filter\Priority; +use \Zend\Log\Logger; +use \Zend\Log\Filter\Priority; /** * @category Zend diff --git a/test/Filter/RegexTest.php b/test/Filter/RegexTest.php index b113b061..9909a6a2 100644 --- a/test/Filter/RegexTest.php +++ b/test/Filter/RegexTest.php @@ -21,9 +21,9 @@ namespace ZendTest\Log\Filter; -use Zend\Log\Logger, - Zend\Log\Filter\Regex, - Zend\Config\Config; +use Zend\Log\Logger; +use Zend\Log\Filter\Regex; +use Zend\Config\Config; /** * @category Zend diff --git a/test/Filter/SuppressFilterTest.php b/test/Filter/SuppressFilterTest.php index 0650355a..8f4a0921 100644 --- a/test/Filter/SuppressFilterTest.php +++ b/test/Filter/SuppressFilterTest.php @@ -21,8 +21,8 @@ namespace ZendTest\Log\Filter; -use \Zend\Log\Filter\SuppressFilter, - \Zend\Log\Logger; +use \Zend\Log\Filter\SuppressFilter; +use \Zend\Log\Logger; /** * @category Zend diff --git a/test/Filter/ValidatorTest.php b/test/Filter/ValidatorTest.php index a7909f73..cd5003e0 100644 --- a/test/Filter/ValidatorTest.php +++ b/test/Filter/ValidatorTest.php @@ -21,11 +21,11 @@ namespace ZendTest\Log\Filter; -use Zend\Log\Logger, - Zend\Log\Filter\Validator, - Zend\Validator\ValidatorChain, - Zend\Validator\Alnum, - Zend\Validator\Int; +use Zend\Log\Logger; +use Zend\Log\Filter\Validator; +use Zend\Validator\ValidatorChain; +use Zend\Validator\Alnum; +use Zend\Validator\Int; /** * @category Zend diff --git a/test/Formatter/SimpleTest.php b/test/Formatter/SimpleTest.php index d372d011..954c71d6 100644 --- a/test/Formatter/SimpleTest.php +++ b/test/Formatter/SimpleTest.php @@ -21,8 +21,8 @@ namespace ZendTest\Log\Formatter; -use ZendTest\Log\TestAsset\StringObject, - \Zend\Log\Formatter\Simple; +use ZendTest\Log\TestAsset\StringObject; +use \Zend\Log\Formatter\Simple; /** * @category Zend diff --git a/test/Formatter/XmlTest.php b/test/Formatter/XmlTest.php index 0eaabd6d..a095d475 100644 --- a/test/Formatter/XmlTest.php +++ b/test/Formatter/XmlTest.php @@ -21,8 +21,8 @@ namespace ZendTest\Log\Formatter; -use ZendTest\Log\TestAsset\SerializableObject, - Zend\Log\Formatter\Xml as XmlFormatter; +use ZendTest\Log\TestAsset\SerializableObject; +use Zend\Log\Formatter\Xml as XmlFormatter; /** * @category Zend diff --git a/test/LoggerTest.php b/test/LoggerTest.php index 6884cc14..64423d33 100644 --- a/test/LoggerTest.php +++ b/test/LoggerTest.php @@ -21,9 +21,9 @@ namespace ZendTest\Log; -use Zend\Log\Logger, - Zend\Log\Writer\Mock as MockWriter, - Zend\Stdlib\SplPriorityQueue; +use Zend\Log\Logger; +use Zend\Log\Writer\Mock as MockWriter; +use Zend\Stdlib\SplPriorityQueue; /** * @category Zend diff --git a/test/Writer/AbstractTest.php b/test/Writer/AbstractTest.php index 2ed25cb6..fe980ec7 100644 --- a/test/Writer/AbstractTest.php +++ b/test/Writer/AbstractTest.php @@ -21,9 +21,9 @@ namespace ZendTest\Log\Writer; -use ZendTest\Log\TestAsset\ConcreteWriter, - Zend\Log\Formatter\Simple as SimpleFormatter, - Zend\Log\Filter\Regex as RegexFilter; +use ZendTest\Log\TestAsset\ConcreteWriter; +use Zend\Log\Formatter\Simple as SimpleFormatter; +use Zend\Log\Filter\Regex as RegexFilter; /** * @category Zend diff --git a/test/Writer/DbTest.php b/test/Writer/DbTest.php index 5b5e726a..0b4eb344 100644 --- a/test/Writer/DbTest.php +++ b/test/Writer/DbTest.php @@ -21,11 +21,11 @@ namespace ZendTest\Log\Writer; -use ZendTest\Log\TestAsset\MockDbAdapter, - ZendTest\Log\TestAsset\MockDbDriver, - Zend\Log\Writer\Db as DbWriter, - Zend\Log\Logger, - Zend\Log\Formatter\Simple as SimpleFormatter; +use ZendTest\Log\TestAsset\MockDbAdapter; +use ZendTest\Log\TestAsset\MockDbDriver; +use Zend\Log\Writer\Db as DbWriter; +use Zend\Log\Logger; +use Zend\Log\Formatter\Simple as SimpleFormatter; /** * @category Zend diff --git a/test/Writer/MailTest.php b/test/Writer/MailTest.php index 00fcdb6b..aa086b06 100644 --- a/test/Writer/MailTest.php +++ b/test/Writer/MailTest.php @@ -21,11 +21,11 @@ namespace ZendTest\Log\Writer; -use Zend\Log\Logger, - Zend\Log\Writer\Mail as MailWriter, - Zend\Log\Formatter\Simple as SimpleFormatter, - Zend\Mail\Message as MailMessage, - Zend\Mail\Transport; +use Zend\Log\Logger; +use Zend\Log\Writer\Mail as MailWriter; +use Zend\Log\Formatter\Simple as SimpleFormatter; +use Zend\Mail\Message as MailMessage; +use Zend\Mail\Transport; /** * @category Zend diff --git a/test/Writer/MockTest.php b/test/Writer/MockTest.php index 0c60f75a..68960e42 100644 --- a/test/Writer/MockTest.php +++ b/test/Writer/MockTest.php @@ -21,8 +21,8 @@ namespace ZendTest\Log\Writer; -use Zend\Log\Writer\Mock as MockWriter, - Zend\Log\Logger; +use Zend\Log\Writer\Mock as MockWriter; +use Zend\Log\Logger; /** * @category Zend diff --git a/test/Writer/NullTest.php b/test/Writer/NullTest.php index b8efb385..ab4e039b 100644 --- a/test/Writer/NullTest.php +++ b/test/Writer/NullTest.php @@ -21,8 +21,8 @@ namespace ZendTest\Log\Writer; -use Zend\Log\Writer\Null as NullWriter, - Zend\Log\Logger; +use Zend\Log\Writer\Null as NullWriter; +use Zend\Log\Logger; /** * @category Zend diff --git a/test/Writer/StreamTest.php b/test/Writer/StreamTest.php index ee033c0b..98e73c89 100644 --- a/test/Writer/StreamTest.php +++ b/test/Writer/StreamTest.php @@ -21,9 +21,9 @@ namespace ZendTest\Log\Writer; -use Zend\Log\Writer\Stream as StreamWriter, - Zend\Log\Logger, - Zend\Log\Formatter\Simple as SimpleFormatter; +use Zend\Log\Writer\Stream as StreamWriter; +use Zend\Log\Logger; +use Zend\Log\Formatter\Simple as SimpleFormatter; /** * @category Zend diff --git a/test/Writer/SyslogTest.php b/test/Writer/SyslogTest.php index 1f0c0d98..d374f5f8 100644 --- a/test/Writer/SyslogTest.php +++ b/test/Writer/SyslogTest.php @@ -21,10 +21,10 @@ namespace ZendTest\Log\Writer; -use ZendTest\Log\TestAsset\CustomSyslogWriter, - Zend\Log\Writer\Syslog as SyslogWriter, - Zend\Log\Logger, - Zend\Log\Formatter\Simple as SimpleFormatter; +use ZendTest\Log\TestAsset\CustomSyslogWriter; +use Zend\Log\Writer\Syslog as SyslogWriter; +use Zend\Log\Logger; +use Zend\Log\Formatter\Simple as SimpleFormatter; /** * @category Zend