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

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into reflection
Browse files Browse the repository at this point in the history
  • Loading branch information
Show file tree
Hide file tree
Showing 68 changed files with 120 additions and 88 deletions.
2 changes: 1 addition & 1 deletion src/Exception/ExceptionInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Log
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Exception/InvalidArgumentException.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Log
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Exception/RuntimeException.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Log
*/
Expand Down
4 changes: 2 additions & 2 deletions src/Filter/FilterInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Log
*/
Expand All @@ -20,7 +20,7 @@ interface FilterInterface
* Returns TRUE to accept the message, FALSE to block it.
*
* @param array $event event data
* @return boolean accepted?
* @return bool accepted?
*/
public function filter(array $event);
}
4 changes: 2 additions & 2 deletions src/Filter/Mock.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Log
*/
Expand All @@ -28,7 +28,7 @@ class Mock implements FilterInterface
* Returns TRUE to accept the message
*
* @param array $event event data
* @return boolean
* @return bool
*/
public function filter(array $event)
{
Expand Down
4 changes: 2 additions & 2 deletions src/Filter/Priority.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Log
*/
Expand Down Expand Up @@ -63,7 +63,7 @@ public function __construct($priority, $operator = null)
* Returns TRUE to accept the message, FALSE to block it.
*
* @param array $event event data
* @return boolean accepted?
* @return bool accepted?
*/
public function filter(array $event)
{
Expand Down
4 changes: 2 additions & 2 deletions src/Filter/Regex.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Log
*/
Expand Down Expand Up @@ -59,7 +59,7 @@ public function __construct($regex)
* Returns TRUE to accept the message, FALSE to block it.
*
* @param array $event event data
* @return boolean accepted?
* @return bool accepted?
*/
public function filter(array $event)
{
Expand Down
8 changes: 4 additions & 4 deletions src/Filter/SuppressFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Log
*/
Expand All @@ -19,7 +19,7 @@
class SuppressFilter implements FilterInterface
{
/**
* @var boolean
* @var bool
*/
protected $accept = true;

Expand All @@ -29,7 +29,7 @@ class SuppressFilter implements FilterInterface
* 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?
* @param bool $suppress Should all log events be suppressed?
* @return void
*/
public function suppress($suppress)
Expand All @@ -41,7 +41,7 @@ public function suppress($suppress)
* Returns TRUE to accept the message, FALSE to block it.
*
* @param array $event event data
* @return boolean accepted?
* @return bool accepted?
*/
public function filter(array $event)
{
Expand Down
4 changes: 2 additions & 2 deletions src/Filter/Validator.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Log
*/
Expand Down Expand Up @@ -56,7 +56,7 @@ public function __construct($validator)
* Returns TRUE to accept the message, FALSE to block it.
*
* @param array $event event data
* @return boolean
* @return bool
*/
public function filter(array $event)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Formatter/Base.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Log
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Formatter/Db.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Log
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Formatter/ErrorHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Log
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Formatter/ExceptionHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Log
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Formatter/FirePhp.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Log
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Formatter/FormatterInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Log
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Formatter/Simple.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Log
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Formatter/Xml.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Log
*/
Expand Down
6 changes: 3 additions & 3 deletions src/Logger.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Log
*/
Expand Down Expand Up @@ -69,14 +69,14 @@ class Logger implements LoggerInterface
/**
* Registered error handler
*
* @var boolean
* @var bool
*/
protected static $registeredErrorHandler = false;

/**
* Registered exception handler
*
* @var boolean
* @var bool
*/
protected static $registeredExceptionHandler = false;

Expand Down
2 changes: 1 addition & 1 deletion src/LoggerAwareInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Log
*/
Expand Down
2 changes: 1 addition & 1 deletion src/LoggerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Log
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Writer/AbstractWriter.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Log
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Writer/Db.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Log
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Writer/FilterPluginManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Log
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Writer/FirePhp.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Log
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Writer/FirePhp/FirePhpBridge.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Log
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Writer/FirePhp/FirePhpInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Log
*/
Expand Down
5 changes: 4 additions & 1 deletion src/Writer/Mail.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Log
*/
Expand Down Expand Up @@ -85,6 +85,9 @@ public function __construct($mail, Transport\TransportInterface $transport = nul
}

if (is_array($mail)) {
if (isset($mail['subject_prepend_text'])) {
$this->setSubjectPrependText($mail['subject_prepend_text']);
}
$transport = isset($mail['transport']) ? $mail['transport'] : null;
$mail = isset($mail['mail']) ? $mail['mail'] : null;
}
Expand Down
4 changes: 2 additions & 2 deletions src/Writer/Mock.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Log
*/
Expand All @@ -27,7 +27,7 @@ class Mock extends AbstractWriter
/**
* shutdown called?
*
* @var boolean
* @var bool
*/
public $shutdown = false;

Expand Down
9 changes: 5 additions & 4 deletions src/Writer/MongoDB.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Log
*/
Expand All @@ -13,6 +13,7 @@

use DateTime;
use Mongo;
use MongoClient;
use MongoDate;
use Traversable;
use Zend\Log\Exception\InvalidArgumentException;
Expand Down Expand Up @@ -46,7 +47,7 @@ class MongoDB extends AbstractWriter
/**
* Constructor
*
* @param Mongo|array|Traversable $mongo
* @param Mongo|MongoClient|array|Traversable $mongo
* @param string|MongoDB $database
* @param string $collection
* @param array $saveOptions
Expand Down Expand Up @@ -75,9 +76,9 @@ public function __construct($mongo, $database, $collection, array $saveOptions =
$mongo = isset($mongo['mongo']) ? $mongo['mongo'] : null;
}

if (!($mongo instanceof Mongo)) {
if (!($mongo instanceof MongoClient || $mongo instanceof Mongo)) {
throw new Exception\InvalidArgumentException(
'Parameter of type %s is invalid; must be Mongo',
'Parameter of type %s is invalid; must be MongoClient or Mongo',
(is_object($mongo) ? get_class($mongo) : gettype($mongo))
);
}
Expand Down
Loading

0 comments on commit 49e380f

Please sign in to comment.