Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cleanup phpdoc #18

Merged
merged 1 commit into from
Jan 27, 2016
Merged

cleanup phpdoc #18

merged 1 commit into from
Jan 27, 2016

Conversation

dbu
Copy link
Collaborator

@dbu dbu commented Jan 27, 2016

you missed one occurrence of Client. i propose we also use Redis to not have the absolute name \Redis.

@@ -4,6 +4,7 @@

use Handlebars\Cache;
use Predis\Client as Predis;
use Redis;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh well. phpunit reveils i did not think enough. what about RedisClient and PredisClient?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have to remove that, since we cannot rely on the user having the phpredis extension installed.

*/
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) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was overcomplicated. instanceof for a not existing class is not a problem in php, see https://3v4l.org/OG7tG

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯

mfeltscher added a commit that referenced this pull request Jan 27, 2016
@mfeltscher mfeltscher merged commit e81eb65 into master Jan 27, 2016
@mfeltscher mfeltscher deleted the fix-phpdoc branch January 27, 2016 09:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants