H4 phpdoc and formatting cleanups
authorMichael M Slusarz <slusarz@curecanti.org>
Mon, 6 Sep 2010 19:36:52 +0000 (13:36 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Mon, 6 Sep 2010 20:31:16 +0000 (14:31 -0600)
32 files changed:
framework/Log/lib/Horde/Log.php
framework/Log/lib/Horde/Log/Exception.php
framework/Log/lib/Horde/Log/Filter.php
framework/Log/lib/Horde/Log/Filter/Constraint.php
framework/Log/lib/Horde/Log/Filter/Level.php
framework/Log/lib/Horde/Log/Filter/Message.php
framework/Log/lib/Horde/Log/Filter/Suppress.php
framework/Log/lib/Horde/Log/Formatter.php
framework/Log/lib/Horde/Log/Formatter/Simple.php
framework/Log/lib/Horde/Log/Formatter/Xml.php
framework/Log/lib/Horde/Log/Handler/Base.php
framework/Log/lib/Horde/Log/Handler/Db.php
framework/Log/lib/Horde/Log/Handler/Firebug.php
framework/Log/lib/Horde/Log/Handler/Mock.php
framework/Log/lib/Horde/Log/Handler/Null.php
framework/Log/lib/Horde/Log/Handler/Scribe.php
framework/Log/lib/Horde/Log/Handler/Stream.php
framework/Log/lib/Horde/Log/Handler/Syslog.php
framework/Log/lib/Horde/Log/Logger.php
framework/Log/test/Horde/Log/AllTests.php
framework/Log/test/Horde/Log/Filter/ChainingTest.php
framework/Log/test/Horde/Log/Filter/ConstraintTest.php
framework/Log/test/Horde/Log/Filter/LevelTest.php
framework/Log/test/Horde/Log/Filter/MessageTest.php
framework/Log/test/Horde/Log/Filter/SuppressTest.php
framework/Log/test/Horde/Log/Formatter/SimpleTest.php
framework/Log/test/Horde/Log/Formatter/XmlTest.php
framework/Log/test/Horde/Log/Handler/DbTest.php
framework/Log/test/Horde/Log/Handler/FirebugTest.php
framework/Log/test/Horde/Log/Handler/NullTest.php
framework/Log/test/Horde/Log/Handler/StreamTest.php
framework/Log/test/Horde/Log/LogTest.php

index 08d065c..9f4a158 100644 (file)
@@ -7,7 +7,7 @@
  * one were written by Mike Naberezny and Chuck Hagenbuch.
  *
  * @category Horde
- * @package  Horde_Log
+ * @package  Log
  * @author   Mike Naberezny <mike@maintainable.com>
  * @author   Chuck Hagenbuch <chuck@horde.org>
  * @license  http://opensource.org/licenses/bsd-license.php BSD
@@ -15,7 +15,7 @@
 
 /**
  * @category Horde
- * @package Horde_Log
+ * @package  Log
  */
 class Horde_Log {
 
index aa18ca9..07f051e 100644 (file)
@@ -6,16 +6,18 @@
  * (http://framework.zend.com).  Both that package and this
  * one were written by Mike Naberezny and Chuck Hagenbuch.
  *
- * @package  Horde_Log
  * @author   Mike Naberezny <mike@maintainable.com>
  * @author   Chuck Hagenbuch <chuck@horde.org>
+ * @category Horde
  * @license  http://opensource.org/licenses/bsd-license.php BSD
+ * @package  Log
  */
 
 /**
- * @package  Horde_Log
  * @author   Mike Naberezny <mike@maintainable.com>
  * @author   Chuck Hagenbuch <chuck@horde.org>
+ * @category Horde
  * @license  http://opensource.org/licenses/bsd-license.php BSD
+ * @package  Log
  */
 class Horde_Log_Exception extends Exception {}
index 8a0b297..6d37997 100644 (file)
@@ -6,21 +6,22 @@
  * (http://framework.zend.com).  Both that package and this
  * one were written by Mike Naberezny and Chuck Hagenbuch.
  *
- * @category Horde
- * @package  Horde_Log
+ * @author     Mike Naberezny <mike@maintainable.com>
+ * @author     Chuck Hagenbuch <chuck@horde.org>
+ * @category   Horde
+ * @license    http://opensource.org/licenses/bsd-license.php BSD
+ * @package    Log
  * @subpackage Filters
- * @author   Mike Naberezny <mike@maintainable.com>
- * @author   Chuck Hagenbuch <chuck@horde.org>
- * @license  http://opensource.org/licenses/bsd-license.php BSD
  */
 
 /**
- * @category Horde
- * @package  Horde_Log
+ * @category   Horde
+ * @subpackage Filters
+ * @author     Mike Naberezny <mike@maintainable.com>
+ * @author     Chuck Hagenbuch <chuck@horde.org>
+ * @license    http://opensource.org/licenses/bsd-license.php BSD
+ * @package    Log
  * @subpackage Filters
- * @author   Mike Naberezny <mike@maintainable.com>
- * @author   Chuck Hagenbuch <chuck@horde.org>
- * @license  http://opensource.org/licenses/bsd-license.php BSD
  */
 interface Horde_Log_Filter
 {
@@ -38,8 +39,10 @@ interface Horde_Log_Filter
      * Returns Horde_Log_Filter::ACCEPT to accept the message,
      * Horde_Log_Filter::IGNORE to ignore it.
      *
-     * @param  array    $event    Log event
-     * @return boolean            accepted?
+     * @param array $event  Log event.
+     *
+     * @return boolean  Accepted?
      */
     public function accept($event);
+
 }
index d7e42b8..6a22d96 100644 (file)
@@ -1,21 +1,21 @@
 <?php
 /**
- * @category Horde
- * @package  Horde_Log
+ * @author     James Pepin <james@jamespepin.com>
+ * @category   Horde
+ * @license    http://opensource.org/licenses/bsd-license.php BSD
+ * @package    Log
  * @subpackage Filters
- * @author James Pepin <james@jamespepin.com>
- * @license  http://opensource.org/licenses/bsd-license.php BSD
  */
 
 /**
  * Filters log events using defined constraints on one or more fields of the
- * $event array
+ * $event array.
  *
- * @category Horde
- * @package  Horde_Log
+ * @author     James Pepin <james@jamespepin.com>
+ * @category   Horde
+ * @license    http://opensource.org/licenses/bsd-license.php BSD
+ * @package    Log
  * @subpackage Filters
- * @author James Pepin <james@jamespepin.com>
- * @license  http://opensource.org/licenses/bsd-license.php BSD
  *
  * @todo Implement constraint objects for the different types of filtering ie
  * regex,required,type..etc..  so we can add different constaints ad infinitum.
 class Horde_Log_Filter_Constraint implements Horde_Log_Filter
 {
     /**
+     * Constraint list.
+     *
      * @var array
      */
     protected $_constraints = array();
 
     /**
+     * Default constraint coupler.
+     *
      * @var Horde_Constraint_Coupler
      * @default Horde_Constraint_And
      */
@@ -36,24 +40,27 @@ class Horde_Log_Filter_Constraint implements Horde_Log_Filter
     /**
      * Constructor
      *
-     * @param Horde_Constraint_Coupler $coupler The default kind of constraint
-     * to use to couple multiple constraints. Defaults to And.
+     * @param Horde_Constraint_Coupler $coupler  The default kind of
+     *                                           constraint to use to couple
+     *                                           multiple constraints.
+     *                                           Defaults to And.
      */
     public function __construct(Horde_Constraint_Coupler $coupler = null)
     {
-        if (is_null($coupler)) {
-            $coupler = new Horde_Constraint_And();
-        }
-        $this->_coupler = $coupler;
+        $this->_coupler = is_null($coupler)
+            ? new Horde_Constraint_And()
+            : $coupler;
     }
 
     /**
      * Add a constraint to the filter
      *
-     * @param string $field  The field to apply the constraint to
-     * @param Horde_Constraint $constraint  The constraint to apply
+     * @param string $field                 The field to apply the constraint
+     *                                      to.
+     * @param Horde_Constraint $constraint  The constraint to apply.
      *
-     * @return Horde_Log_Filter_Constraint A reference to $this to allow method chaining
+     * @return Horde_Log_Filter_Constraint  A reference to $this to allow
+     *                                      method chaining.
      */
     public function addConstraint($field, Horde_Constraint $constraint)
     {
@@ -61,6 +68,7 @@ class Horde_Log_Filter_Constraint implements Horde_Log_Filter
             $this->_constraints[$field] = clone($this->_coupler);
         }
         $this->_constraints[$field]->addConstraint($constraint);
+
         return $this;
     }
 
@@ -70,14 +78,15 @@ class Horde_Log_Filter_Constraint implements Horde_Log_Filter
      * Takes a field name and a regex, if the regex does not match then the
      * event is filtered.
      *
-     * @param string $field The name of the field that should be part of the event
-     * @param string $regex The regular expression to filter by
-     * @return Horde_Log_Filter_Constraint A reference to $this to allow method chaining
+     * @param string $field  The name of the field that should be part of the
+     *                       event.
+     * @param string $regex  The regular expression to filter by.
+     * @return Horde_Log_Filter_Constraint  A reference to $this to allow
+     *                                      method chaining.
      */
     public function addRegex($field, $regex)
     {
-        $constraint = new Horde_Constraint_PregMatch($regex);
-        return $this->addConstraint($field, $constraint);
+        return $this->addConstraint($field, new Horde_Constraint_PregMatch($regex));
     }
 
     /**
@@ -85,26 +94,29 @@ class Horde_Log_Filter_Constraint implements Horde_Log_Filter
      *
      * If the field does not exist on the event, then it is filtered.
      *
-     * @param string $field The name of the field that should be part of the event
-     * @return Horde_Log_Filter_Constraint A reference to $this to allow method chaining
+     * @param string $field  The name of the field that should be part of the
+     *                       event.
+     *
+     * @return Horde_Log_Filter_Constraint  A reference to $this to allow
+     *                                      method chaining.
      */
     public function addRequiredField($field)
     {
-        $notNull = new Horde_Constraint_Not(new Horde_Constraint_Null());
-        return $this->addConstraint($field, $notNull);
+        return $this->addConstraint($field, new Horde_Constraint_Not(new Horde_Constraint_Null()));
     }
 
     /**
      * Adds all arguments passed as required fields
      *
-     * @return Horde_Log_Filter_Constraint A reference to $this to allow method chaining
+     * @return Horde_Log_Filter_Constraint  A reference to $this to allow
+     *                                      method chaining.
      */
     public function addRequiredFields()
     {
-        $fields = func_get_args();
-        foreach ($fields as $f) {
+        foreach (func_get_args() as $f) {
             $this->addRequiredField($f);
         }
+
         return $this;
     }
 
@@ -112,8 +124,9 @@ class Horde_Log_Filter_Constraint implements Horde_Log_Filter
      * Returns Horde_Log_Filter::ACCEPT to accept the message,
      * Horde_Log_Filter::IGNORE to ignore it.
      *
-     * @param  array    $event    Log event
-     * @return boolean            accepted?
+     * @param array $event  Log event.
+     *
+     * @return boolean  accepted?
      */
     public function accept($event)
     {
@@ -123,6 +136,8 @@ class Horde_Log_Filter_Constraint implements Horde_Log_Filter
                 return Horde_Log_Filter::IGNORE;
             }
         }
+
         return Horde_Log_Filter::ACCEPT;
     }
+
 }
index 4a7a248..f019849 100644 (file)
@@ -6,23 +6,27 @@
  * (http://framework.zend.com).  Both that package and this
  * one were written by Mike Naberezny and Chuck Hagenbuch.
  *
- * @package  Horde_Log
+ * @author     Mike Naberezny <mike@maintainable.com>
+ * @author     Chuck Hagenbuch <chuck@horde.org>
+ * @category   Horde
+ * @license    http://opensource.org/licenses/bsd-license.php BSD
+ * @package    Log
  * @subpackage Filters
- * @author   Mike Naberezny <mike@maintainable.com>
- * @author   Chuck Hagenbuch <chuck@horde.org>
- * @license  http://opensource.org/licenses/bsd-license.php BSD
  */
 
 /**
- * @package  Horde_Log
+ * @author     Mike Naberezny <mike@maintainable.com>
+ * @author     Chuck Hagenbuch <chuck@horde.org>
+ * @category   Horde
+ * @license    http://opensource.org/licenses/bsd-license.php BSD
+ * @package    Log
  * @subpackage Filters
- * @author   Mike Naberezny <mike@maintainable.com>
- * @author   Chuck Hagenbuch <chuck@horde.org>
- * @license  http://opensource.org/licenses/bsd-license.php BSD
  */
 class Horde_Log_Filter_Level implements Horde_Log_Filter
 {
     /**
+     * Filter level.
+     *
      * @var integer
      */
     protected $_level;
@@ -30,12 +34,14 @@ class Horde_Log_Filter_Level implements Horde_Log_Filter
     /**
      * Filter out any log messages greater than $level.
      *
-     * @param  integer  $level  Maximum log level to pass through the filter
+     * @param integer $level  Maximum log level to pass through the filter.
+     *
+     * @throws InvalidArgumentException
      */
     public function __construct($level)
     {
-        if (! is_integer($level)) {
-            throw new Horde_Log_Exception('Level must be an integer');
+        if (!is_integer($level)) {
+            throw new InvalidArgumentException('Level must be an integer');
         }
 
         $this->_level = $level;
@@ -45,11 +51,13 @@ class Horde_Log_Filter_Level implements Horde_Log_Filter
      * Returns Horde_Log_Filter::ACCEPT to accept the message,
      * Horde_Log_Filter::IGNORE to ignore it.
      *
-     * @param  array    $event    Log event
-     * @return boolean            accepted?
+     * @param array $event  Log event.
+     *
+     * @return boolean  Accepted?
      */
     public function accept($event)
     {
-        return $event['level'] <= $this->_level;
+        return ($event['level'] <= $this->_level);
     }
+
 }
index e0da1ee..ccbd938 100644 (file)
@@ -6,25 +6,27 @@
  * (http://framework.zend.com).  Both that package and this
  * one were written by Mike Naberezny and Chuck Hagenbuch.
  *
- * @category Horde
- * @package  Horde_Log
+ * @author     Mike Naberezny <mike@maintainable.com>
+ * @author     Chuck Hagenbuch <chuck@horde.org>
+ * @category   Horde
+ * @license    http://opensource.org/licenses/bsd-license.php BSD
+ * @package    Log
  * @subpackage Filters
- * @author   Mike Naberezny <mike@maintainable.com>
- * @author   Chuck Hagenbuch <chuck@horde.org>
- * @license  http://opensource.org/licenses/bsd-license.php BSD
  */
 
 /**
- * @category Horde
- * @package  Horde_Log
+ * @author     Mike Naberezny <mike@maintainable.com>
+ * @author     Chuck Hagenbuch <chuck@horde.org>
+ * @category   Horde
+ * @license    http://opensource.org/licenses/bsd-license.php BSD
+ * @package    Log
  * @subpackage Filters
- * @author   Mike Naberezny <mike@maintainable.com>
- * @author   Chuck Hagenbuch <chuck@horde.org>
- * @license  http://opensource.org/licenses/bsd-license.php BSD
  */
 class Horde_Log_Filter_Message implements Horde_Log_Filter
 {
     /**
+     * Filter regex.
+     *
      * @var string
      */
     protected $_regexp;
@@ -32,14 +34,16 @@ class Horde_Log_Filter_Message implements Horde_Log_Filter
     /**
      * Filter out any log messages not matching $regexp.
      *
-     * @param  string  $regexp     Regular expression to test the log message
-     * @throws Horde_Log_Exception  Invalid regular expression
+     * @param string $regexp  Regular expression to test the log message.
+     *
+     * @throws InvalidArgumentException  Invalid regular expression.
      */
     public function __construct($regexp)
     {
         if (@preg_match($regexp, '') === false) {
-            throw new Horde_Log_Exception("Invalid regular expression '$regexp'");
+            throw new InvalidArgumentException('Invalid regular expression ' . $regexp);
         }
+
         $this->_regexp = $regexp;
     }
 
@@ -47,11 +51,13 @@ class Horde_Log_Filter_Message implements Horde_Log_Filter
      * Returns Horde_Log_Filter::ACCEPT to accept the message,
      * Horde_Log_Filter::IGNORE to ignore it.
      *
-     * @param  array    $event    Log event
-     * @return boolean            accepted?
+     * @param array $event  Log event.
+     *
+     * @return boolean  Accepted?
      */
     public function accept($event)
     {
-        return preg_match($this->_regexp, $event['message']) > 0;
+        return (preg_match($this->_regexp, $event['message']) > 0);
     }
+
 }
index 2b3f9cb..23f7008 100644 (file)
@@ -6,25 +6,27 @@
  * (http://framework.zend.com).  Both that package and this
  * one were written by Mike Naberezny and Chuck Hagenbuch.
  *
- * @category Horde
- * @package  Horde_Log
+ * @author     Mike Naberezny <mike@maintainable.com>
+ * @author     Chuck Hagenbuch <chuck@horde.org>
+ * @category   Horde
+ * @license    http://opensource.org/licenses/bsd-license.php BSD
+ * @package    Log
  * @subpackage Filters
- * @author   Mike Naberezny <mike@maintainable.com>
- * @author   Chuck Hagenbuch <chuck@horde.org>
- * @license  http://opensource.org/licenses/bsd-license.php BSD
  */
 
 /**
- * @category Horde
- * @package  Horde_Log
+ * @author     Mike Naberezny <mike@maintainable.com>
+ * @author     Chuck Hagenbuch <chuck@horde.org>
+ * @category   Horde
+ * @license    http://opensource.org/licenses/bsd-license.php BSD
+ * @package    Log
  * @subpackage Filters
- * @author   Mike Naberezny <mike@maintainable.com>
- * @author   Chuck Hagenbuch <chuck@horde.org>
- * @license  http://opensource.org/licenses/bsd-license.php BSD
  */
 class Horde_Log_Filter_Suppress implements Horde_Log_Filter
 {
     /**
+     * Accept all events?
+     *
      * @var boolean
      */
     protected $_accept = Horde_Log_Filter::ACCEPT;
@@ -32,26 +34,24 @@ class Horde_Log_Filter_Suppress implements Horde_Log_Filter
     /**
      * This is a simple boolean filter.
      *
-     * Call suppress(true) to suppress all log events.
-     * Call suppress(false) to accept all log events.
-     *
-     * @param  boolean  $suppress  Should all log events be suppressed?
-     * @return  void
+     * @param boolean $suppress  Should all log events be suppressed?
      */
     public function suppress($suppress)
     {
-        $this->_accept = (! $suppress);
+        $this->_accept = !$suppress;
     }
 
     /**
      * Returns Horde_Log_Filter::ACCEPT to accept the message,
      * Horde_Log_Filter::IGNORE to ignore it.
      *
-     * @param  array    $event    event data
-     * @return boolean            accepted?
+     * @param array $event  Event data.
+     *
+     * @return boolean  Accepted?
      */
     public function accept($event)
     {
         return $this->_accept;
     }
+
 }
index 1d97ae7..f69225f 100644 (file)
@@ -6,25 +6,29 @@
  * (http://framework.zend.com).  Both that package and this
  * one were written by Mike Naberezny and Chuck Hagenbuch.
  *
- * @package  Horde_Log
  * @author   Mike Naberezny <mike@maintainable.com>
  * @author   Chuck Hagenbuch <chuck@horde.org>
+ * @category Horde
  * @license  http://opensource.org/licenses/bsd-license.php BSD
+ * @package  Log
  */
 
 /**
- * @package  Horde_Log
  * @author   Mike Naberezny <mike@maintainable.com>
  * @author   Chuck Hagenbuch <chuck@horde.org>
+ * @category Horde
  * @license  http://opensource.org/licenses/bsd-license.php BSD
+ * @package  Log
  */
 interface Horde_Log_Formatter
 {
     /**
      * Formats an event to be written by the handler.
      *
-     * @param  array    $event    Log event
-     * @return string             formatted line
+     * @param array $event  Log event.
+     *
+     * @return string  Formatted line.
      */
     public function format($event);
+
 }
index 1fc3a3d..1cc0333 100644 (file)
@@ -6,26 +6,26 @@
  * (http://framework.zend.com).  Both that package and this
  * one were written by Mike Naberezny and Chuck Hagenbuch.
  *
- * @category Horde
- * @package  Horde_Log
+ * @author     Mike Naberezny <mike@maintainable.com>
+ * @author     Chuck Hagenbuch <chuck@horde.org>
+ * @category   Horde
+ * @license    http://opensource.org/licenses/bsd-license.php BSD
+ * @package    Log
  * @subpackage Formatters
- * @author   Mike Naberezny <mike@maintainable.com>
- * @author   Chuck Hagenbuch <chuck@horde.org>
- * @license  http://opensource.org/licenses/bsd-license.php BSD
  */
 
 /**
- * @category Horde
- * @package  Horde_Log
+ * @author     Mike Naberezny <mike@maintainable.com>
+ * @author     Chuck Hagenbuch <chuck@horde.org>
+ * @category   Horde
+ * @license    http://opensource.org/licenses/bsd-license.php BSD
+ * @package    Log
  * @subpackage Formatters
- * @author   Mike Naberezny <mike@maintainable.com>
- * @author   Chuck Hagenbuch <chuck@horde.org>
- * @license  http://opensource.org/licenses/bsd-license.php BSD
  */
 class Horde_Log_Formatter_Simple implements Horde_Log_Formatter
 {
     /**
-     * Format string
+     * Format string.
      *
      * @var string
      */
@@ -34,25 +34,25 @@ class Horde_Log_Formatter_Simple implements Horde_Log_Formatter
     /**
      * Constructor.
      *
-     * @param array $options  Configuration Options:
+     * @param array $options  Configuration options:
      * <pre>
      * 'format' - (string) The log template.
      * </pre>
+     *
+     * @throws InvalidArgumentException
      */
     public function __construct($options = null)
     {
-        if (is_array($options) && isset($options['format'])) {
-            $format = $options['format'];
-        } else {
-            $format = $options;
-        }
+        $format = (is_array($options) && isset($options['format']))
+            ? $options['format']
+            : $options;
 
         if (is_null($format)) {
             $format = '%timestamp% %levelName%: %message%' . PHP_EOL;
         }
 
         if (!is_string($format)) {
-            throw new Horde_Log_Exception('Format must be a string');
+            throw new InvalidArgumentException('Format must be a string');
         }
 
         $this->_format = $format;
@@ -61,8 +61,9 @@ class Horde_Log_Formatter_Simple implements Horde_Log_Formatter
     /**
      * Formats an event to be written by the handler.
      *
-     * @param  array    $event    Log event
-     * @return string             formatted line
+     * @param array $event  Log event.
+     *
+     * @return string  Formatted line.
      */
     public function format($event)
     {
index e50c3e9..4f6b415 100644 (file)
@@ -6,30 +6,42 @@
  * (http://framework.zend.com).  Both that package and this
  * one were written by Mike Naberezny and Chuck Hagenbuch.
  *
- * @category Horde
- * @package  Horde_Log
+ * @author     Mike Naberezny <mike@maintainable.com>
+ * @author     Chuck Hagenbuch <chuck@horde.org>
+ * @category   Horde
+ * @license    http://opensource.org/licenses/bsd-license.php BSD
+ * @package    Log
  * @subpackage Formatters
- * @author   Mike Naberezny <mike@maintainable.com>
- * @author   Chuck Hagenbuch <chuck@horde.org>
- * @license  http://opensource.org/licenses/bsd-license.php BSD
  */
 
 /**
- * @category Horde
- * @package  Horde_Log
+ * @author     Mike Naberezny <mike@maintainable.com>
+ * @author     Chuck Hagenbuch <chuck@horde.org>
+ * @category   Horde
+ * @license    http://opensource.org/licenses/bsd-license.php BSD
+ * @package    Log
  * @subpackage Formatters
- * @author   Mike Naberezny <mike@maintainable.com>
- * @author   Chuck Hagenbuch <chuck@horde.org>
- * @license  http://opensource.org/licenses/bsd-license.php BSD
  */
 class Horde_Log_Formatter_Xml implements Horde_Log_Formatter
 {
-    protected $_options = array('elementEntry'     => 'log',
-                                'elementTimestamp' => 'timestamp',
-                                'elementMessage'   => 'message',
-                                'elementLevel'     => 'level',
-                                'lineEnding'       => PHP_EOL);
+    /**
+     * Config options.
+     *
+     * @var array
+     */
+    protected $_options = array(
+        'elementEntry'     => 'log',
+        'elementTimestamp' => 'timestamp',
+        'elementMessage'   => 'message',
+        'elementLevel'     => 'level',
+        'lineEnding'       => PHP_EOL
+    );
 
+    /**
+     * Constructor.
+     *
+     * TODO
+     */
     public function __construct($options = array())
     {
         $this->_options = array_merge($this->_options, $options);
@@ -38,8 +50,9 @@ class Horde_Log_Formatter_Xml implements Horde_Log_Formatter
     /**
      * Formats an event to be written by the handler.
      *
-     * @param  array    $event    Log event
-     * @return string             XML string
+     * @param array $event  Log event.
+     *
+     * @return string  XML string.
      */
     public function format($event)
     {
@@ -50,10 +63,7 @@ class Horde_Log_Formatter_Xml implements Horde_Log_Formatter
         $elt->appendChild(new DOMElement($this->_options['elementMessage'], $event['message']));
         $elt->appendChild(new DOMElement($this->_options['elementLevel'], $event['level']));
 
-        $xml = $dom->saveXML();
-        $xml = preg_replace('/<\?xml version="1.0"( encoding="[^\"]*")?\?>\n/u', '', $xml);
-
-        return $xml . $this->_options['lineEnding'];
+        return preg_replace('/<\?xml version="1.0"( encoding="[^\"]*")?\?>\n/u', '', $dom->saveXML()) . $this->_options['lineEnding'];
     }
 
 }
index 2bba7ea..c5bd332 100644 (file)
@@ -6,58 +6,58 @@
  * (http://framework.zend.com).  Both that package and this
  * one were written by Mike Naberezny and Chuck Hagenbuch.
  *
- * @category Horde
- * @package  Horde_Log
+ * @author     Mike Naberezny <mike@maintainable.com>
+ * @author     Chuck Hagenbuch <chuck@horde.org>
+ * @category   Horde
+ * @license    http://opensource.org/licenses/bsd-license.php BSD
+ * @package    Log
  * @subpackage Handlers
- * @author   Mike Naberezny <mike@maintainable.com>
- * @author   Chuck Hagenbuch <chuck@horde.org>
- * @license  http://opensource.org/licenses/bsd-license.php BSD
  */
 
 /**
- * @category Horde
- * @package  Horde_Log
+ * @author     Mike Naberezny <mike@maintainable.com>
+ * @author     Chuck Hagenbuch <chuck@horde.org>
+ * @category   Horde
+ * @license    http://opensource.org/licenses/bsd-license.php BSD
+ * @package    Log
  * @subpackage Handlers
- * @author   Mike Naberezny <mike@maintainable.com>
- * @author   Chuck Hagenbuch <chuck@horde.org>
- * @license  http://opensource.org/licenses/bsd-license.php BSD
  */
 abstract class Horde_Log_Handler_Base
 {
     /**
-     * @var array of key/value pair options
+     * Options.
+     *
+     * @var array
      */
     protected $_options = array();
 
     /**
-     * @var array of Horde_Log_Filter
+     * List of filter objects.
+     *
+     * @var array
      */
     protected $_filters = array();
 
     /**
      * Add a filter specific to this handler.
      *
-     * @param  Horde_Log_Filter $filter
-     * @return void
+     * @param Horde_Log_Filter $filter  Filter to add.
      */
     public function addFilter($filter)
     {
-        if (is_integer($filter)) {
-            $filter = new Horde_Log_Filter_Level($filter);
-        }
-
-        $this->_filters[] = $filter;
+        $this->_filters[] = is_integer($filter)
+            ? new Horde_Log_Filter_Level($filter)
+            : $filter;
     }
 
     /**
      * Log a message to this handler.
      *
-     * @param  array    $event    Log event
-     * @return void
+     * @param array $event  Log event.
      */
     public function log($event)
     {
-        // if any local filter rejects the message, don't log it.
+        // If any local filter rejects the message, don't log it.
         foreach ($this->_filters as $filter) {
             if (!$filter->accept($event)) {
                 return;
@@ -70,14 +70,17 @@ abstract class Horde_Log_Handler_Base
     /**
      * Sets an option specific to the implementation of the log handler.
      *
-     * @param  $optionKey      Key name for the option to be changed.  Keys are handler-specific
-     * @param  $optionValue    New value to assign to the option
-     * @return bool            True
+     * @param string $optionKey   Key name for the option to be changed.  Keys
+     *                            are handler-specific.
+     * @param mixed $optionValue  New value to assign to the option
+     *
+     * @return boolean  True.
+     * @throws Horde_Log_Exception
      */
     public function setOption($optionKey, $optionValue)
     {
         if (!isset($this->_options[$optionKey])) {
-            throw new Horde_Log_Exception("Unknown option \"$optionKey\".");
+            throw new Horde_Log_Exception('Unknown option "' . $optionKey . '".');
         }
         $this->_options[$optionKey] = $optionValue;
 
@@ -85,10 +88,10 @@ abstract class Horde_Log_Handler_Base
     }
 
     /**
-     * Buffer a message to be stored in the storage
-     * implemented by this handler.
+     * Buffer a message to be stored in the storage.
      *
-     * @param  array    $event    Log event
+     * @param array $event  Log event.
      */
     abstract public function write($event);
+
 }
index 6c54533..c3cff3d 100644 (file)
@@ -6,61 +6,67 @@
  * (http://framework.zend.com).  Both that package and this
  * one were written by Mike Naberezny and Chuck Hagenbuch.
  *
- * @category Horde
- * @package  Horde_Log
+ * @author     Mike Naberezny <mike@maintainable.com>
+ * @author     Chuck Hagenbuch <chuck@horde.org>
+ * @category   Horde
+ * @license    http://opensource.org/licenses/bsd-license.php BSD
+ * @package    Log
  * @subpackage Handlers
- * @author   Mike Naberezny <mike@maintainable.com>
- * @author   Chuck Hagenbuch <chuck@horde.org>
- * @license  http://opensource.org/licenses/bsd-license.php BSD
  */
 
 /**
- * @category Horde
- * @package  Horde_Log
+ * @author     Mike Naberezny <mike@maintainable.com>
+ * @author     Chuck Hagenbuch <chuck@horde.org>
+ * @category   Horde
+ * @license    http://opensource.org/licenses/bsd-license.php BSD
+ * @package    Log
  * @subpackage Handlers
- * @author   Mike Naberezny <mike@maintainable.com>
- * @author   Chuck Hagenbuch <chuck@horde.org>
- * @license  http://opensource.org/licenses/bsd-license.php BSD
  */
 class Horde_Log_Handler_Db extends Horde_Log_Handler_Base
 {
     /**
-     * Database adapter instance
+     * Database adapter instance.
+     *
      * @var Horde_Db_Adapter
      */
     private $_db;
 
     /**
-     * Name of the log table in the database
+     * Name of the log table in the database.
+     *
      * @var string
      */
     private $_table;
 
     /**
-     * Options to be set by setOption().  Sets the field names in the database table.
+     * Options to be set by setOption().
+     * Sets the field names in the database table.
      *
      * @var array
      */
-    protected $_options = array('fieldMessage'  => 'message',
-                                'fieldLevel'    => 'level');
+    protected $_options = array(
+        'fieldMessage' => 'message',
+        'fieldLevel' => 'level'
+    );
 
     /**
-     * Class constructor
+     * Constructor.
      *
-     * @param Horde_Db_Adapter $db  Database adapter instance
-     * @param string $table         Log table in database
+     * @param Horde_Db_Adapter $db  Database adapter instance.
+     * @param string $table         Log table in database.
      */
     public function __construct($db, $table)
     {
-        $this->_db    = $db;
+        $this->_db = $db;
         $this->_table = $table;
     }
 
     /**
      * Write a message to the log.
      *
-     * @param  array    $event    Log event
-     * @return bool               Always True
+     * @param array $event  Log event.
+     *
+     * @return bool  True.
      */
     public function write($event)
     {
@@ -70,6 +76,7 @@ class Horde_Log_Handler_Db extends Horde_Log_Handler_Base
         );
 
         $this->_db->insert($this->_table, $fields);
+
         return true;
     }
 
index 67be282..f9e9761 100644 (file)
@@ -2,47 +2,51 @@
 /**
  * Horde Log package
  *
- * @category Horde
- * @package  Horde_Log
+ * @author     Mike Naberezny <mike@maintainable.com>
+ * @author     Chuck Hagenbuch <chuck@horde.org>
+ * @category   Horde
+ * @license    http://opensource.org/licenses/bsd-license.php BSD
+ * @package    Log
  * @subpackage Handlers
- * @author   Mike Naberezny <mike@maintainable.com>
- * @author   Chuck Hagenbuch <chuck@horde.org>
- * @license  http://opensource.org/licenses/bsd-license.php BSD
  */
 
 /**
- * @category Horde
- * @package  Horde_Log
+ * @author     Mike Naberezny <mike@maintainable.com>
+ * @author     Chuck Hagenbuch <chuck@horde.org>
+ * @category   Horde
+ * @license    http://opensource.org/licenses/bsd-license.php BSD
+ * @package    Log
  * @subpackage Handlers
- * @author   Mike Naberezny <mike@maintainable.com>
- * @author   Chuck Hagenbuch <chuck@horde.org>
- * @license  http://opensource.org/licenses/bsd-license.php BSD
  */
 class Horde_Log_Handler_Firebug extends Horde_Log_Handler_Base
 {
     /**
      * Formats the log message before writing.
+     *
      * @var Horde_Log_Formatter
      */
     protected $_formatter;
 
     /**
-     * Options to be set by setOption().  Sets the field names in the database table.
+     * Options to be set by setOption().
      *
      * @var array
      */
-    protected $_options = array('buffering' => false);
+    protected $_options = array(
+        'buffering' => false
+    );
 
     /**
      * Array of buffered output.
+     *
      * @var string
      */
     protected $_buffer = array();
 
     /**
      * Mapping of log priorities to Firebug methods.
+     *
      * @var array
-     * @access private
      */
     protected static $_methods = array(
         Horde_Log::EMERG   => 'error',
@@ -58,25 +62,25 @@ class Horde_Log_Handler_Firebug extends Horde_Log_Handler_Base
     /**
      * Class Constructor
      *
-     * @param Horde_Log_Formatter $formatter  Log formatter
+     * @param Horde_Log_Formatter $formatter  Log formatter.
      */
     public function __construct(Horde_Log_Formatter $formatter = null)
     {
-        if (is_null($formatter)) {
-            $formatter = new Horde_Log_Formatter_Simple();
-        }
-        $this->_formatter = $formatter;
+        $this->_formatter = is_null($formatter)
+            ? new Horde_Log_Formatter_Simple()
+            : $formatter;
     }
 
     /**
-     * Write a message to the firebug console.  This function really just writes
-     * the message to the buffer.  If buffering is enabled, the
+     * Write a message to the firebug console.  This function really just
+     * writes the message to the buffer.  If buffering is enabled, the
      * message won't be output until the buffer is flushed. If
      * buffering is not enabled, the buffer will be flushed
      * immediately.
      *
-     * @param  array    $event    Log event
-     * @return bool               Always True
+     * @param array $event  Log event.
+     *
+     * @return boolean  True.
      */
     public function write($event)
     {
@@ -90,6 +94,7 @@ class Horde_Log_Handler_Firebug extends Horde_Log_Handler_Base
     }
 
     /**
+     * Flush the buffer.
      */
     public function flush()
     {
@@ -101,17 +106,19 @@ class Horde_Log_Handler_Firebug extends Horde_Log_Handler_Base
         foreach ($this->_buffer as $event) {
             $line = trim($this->_formatter->format($event));
 
-            // normalize line breaks
+            // Normalize line breaks.
             $line = str_replace("\r\n", "\n", $line);
 
-            // escape line breaks
+            // Escape line breaks
             $line = str_replace("\n", "\\n\\\n", $line);
 
-            // escape quotes
+            // Escape quotes.
             $line = str_replace('"', '\\"', $line);
 
-            // firebug call
-            $method = isset(self::$_methods[$event['level']]) ? self::$_methods[$event['level']] : 'log';
+            // Firebug call.
+            $method = isset(self::$_methods[$event['level']])
+                ? self::$_methods[$event['level']]
+                : 'log';
             $output[] = 'console.' . $method . '("' . $line . '");';
         }
 
index eb83512..f98d243 100644 (file)
@@ -6,39 +6,42 @@
  * (http://framework.zend.com).  Both that package and this
  * one were written by Mike Naberezny and Chuck Hagenbuch.
  *
- * @category Horde
- * @package  Horde_Log
+ * @author     Mike Naberezny <mike@maintainable.com>
+ * @author     Chuck Hagenbuch <chuck@horde.org>
+ * @category   Horde
+ * @license    http://opensource.org/licenses/bsd-license.php BSD
+ * @package    Log
  * @subpackage Handlers
- * @author   Mike Naberezny <mike@maintainable.com>
- * @author   Chuck Hagenbuch <chuck@horde.org>
- * @license  http://opensource.org/licenses/bsd-license.php BSD
  */
 
 /**
- * @category Horde
- * @package  Horde_Log
+ * @author     Mike Naberezny <mike@maintainable.com>
+ * @author     Chuck Hagenbuch <chuck@horde.org>
+ * @category   Horde
+ * @license    http://opensource.org/licenses/bsd-license.php BSD
+ * @package    Log
  * @subpackage Handlers
- * @author   Mike Naberezny <mike@maintainable.com>
- * @author   Chuck Hagenbuch <chuck@horde.org>
- * @license  http://opensource.org/licenses/bsd-license.php BSD
  */
 class Horde_Log_Handler_Mock extends Horde_Log_Handler_Base
 {
     /**
-     * array of log events
+     * Log events.
+     *
+     * @var array
      */
     public $events = array();
 
     /**
-     * shutdown called?
+     * Was shutdown called?
+     *
+     * @var boolean
      */
     public $shutdown = false;
 
     /**
      * Write a message to the log.
      *
-     * @param  array  $event  event data
-     * @return void
+     * @param array $event  Event data.
      */
     public function write($event)
     {
@@ -47,8 +50,6 @@ class Horde_Log_Handler_Mock extends Horde_Log_Handler_Base
 
     /**
      * Record shutdown
-     *
-     * @return void
      */
     public function shutdown()
     {
index 0e0bbc5..657800c 100644 (file)
@@ -6,30 +6,32 @@
  * (http://framework.zend.com).  Both that package and this
  * one were written by Mike Naberezny and Chuck Hagenbuch.
  *
- * @category Horde
- * @package  Horde_Log
+ * @author     Mike Naberezny <mike@maintainable.com>
+ * @author     Chuck Hagenbuch <chuck@horde.org>
+ * @category   Horde
+ * @license    http://opensource.org/licenses/bsd-license.php BSD
+ * @package    Log
  * @subpackage Handlers
- * @author   Mike Naberezny <mike@maintainable.com>
- * @author   Chuck Hagenbuch <chuck@horde.org>
- * @license  http://opensource.org/licenses/bsd-license.php BSD
  */
 
 /**
- * @category Horde
- * @package  Horde_Log
+ * @author     Mike Naberezny <mike@maintainable.com>
+ * @author     Chuck Hagenbuch <chuck@horde.org>
+ * @category   Horde
+ * @license    http://opensource.org/licenses/bsd-license.php BSD
+ * @package    Log
  * @subpackage Handlers
- * @author   Mike Naberezny <mike@maintainable.com>
- * @author   Chuck Hagenbuch <chuck@horde.org>
- * @license  http://opensource.org/licenses/bsd-license.php BSD
  */
 class Horde_Log_Handler_Null extends Horde_Log_Handler_Base
 {
     /**
-     * Write a message to the log buffer
+     * Write a message to the log buffer.
+     *
+     * @return boolean  True.
      */
     public function write($event)
     {
         return true;
     }
 
-}
\ No newline at end of file
+}
index a6602c4..8638f94 100644 (file)
@@ -2,71 +2,75 @@
 /**
  * Horde Log package
  *
- * @category   Horde
- * @package    Horde_Log
- * @subpackage Handlers
  * @author     Mike Naberezny <mike@maintainable.com>
  * @author     Chuck Hagenbuch <chuck@horde.org>
+ * @category   Horde
  * @license    http://opensource.org/licenses/bsd-license.php BSD
+ * @package    Log
+ * @subpackage Handlers
  */
 
 /**
- * @category   Horde
- * @package    Horde_Log
- * @subpackage Handlers
  * @author     Mike Naberezny <mike@maintainable.com>
  * @author     Chuck Hagenbuch <chuck@horde.org>
+ * @category   Horde
  * @license    http://opensource.org/licenses/bsd-license.php BSD
+ * @package    Log
+ * @subpackage Handlers
  */
 class Horde_Log_Handler_Scribe extends Horde_Log_Handler_Base
 {
     /**
-     * Scribe client
+     * Scribe client.
+     *
      * @var Horde_Scribe_Client
      */
     protected $_scribe;
 
     /**
      * Formats the log message before writing.
+     *
      * @var Horde_Log_Formatter
      */
     protected $_formatter;
 
     /**
      * Options to be set by setOption().
+     *
      * @var array
      */
     protected $_options = array(
-        'category'   => 'default',
         'addNewline' => false,
+        'category'   => 'default'
     );
 
     /**
-     * Class Constructor
+     * Constructor.
      *
-     * @param Horde_Scribe_Client  $scribe     Scribe client
-     * @param Horde_Log_Formatter  $formatter  Log formatter
+     * @param Horde_Scribe_Client $scribe     Scribe client.
+     * @param Horde_Log_Formatter $formatter  Log formatter.
      */
     public function __construct(Horde_Scribe_Client $scribe,
                                 Horde_Log_Formatter $formatter = null)
     {
-        if (is_null($formatter)) {
-            $formatter = new Horde_Log_Formatter_Simple();
-        }
-
+        $this->_formatter = is_null($formatter)
+            ? new Horde_Log_Formatter_Simple()
+            : $formatter;
         $this->_scribe = $scribe;
-        $this->_formatter = $formatter;
     }
 
     /**
      * Write a message to the log.
      *
-     * @param  array    $event    Log event
-     * @return bool               Always True
+     * @param array $event  Log event.
+     *
+     * @return boolean  True.
      */
     public function write($event)
     {
-        $category = isset($event['category']) ? $event['category'] : $this->_options['category'];
+        $category = isset($event['category'])
+            ? $event['category']
+            : $this->_options['category'];
 
         $message = $this->_formatter->format($event);
         if (!$this->_options['addNewline']) {
@@ -77,4 +81,5 @@ class Horde_Log_Handler_Scribe extends Horde_Log_Handler_Base
 
         return true;
     }
+
 }
index 54fc2a1..82b2b37 100644 (file)
@@ -6,32 +6,34 @@
  * (http://framework.zend.com).  Both that package and this
  * one were written by Mike Naberezny and Chuck Hagenbuch.
  *
- * @category Horde
- * @package  Horde_Log
+ * @author     Mike Naberezny <mike@maintainable.com>
+ * @author     Chuck Hagenbuch <chuck@horde.org>
+ * @category   Horde
+ * @license    http://opensource.org/licenses/bsd-license.php BSD
+ * @package    Log
  * @subpackage Handlers
- * @author   Mike Naberezny <mike@maintainable.com>
- * @author   Chuck Hagenbuch <chuck@horde.org>
- * @license  http://opensource.org/licenses/bsd-license.php BSD
  */
 
 /**
- * @category Horde
- * @package  Horde_Log
+ * @author     Mike Naberezny <mike@maintainable.com>
+ * @author     Chuck Hagenbuch <chuck@horde.org>
+ * @category   Horde
+ * @license    http://opensource.org/licenses/bsd-license.php BSD
+ * @package    Log
  * @subpackage Handlers
- * @author   Mike Naberezny <mike@maintainable.com>
- * @author   Chuck Hagenbuch <chuck@horde.org>
- * @license  http://opensource.org/licenses/bsd-license.php BSD
  */
 class Horde_Log_Handler_Stream extends Horde_Log_Handler_Base
 {
     /**
      * Formats the log message before writing.
+     *
      * @var Horde_Log_Formatter
      */
     protected $_formatter;
 
     /**
      * Holds the PHP stream to log to.
+     *
      * @var null|stream
      */
     protected $_stream = null;
@@ -53,18 +55,20 @@ class Horde_Log_Handler_Stream extends Horde_Log_Handler_Base
     /**
      * Class Constructor
      *
-     * @param mixed $streamOrUrl              Stream or URL to open as a stream.
-     * @param string $mode                    Mode, only applicable if a URL is given.
+     * @param mixed $streamOrUrl              Stream or URL to open as a
+     *                                        stream.
+     * @param string $mode                    Mode, only applicable if a URL
+     *                                        is given.
      * @param Horde_Log_Formatter $formatter  Log formatter.
+     *
+     * @throws Horde_Log_Exception
      */
     public function __construct($streamOrUrl, $mode = 'a+',
                                 Horde_Log_Formatter $formatter = null)
     {
-        if (is_null($formatter)) {
-            $formatter = new Horde_Log_Formatter_Simple();
-        }
-
-        $this->_formatter = $formatter;
+        $this->_formatter = is_null($formatter)
+            ? new Horde_Log_Formatter_Simple()
+            : $formatter;
         $this->_mode = $mode;
         $this->_streamOrUrl = $streamOrUrl;
 
@@ -85,6 +89,8 @@ class Horde_Log_Handler_Stream extends Horde_Log_Handler_Base
 
     /**
      * Wakup function - reattaches stream.
+     *
+     * @throws Horde_Log_Exception
      */
     public function __wakeup()
     {
@@ -97,8 +103,10 @@ class Horde_Log_Handler_Stream extends Horde_Log_Handler_Base
     /**
      * Write a message to the log.
      *
-     * @param  array    $event    Log event
-     * @return bool               Always True
+     * @param array $event  Log event.
+     *
+     * @return boolean  True.
+     * @throws Horde_Log_Exception
      */
     public function write($event)
     {
index d216451..9aea28f 100644 (file)
@@ -2,49 +2,54 @@
 /**
  * Horde Log package
  *
- * @category   Horde
- * @package    Horde_Log
- * @subpackage Handlers
  * @author     Mike Naberezny <mike@maintainable.com>
  * @author     Chuck Hagenbuch <chuck@horde.org>
+ * @category   Horde
  * @license    http://opensource.org/licenses/bsd-license.php BSD
+ * @package    Log
+ * @subpackage Handlers
  */
 
 /**
- * @category   Horde
- * @package    Horde_Log
- * @subpackage Handlers
  * @author     Mike Naberezny <mike@maintainable.com>
  * @author     Chuck Hagenbuch <chuck@horde.org>
+ * @category   Horde
  * @license    http://opensource.org/licenses/bsd-license.php BSD
+ * @package    Log
+ * @subpackage Handlers
  */
 class Horde_Log_Handler_Syslog extends Horde_Log_Handler_Base
 {
     /**
-     * Options to be set by setOption().  Sets openlog and syslog options.
+     * Options to be set by setOption().
+     * Sets openlog and syslog options.
+     *
      * @var array
      */
     protected $_options = array(
-        'ident'            => false,
-        'facility'         => LOG_USER,
-        'openlogOptions'   => false,
         'defaultPriority'  => LOG_ERR,
+        'facility'         => LOG_USER,
+        'ident'            => false,
+        'openlogOptions'   => false
     );
 
     /**
-     * Last ident set by a syslog-handler instance
+     * Last ident set by a syslog-handler instance.
+     *
      * @var string
      */
     protected static $_lastIdent;
 
     /**
-     * Last facility name set by a syslog-handler instance
+     * Last facility name set by a syslog-handler instance.
+     *
      * @var string
      */
     protected static $_lastFacility;
 
     /**
-     * Map of log levels to syslog priorities
+     * Map of log levels to syslog priorities.
+     *
      * @var array
      */
     protected $_priorities = array(
@@ -61,18 +66,20 @@ class Horde_Log_Handler_Syslog extends Horde_Log_Handler_Base
     /**
      * Write a message to the log.
      *
-     * @param  array    $event    Log event
-     * @return bool               Always True
+     * @param array $event  Log event.
+     *
+     * @return boolean  True.
+     * @throws Horde_Log_Exception
      */
     public function write($event)
     {
-        if ($this->_options['ident'] !== self::$_lastIdent ||
-            $this->_options['facility'] !== self::$_lastFacility) {
+        if (($this->_options['ident'] !== $this->_lastIdent) ||
+            ($this->_options['facility'] !== $this->_lastFacility)) {
             $this->_initializeSyslog();
         }
 
         $priority = $this->_toSyslog($event['level']);
-        if (! syslog($priority, $event['message'])) {
+        if (!syslog($priority, $event['message'])) {
             throw new Horde_Log_Exception('Unable to log message');
         }
 
@@ -82,30 +89,33 @@ class Horde_Log_Handler_Syslog extends Horde_Log_Handler_Base
     /**
      * Translate a log level to a syslog LOG_* priority.
      *
-     * @param integer $level
+     * @param integer $level  Log level.
      *
-     * @return integer A LOG_* constant
+     * @return integer  A LOG_* constant.
      */
     protected function _toSyslog($level)
     {
         if (isset($this->_priorities[$level])) {
             return $this->_priorities[$level];
         }
+
         return $this->_options['defaultPriority'];
     }
 
     /**
-     * Initialize syslog / set ident and facility
+     * Initialize syslog / set ident and facility.
      *
-     * @param  string  $ident         ident
-     * @param  string  $facility      syslog facility
-     * @return void
+     * @param string $ident     Ident.
+     * @param string $facility  Syslog facility.
+     *
+     * @throws Horde_Log_Exception
      */
     protected function _initializeSyslog()
     {
-        self::$_lastIdent = $this->_options['ident'];
-        self::$_lastFacility = $this->_options['facility'];
-        if (! openlog($this->_options['ident'], $this->_options['openlogOptions'], $this->_options['facility'])) {
+        $this->_lastIdent = $this->_options['ident'];
+        $_this->lastFacility = $this->_options['facility'];
+
+        if (!openlog($this->_options['ident'], $this->_options['openlogOptions'], $this->_options['facility'])) {
             throw new Horde_Log_Exception('Unable to open syslog');
         }
     }
index 15a56bd..dd27d16 100644 (file)
@@ -6,19 +6,19 @@
  * (http://framework.zend.com).  Both that package and this
  * one were written by Mike Naberezny and Chuck Hagenbuch.
  *
- * @category Horde
- * @package  Horde_Log
  * @author   Mike Naberezny <mike@maintainable.com>
  * @author   Chuck Hagenbuch <chuck@horde.org>
+ * @category Horde
  * @license  http://opensource.org/licenses/bsd-license.php BSD
+ * @package  Log
  */
 
 /**
- * @category Horde
- * @package  Horde_Log
  * @author   Mike Naberezny <mike@maintainable.com>
  * @author   Chuck Hagenbuch <chuck@horde.org>
+ * @category Horde
  * @license  http://opensource.org/licenses/bsd-license.php BSD
+ * @package  Log
  *
  * @method void LOGLEVEL() LOGLEVEL($event) Log an event at LOGLEVEL, where LOGLEVEL has been added with addLevel() or already exists
  * @method void emerg() emerg($event) Log an event at the EMERG log level
 class Horde_Log_Logger
 {
     /**
-     * @var array of log levels where the keys are the
-     * level priorities and the values are the level names
+     * Log levels where the keys are the level priorities and the values are
+     * the level names.
+     *
+     * @var array
      */
     private $_levels = array();
 
     /**
-     * @var array of Horde_Log_Handler_Base objects
+     * Horde_Log_Handler_Base objects.
+     *
+     * @var array
      */
     private $_handlers = array();
 
     /**
-     * @var array of Horde_Log_Filter objects
+     * Horde_Log_Filter objects.
+     *
+     * @var array
      */
     private $_filters = array();
 
     /**
-     * Class constructor.  Create a new logger
+     * Constructor.
      *
-     * @param Horde_Log_Handler_Base|null  $handler  default handler
+     * @param Horde_Log_Handler_Base|null $handler  Default handler.
      */
     public function __construct($handler = null)
     {
         $r = new ReflectionClass('Horde_Log');
         $this->_levels = array_flip($r->getConstants());
 
-        if ($handler !== null) {
+        if (!is_null($handler)) {
             $this->addHandler($handler);
         }
     }
 
     /**
      * Undefined method handler allows a shortcut:
-     *   $log->levelName('message')
-     *     instead of
-     *   $log->log('message', Horde_Log_LEVELNAME)
+     * <pre>
+     * $log->levelName('message');
+     *   instead of
+     * $log->log('message', Horde_Log_LEVELNAME);
+     * </pre>
      *
-     * @param  string  $method  log level name
-     * @param  string  $params  message to log
-     * @return void
+     * @param string $method  Log level name.
+     * @param string $params  Message to log.
      */
     public function __call($method, $params)
     {
@@ -86,9 +93,9 @@ class Horde_Log_Logger
     /**
      * Log a message at a level
      *
-     * @param  mixed    $event  Message to log, either an array or a string
-     * @param  integer  $level  Log level of message, required if $message is a string
-     * @return void
+     * @param mixed $event    Message to log, either an array or a string.
+     * @param integer $level  Log level of message, required if $message is a
+     *                        string.
      */
     public function log($event, $level = null)
     {
@@ -104,11 +111,10 @@ class Horde_Log_Logger
                 throw new Horde_Log_Exception('Event array did not contain a message');
             }
             if (!isset($event['level'])) {
-                if ($level === null) {
+                if (is_null($level)) {
                     throw new Horde_Log_Exception('Event array did not contain a log level');
-                } else {
-                    $event['level'] = $level;
                 }
+                $event['level'] = $level;
             }
         } else {
             // Create an event array from the message and level
@@ -120,7 +126,8 @@ class Horde_Log_Logger
             throw new Horde_Log_Exception('Bad log level: ' . $event['level']);
         }
 
-        // Fill in the level name and timestamp for filters, formatters, handlers
+        // Fill in the level name and timestamp for filters, formatters,
+        // handlers.
         $event['levelName'] = $this->_levels[$event['level']];
 
         if (!isset($event['timestamp'])) {
@@ -142,8 +149,10 @@ class Horde_Log_Logger
     /**
      * Does this logger have the level $name already?
      *
-     * @param string   $name   The level name to check for
-     * @return boolean Whether the logger already has the specific level name
+     * @param string $name  The level name to check for.
+     *
+     * @return boolean  Whether the logger already has the specific level
+     *                  name.
      */
     public function hasLevel($name)
     {
@@ -153,9 +162,8 @@ class Horde_Log_Logger
     /**
      * Add a custom log level
      *
-     * @param  string  $name    Name of level
-     * @param  integer  $level  Numeric level
-     * @return void
+     * @param string $name    Name of level.
+     * @param integer $level  Numeric level.
      */
     public function addLevel($name, $level)
     {
@@ -174,24 +182,20 @@ class Horde_Log_Logger
      * Before a message will be received by any of the handlers, it
      * must be accepted by all filters added with this method.
      *
-     * @param  Horde_Log_Filter  $filter
-     * @return void
+     * @param Horde_Log_Filter $filter  Filter to add.
      */
     public function addFilter($filter)
     {
-        if (is_integer($filter)) {
-            $filter = new Horde_Log_Filter_Level($filter);
-        }
-
-        $this->_filters[] = $filter;
+        $this->_filters[] = is_integer($filter)
+            ? new Horde_Log_Filter_Level($filter)
+            : $filter;
     }
 
     /**
      * Add a handler.  A handler is responsible for taking a log
      * message and writing it out to storage.
      *
-     * @param  Horde_Log_Handler_Base $handler
-     * @return void
+     * @param Horde_Log_Handler_Base $handler  Handler to add.
      */
     public function addHandler($handler)
     {
index 86aeb24..11b53c3 100644 (file)
@@ -6,12 +6,12 @@
  * (http://framework.zend.com).  Both that package and this
  * one were written by Mike Naberezny and Chuck Hagenbuch.
  *
- * @category Horde
- * @package  Horde_Log
+ * @author     Mike Naberezny <mike@maintainable.com>
+ * @author     Chuck Hagenbuch <chuck@horde.org>
+ * @category   Horde
+ * @license    http://opensource.org/licenses/bsd-license.php BSD
+ * @package    Log
  * @subpackage UnitTests
- * @author   Mike Naberezny <mike@maintainable.com>
- * @author   Chuck Hagenbuch <chuck@horde.org>
- * @license  http://opensource.org/licenses/bsd-license.php BSD
  */
 
 /**
@@ -27,7 +27,8 @@ if (!defined('PHPUnit_MAIN_METHOD')) {
 require_once 'Horde/Test/AllTests.php';
 
 /**
- * @package    Horde_Log
+ * @category   Horde
+ * @package    Log
  * @subpackage UnitTests
  */
 class Horde_Log_AllTests extends Horde_Test_AllTests
index 4927fde..1758040 100644 (file)
@@ -6,21 +6,21 @@
  * (http://framework.zend.com).  Both that package and this
  * one were written by Mike Naberezny and Chuck Hagenbuch.
  *
- * @category Horde
- * @package  Horde_Log
+ * @author     Mike Naberezny <mike@maintainable.com>
+ * @author     Chuck Hagenbuch <chuck@horde.org>
+ * @category   Horde
+ * @license    http://opensource.org/licenses/bsd-license.php BSD
+ * @package    Log
  * @subpackage UnitTests
- * @author   Mike Naberezny <mike@maintainable.com>
- * @author   Chuck Hagenbuch <chuck@horde.org>
- * @license  http://opensource.org/licenses/bsd-license.php BSD
  */
 
 /**
- * @category Horde
- * @package  Horde_Log
+ * @author     Mike Naberezny <mike@maintainable.com>
+ * @author     Chuck Hagenbuch <chuck@horde.org>
+ * @category   Horde
+ * @license    http://opensource.org/licenses/bsd-license.php BSD
+ * @package    Log
  * @subpackage UnitTests
- * @author   Mike Naberezny <mike@maintainable.com>
- * @author   Chuck Hagenbuch <chuck@horde.org>
- * @license  http://opensource.org/licenses/bsd-license.php BSD
  */
 class Horde_Log_Filter_ChainingTest extends PHPUnit_Framework_TestCase
 {
index 0e51483..ea0d7d9 100644 (file)
@@ -2,19 +2,19 @@
 /**
  * Horde Log package
  *
- * @category Horde
- * @package  Horde_Log
+ * @author     James Pepin <james@jamespepin.com>
+ * @category   Horde
+ * @license    http://opensource.org/licenses/bsd-license.php BSD
+ * @package    Log
  * @subpackage UnitTests
- * @author   James Pepin <james@jamespepin.com>
- * @license  http://opensource.org/licenses/bsd-license.php BSD
  */
 
 /**
- * @category Horde
- * @package  Horde_Log
+ * @author     James Pepin <james@jamespepin.com>
+ * @category   Horde
+ * @license    http://opensource.org/licenses/bsd-license.php BSD
+ * @package    Log
  * @subpackage UnitTests
- * @author   James Pepin <james@jamespepin.com>
- * @license  http://opensource.org/licenses/bsd-license.php BSD
  */
 class Horde_Log_Filter_ConstraintTest extends Horde_Test_Case
 {
index 76bca92..e0aeac1 100644 (file)
@@ -6,21 +6,21 @@
  * (http://framework.zend.com).  Both that package and this
  * one were written by Mike Naberezny and Chuck Hagenbuch.
  *
- * @category Horde
- * @package  Horde_Log
+ * @author     Mike Naberezny <mike@maintainable.com>
+ * @author     Chuck Hagenbuch <chuck@horde.org>
+ * @category   Horde
+ * @license    http://opensource.org/licenses/bsd-license.php BSD
+ * @package    Log
  * @subpackage UnitTests
- * @author   Mike Naberezny <mike@maintainable.com>
- * @author   Chuck Hagenbuch <chuck@horde.org>
- * @license  http://opensource.org/licenses/bsd-license.php BSD
  */
 
 /**
- * @category Horde
- * @package  Horde_Log
+ * @author     Mike Naberezny <mike@maintainable.com>
+ * @author     Chuck Hagenbuch <chuck@horde.org>
+ * @category   Horde
+ * @license    http://opensource.org/licenses/bsd-license.php BSD
+ * @package    Log
  * @subpackage UnitTests
- * @author   Mike Naberezny <mike@maintainable.com>
- * @author   Chuck Hagenbuch <chuck@horde.org>
- * @license  http://opensource.org/licenses/bsd-license.php BSD
  */
 class Horde_Log_Filter_LevelTest extends PHPUnit_Framework_TestCase
 {
@@ -48,7 +48,7 @@ class Horde_Log_Filter_LevelTest extends PHPUnit_Framework_TestCase
             new Horde_Log_Filter_Level('foo');
             $this->fail();
         } catch (Exception $e) {
-            $this->assertType('Horde_Log_Exception', $e);
+            $this->assertType('InvalidArgumentException', $e);
             $this->assertRegExp('/must be an integer/i', $e->getMessage());
         }
     }
index c2aa1d2..7eb76e1 100644 (file)
@@ -6,21 +6,21 @@
  * (http://framework.zend.com).  Both that package and this
  * one were written by Mike Naberezny and Chuck Hagenbuch.
  *
- * @category Horde
- * @package  Horde_Log
+ * @author     Mike Naberezny <mike@maintainable.com>
+ * @author     Chuck Hagenbuch <chuck@horde.org>
+ * @category   Horde
+ * @license    http://opensource.org/licenses/bsd-license.php BSD
+ * @package    Log
  * @subpackage UnitTests
- * @author   Mike Naberezny <mike@maintainable.com>
- * @author   Chuck Hagenbuch <chuck@horde.org>
- * @license  http://opensource.org/licenses/bsd-license.php BSD
  */
 
 /**
- * @category Horde
- * @package  Horde_Log
+ * @author     Mike Naberezny <mike@maintainable.com>
+ * @author     Chuck Hagenbuch <chuck@horde.org>
+ * @category   Horde
+ * @license    http://opensource.org/licenses/bsd-license.php BSD
+ * @package    Log
  * @subpackage UnitTests
- * @author   Mike Naberezny <mike@maintainable.com>
- * @author   Chuck Hagenbuch <chuck@horde.org>
- * @license  http://opensource.org/licenses/bsd-license.php BSD
  */
 class Horde_Log_Filter_MessageTest extends PHPUnit_Framework_TestCase
 {
@@ -30,7 +30,7 @@ class Horde_Log_Filter_MessageTest extends PHPUnit_Framework_TestCase
         try {
             $filter = new Horde_Log_Filter_Message('invalid regexp');
             $this->fail();
-        } catch (Horde_Log_Exception $e) {
+        } catch (InvalidArgumentException $e) {
             $this->assertRegexp('/invalid reg/i', $e->getMessage());
         }
     }
index a6b4fb4..9dca482 100644 (file)
@@ -6,29 +6,29 @@
  * (http://framework.zend.com).  Both that package and this
  * one were written by Mike Naberezny and Chuck Hagenbuch.
  *
- * @category Horde
- * @package  Horde_Log
+ * @author     Mike Naberezny <mike@maintainable.com>
+ * @author     Chuck Hagenbuch <chuck@horde.org>
+ * @category   Horde
+ * @license    http://opensource.org/licenses/bsd-license.php BSD
+ * @package    Log
  * @subpackage UnitTests
- * @author   Mike Naberezny <mike@maintainable.com>
- * @author   Chuck Hagenbuch <chuck@horde.org>
- * @license  http://opensource.org/licenses/bsd-license.php BSD
- */   
+ */
 
 /**
- * @category Horde
- * @package  Horde_Log
+ * @author     Mike Naberezny <mike@maintainable.com>
+ * @author     Chuck Hagenbuch <chuck@horde.org>
+ * @category   Horde
+ * @license    http://opensource.org/licenses/bsd-license.php BSD
+ * @package    Log
  * @subpackage UnitTests
- * @author   Mike Naberezny <mike@maintainable.com>
- * @author   Chuck Hagenbuch <chuck@horde.org>
- * @license  http://opensource.org/licenses/bsd-license.php BSD
- */ 
-class Horde_Log_Filter_SuppressTest extends PHPUnit_Framework_TestCase 
+ */
+class Horde_Log_Filter_SuppressTest extends PHPUnit_Framework_TestCase
 {
     public function setUp()
     {
         $this->filter = new Horde_Log_Filter_Suppress();
     }
-    
+
     public function testSuppressIsInitiallyOff()
     {
         $this->assertTrue($this->filter->accept(array()));
@@ -47,7 +47,7 @@ class Horde_Log_Filter_SuppressTest extends PHPUnit_Framework_TestCase
         $this->assertTrue($this->filter->accept(array()));
         $this->assertTrue($this->filter->accept(array()));
     }
-    
+
     public function testSuppressCanBeReset()
     {
         $this->filter->suppress(true);
index 3926cf4..d18c2ab 100644 (file)
@@ -6,21 +6,21 @@
  * (http://framework.zend.com).  Both that package and this
  * one were written by Mike Naberezny and Chuck Hagenbuch.
  *
- * @category Horde
- * @package  Horde_Log
+ * @author     Mike Naberezny <mike@maintainable.com>
+ * @author     Chuck Hagenbuch <chuck@horde.org>
+ * @category   Horde
+ * @license    http://opensource.org/licenses/bsd-license.php BSD
+ * @package    Log
  * @subpackage UnitTests
- * @author   Mike Naberezny <mike@maintainable.com>
- * @author   Chuck Hagenbuch <chuck@horde.org>
- * @license  http://opensource.org/licenses/bsd-license.php BSD
  */
 
 /**
- * @category Horde
- * @package  Horde_Log
+ * @author     Mike Naberezny <mike@maintainable.com>
+ * @author     Chuck Hagenbuch <chuck@horde.org>
+ * @category   Horde
+ * @license    http://opensource.org/licenses/bsd-license.php BSD
+ * @package    Log
  * @subpackage UnitTests
- * @author   Mike Naberezny <mike@maintainable.com>
- * @author   Chuck Hagenbuch <chuck@horde.org>
- * @license  http://opensource.org/licenses/bsd-license.php BSD
  */
 class Horde_Log_Formatter_SimpleTest extends PHPUnit_Framework_TestCase
 {
@@ -30,7 +30,7 @@ class Horde_Log_Formatter_SimpleTest extends PHPUnit_Framework_TestCase
             new Horde_Log_Formatter_Simple(1);
             $this->fail();
         } catch (Exception $e) {
-            $this->assertType('Horde_Log_Exception', $e);
+            $this->assertType('InvalidArgumentException', $e);
             $this->assertRegExp('/must be a string/i', $e->getMessage());
         }
     }
index 266b383..2484369 100644 (file)
@@ -6,19 +6,19 @@
  * (http://framework.zend.com).  Both that package and this
  * one were written by Mike Naberezny and Chuck Hagenbuch.
  *
- * @category Horde
- * @package  Horde_Log
  * @author   Mike Naberezny <mike@maintainable.com>
  * @author   Chuck Hagenbuch <chuck@horde.org>
+ * @category Horde
  * @license  http://opensource.org/licenses/bsd-license.php BSD
+ * @package  Log
  */
 
 /**
- * @category Horde
- * @package  Horde_Log
  * @author   Mike Naberezny <mike@maintainable.com>
  * @author   Chuck Hagenbuch <chuck@horde.org>
+ * @category Horde
  * @license  http://opensource.org/licenses/bsd-license.php BSD
+ * @package  Log
  */
 class Horde_Log_Formatter_XmlTest extends PHPUnit_Framework_TestCase
 {
index 282a004..61e7c2e 100644 (file)
@@ -6,21 +6,21 @@
  * (http://framework.zend.com).  Both that package and this
  * one were written by Mike Naberezny and Chuck Hagenbuch.
  *
- * @category Horde
- * @package  Horde_Log
+ * @author     Mike Naberezny <mike@maintainable.com>
+ * @author     Chuck Hagenbuch <chuck@horde.org>
+ * @category   Horde
+ * @license    http://opensource.org/licenses/bsd-license.php BSD
+ * @package    Log
  * @subpackage UnitTests
- * @author   Mike Naberezny <mike@maintainable.com>
- * @author   Chuck Hagenbuch <chuck@horde.org>
- * @license  http://opensource.org/licenses/bsd-license.php BSD
  */
 
 /**
- * @category Horde
- * @package  Horde_Log
+ * @author     Mike Naberezny <mike@maintainable.com>
+ * @author     Chuck Hagenbuch <chuck@horde.org>
+ * @category   Horde
+ * @license    http://opensource.org/licenses/bsd-license.php BSD
+ * @package    Log
  * @subpackage UnitTests
- * @author   Mike Naberezny <mike@maintainable.com>
- * @author   Chuck Hagenbuch <chuck@horde.org>
- * @license  http://opensource.org/licenses/bsd-license.php BSD
  */
 class Horde_Log_Handler_DbTest extends PHPUnit_Framework_TestCase
 {
@@ -81,4 +81,4 @@ class Horde_Log_Handler_DbTest_MockDbAdapter
     {
         $this->calls[$method][] = $params;
     }
-}
\ No newline at end of file
+}
index 7824ee3..ee6dc1c 100644 (file)
@@ -6,21 +6,21 @@
  * (http://framework.zend.com).  Both that package and this
  * one were written by Mike Naberezny and Chuck Hagenbuch.
  *
- * @category Horde
- * @package  Horde_Log
+ * @author     Mike Naberezny <mike@maintainable.com>
+ * @author     Chuck Hagenbuch <chuck@horde.org>
+ * @category   Horde
+ * @license    http://opensource.org/licenses/bsd-license.php BSD
+ * @package    Log
  * @subpackage UnitTests
- * @author   Mike Naberezny <mike@maintainable.com>
- * @author   Chuck Hagenbuch <chuck@horde.org>
- * @license  http://opensource.org/licenses/bsd-license.php BSD
  */
 
 /**
- * @category Horde
- * @package  Horde_Log
+ * @author     Mike Naberezny <mike@maintainable.com>
+ * @author     Chuck Hagenbuch <chuck@horde.org>
+ * @category   Horde
+ * @license    http://opensource.org/licenses/bsd-license.php BSD
+ * @package    Log
  * @subpackage UnitTests
- * @author   Mike Naberezny <mike@maintainable.com>
- * @author   Chuck Hagenbuch <chuck@horde.org>
- * @license  http://opensource.org/licenses/bsd-license.php BSD
  */
 class Horde_Log_Handler_FirebugTest extends PHPUnit_Framework_TestCase
 {
index 2fb7818..d5590eb 100644 (file)
@@ -6,21 +6,21 @@
  * (http://framework.zend.com).  Both that package and this
  * one were written by Mike Naberezny and Chuck Hagenbuch.
  *
- * @category Horde
- * @package  Horde_Log
+ * @author     Mike Naberezny <mike@maintainable.com>
+ * @author     Chuck Hagenbuch <chuck@horde.org>
+ * @category   Horde
+ * @license    http://opensource.org/licenses/bsd-license.php BSD
+ * @package    Log
  * @subpackage UnitTests
- * @author   Mike Naberezny <mike@maintainable.com>
- * @author   Chuck Hagenbuch <chuck@horde.org>
- * @license  http://opensource.org/licenses/bsd-license.php BSD
  */
 
 /**
- * @category Horde
- * @package  Horde_Log
+ * @author     Mike Naberezny <mike@maintainable.com>
+ * @author     Chuck Hagenbuch <chuck@horde.org>
+ * @category   Horde
+ * @license    http://opensource.org/licenses/bsd-license.php BSD
+ * @package    Log
  * @subpackage UnitTests
- * @author   Mike Naberezny <mike@maintainable.com>
- * @author   Chuck Hagenbuch <chuck@horde.org>
- * @license  http://opensource.org/licenses/bsd-license.php BSD
  */
 class Horde_Log_Handler_NullTest extends PHPUnit_Framework_TestCase
 {
index eeb56ea..c072d15 100644 (file)
@@ -6,21 +6,21 @@
  * (http://framework.zend.com).  Both that package and this
  * one were written by Mike Naberezny and Chuck Hagenbuch.
  *
- * @category Horde
- * @package  Horde_Log
+ * @author     Mike Naberezny <mike@maintainable.com>
+ * @author     Chuck Hagenbuch <chuck@horde.org>
+ * @category   Horde
+ * @license    http://opensource.org/licenses/bsd-license.php BSD
+ * @package    Log
  * @subpackage UnitTests
- * @author   Mike Naberezny <mike@maintainable.com>
- * @author   Chuck Hagenbuch <chuck@horde.org>
- * @license  http://opensource.org/licenses/bsd-license.php BSD
  */
 
 /**
- * @category Horde
- * @package  Horde_Log
+ * @author     Mike Naberezny <mike@maintainable.com>
+ * @author     Chuck Hagenbuch <chuck@horde.org>
+ * @category   Horde
+ * @license    http://opensource.org/licenses/bsd-license.php BSD
+ * @package    Log
  * @subpackage UnitTests
- * @author   Mike Naberezny <mike@maintainable.com>
- * @author   Chuck Hagenbuch <chuck@horde.org>
- * @license  http://opensource.org/licenses/bsd-license.php BSD
  */
 class Horde_Log_Handler_StreamTest extends PHPUnit_Framework_TestCase
 {
index 26a38d9..942fc5a 100644 (file)
@@ -6,21 +6,21 @@
  * (http://framework.zend.com).  Both that package and this
  * one were written by Mike Naberezny and Chuck Hagenbuch.
  *
- * @category Horde
- * @package  Horde_Log
+ * @author     Mike Naberezny <mike@maintainable.com>
+ * @author     Chuck Hagenbuch <chuck@horde.org>
+ * @category   Horde
+ * @license    http://opensource.org/licenses/bsd-license.php BSD
+ * @package    Log
  * @subpackage UnitTests
- * @author   Mike Naberezny <mike@maintainable.com>
- * @author   Chuck Hagenbuch <chuck@horde.org>
- * @license  http://opensource.org/licenses/bsd-license.php BSD
  */
 
 /**
- * @category Horde
- * @package  Horde_Log
+ * @author     Mike Naberezny <mike@maintainable.com>
+ * @author     Chuck Hagenbuch <chuck@horde.org>
+ * @category   Horde
+ * @license    http://opensource.org/licenses/bsd-license.php BSD
+ * @package    Log
  * @subpackage UnitTests
- * @author   Mike Naberezny <mike@maintainable.com>
- * @author   Chuck Hagenbuch <chuck@horde.org>
- * @license  http://opensource.org/licenses/bsd-license.php BSD
  */
 class Horde_Log_LogTest extends PHPUnit_Framework_TestCase
 {