Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

Commit

Permalink
Merge branch 'feature/phpdoc-mismatch' of https://github.com/micheh/zf2
Browse files Browse the repository at this point in the history
… into hotfix/phpdoc
  • Loading branch information
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 26 deletions.
1 change: 1 addition & 0 deletions src/Filter/Validator.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class Validator implements FilterInterface
* Filter out any log messages not matching the validator
*
* @param ZendValidator|array|Traversable $validator
* @throws Exception\InvalidArgumentException
* @return Validator
*/
public function __construct($validator)
Expand Down
6 changes: 4 additions & 2 deletions src/Logger.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ public function setWriterPluginManager($plugins)
*
* @param string $name
* @param array|null $options
* @return Writer
* @return Writer\WriterInterface
*/
public function writerPlugin($name, array $options = null)
{
Expand All @@ -157,8 +157,9 @@ public function writerPlugin($name, array $options = null)
/**
* Add a writer to a logger
*
* @param string|Writer $writer
* @param string|Writer\WriterInterface $writer
* @param int $priority
* @param array|null $options
* @return Logger
* @throws Exception\InvalidArgumentException
*/
Expand Down Expand Up @@ -214,6 +215,7 @@ public function setWriters(SplPriorityQueue $writers)
* @return Logger
* @throws Exception\InvalidArgumentException if message can't be cast to string
* @throws Exception\InvalidArgumentException if extra can't be iterated over
* @throws Exception\RuntimeException if no log writer specified
*/
public function log($priority, $message, $extra = array())
{
Expand Down
34 changes: 18 additions & 16 deletions src/LoggerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

namespace Zend\Log;

use Traversable;

/**
* @category Zend
* @package Zend_Log
Expand All @@ -18,57 +20,57 @@ interface LoggerInterface
{
/**
* @param string $message
* @param array|\Traversable $extra
* @return Loggabble
* @param array|Traversable $extra
* @return LoggerInterface
*/
public function emerg($message, $extra = array());

/**
* @param string $message
* @param array|\Traversable $extra
* @return Loggabble
* @param array|Traversable $extra
* @return LoggerInterface
*/
public function alert($message, $extra = array());

/**
* @param string $message
* @param array|\Traversable $extra
* @return Loggabble
* @param array|Traversable $extra
* @return LoggerInterface
*/
public function crit($message, $extra = array());

/**
* @param string $message
* @param array|\Traversable $extra
* @return Loggabble
* @param array|Traversable $extra
* @return LoggerInterface
*/
public function err($message, $extra = array());

/**
* @param string $message
* @param array|\Traversable $extra
* @return Loggabble
* @param array|Traversable $extra
* @return LoggerInterface
*/
public function warn($message, $extra = array());

/**
* @param string $message
* @param array|\Traversable $extra
* @return Loggabble
* @param array|Traversable $extra
* @return LoggerInterface
*/
public function notice($message, $extra = array());

/**
* @param string $message
* @param array|\Traversable $extra
* @return Loggabble
* @param array|Traversable $extra
* @return LoggerInterface
*/
public function info($message, $extra = array());

/**
* @param string $message
* @param array|\Traversable $extra
* @return Loggabble
* @param array|Traversable $extra
* @return LoggerInterface
*/
public function debug($message, $extra = array());
}
7 changes: 4 additions & 3 deletions src/Writer/AbstractWriter.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ abstract class AbstractWriter implements WriterInterface
/**
* Filter chain
*
* @var array
* @var Filter\FilterInterface[]
*/
protected $filters = array();

Expand All @@ -46,6 +46,7 @@ abstract class AbstractWriter implements WriterInterface
* Add a filter specific to this writer.
*
* @param int|string|Filter\FilterInterface $filter
* @param array|null $options
* @return AbstractWriter
* @throws Exception\InvalidArgumentException
*/
Expand Down Expand Up @@ -87,7 +88,7 @@ public function getFilterPluginManager()
* Set filter plugin manager
*
* @param string|FilterPluginManager $plugins
* @return Logger
* @return self
* @throws Exception\InvalidArgumentException
*/
public function setFilterPluginManager($plugins)
Expand All @@ -112,7 +113,7 @@ public function setFilterPluginManager($plugins)
*
* @param string $name
* @param array|null $options
* @return Writer
* @return Filter\FilterInterface
*/
public function filterPlugin($name, array $options = null)
{
Expand Down
3 changes: 1 addition & 2 deletions src/Writer/Db.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,7 @@ class Db extends AbstractWriter
* @param string $tableName
* @param array $columnMap
* @param string $separator
* @return Db
* @throw Exception\InvalidArgumentException
* @throws Exception\InvalidArgumentException
*/
public function __construct($db, $tableName = null, array $columnMap = null, $separator = null)
{
Expand Down
1 change: 0 additions & 1 deletion src/Writer/FilterPluginManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
namespace Zend\Log\Writer;

use Zend\ServiceManager\AbstractPluginManager;
use Zend\ServiceManager\ConfigurationInterface;
use Zend\Log\Filter;
use Zend\Log\Exception;

Expand Down
2 changes: 1 addition & 1 deletion src/Writer/Mail.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class Mail extends AbstractWriter
*
* @param MailMessage|array|Traversable $mail
* @param Transport\TransportInterface $transport Optional
* @return Mail
* @throws Exception\InvalidArgumentException
*/
public function __construct($mail, Transport\TransportInterface $transport = null)
{
Expand Down
1 change: 1 addition & 0 deletions src/Writer/MongoDB.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ class MongoDB extends AbstractWriter
* @param string|MongoDB $database
* @param string $collection
* @param array $saveOptions
* @throws Exception\InvalidArgumentException
*/
public function __construct($mongo, $database, $collection, array $saveOptions = array())
{
Expand Down
1 change: 0 additions & 1 deletion src/WriterPluginManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
namespace Zend\Log;

use Zend\ServiceManager\AbstractPluginManager;
use Zend\ServiceManager\ConfigurationInterface;

/**
* @category Zend
Expand Down

0 comments on commit 5557fac

Please sign in to comment.