Skip to content

Commit

Permalink
Merge pull request #18 from smartive/fix-phpdoc
Browse files Browse the repository at this point in the history
cleanup phpdoc
  • Loading branch information
mfeltscher committed Jan 27, 2016
2 parents 865fc52 + e341a32 commit e81eb65
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions Cache/Redis.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
namespace Smartive\HandlebarsBundle\Cache;

use Handlebars\Cache;
use Predis\Client as Predis;
use Predis\Client as PredisClient;
use Redis as RedisClient;
use Psr\Log\LoggerInterface;
use Psr\Log\NullLogger;

Expand All @@ -18,7 +19,7 @@ class Redis implements Cache
const KEY_PREFIX_DEFAULT = 'smartive-handlebars:';

/**
* @var Client|\Redis
* @var PredisClient|RedisClient
*/
private $redisClient;

Expand All @@ -35,13 +36,13 @@ class Redis implements Cache
/**
* Constructor
*
* @param Predis|\Redis $redisClient Redis client instance
* @param LoggerInterface $logger Logger instance
* @param string $keyPrefix A prefix to append
* @param PredisClient|RedisClient $redisClient Redis client instance
* @param LoggerInterface $logger Logger instance
* @param string $keyPrefix A prefix to append
*/
public function __construct($redisClient, LoggerInterface $logger = null, $keyPrefix = self::KEY_PREFIX_DEFAULT)
{
if (!$redisClient instanceof Predis && !(class_exists('Redis') && $redisClient instanceof \Redis)) {
if (!$redisClient instanceof PredisClient && !$redisClient instanceof RedisClient) {
throw new \InvalidArgumentException('redisClient has to be of type \Predis\Client or \Redis');
}

Expand Down

0 comments on commit e81eb65

Please sign in to comment.