Passed
Push — master ( a87dad...833cfc )
by smiley
01:19
created
src/RedisCache.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
 use Psr\Log\LoggerInterface;
17 17
 use Redis;
18 18
 
19
-class RedisCache extends CacheDriverAbstract{
19
+class RedisCache extends CacheDriverAbstract {
20 20
 
21 21
 	/**
22 22
 	 * @var \Redis
@@ -30,17 +30,17 @@  discard block
 block discarded – undo
30 30
 	 * @param \chillerlan\Settings\SettingsContainerInterface|null $options
31 31
 	 * @param \Psr\Log\LoggerInterface|null                        $logger
32 32
 	 */
33
-	public function __construct(Redis $redis, SettingsContainerInterface $options = null, LoggerInterface $logger = null){
33
+	public function __construct(Redis $redis, SettingsContainerInterface $options = null, LoggerInterface $logger = null) {
34 34
 		parent::__construct($options, $logger);
35 35
 
36 36
 		$this->redis = $redis;
37 37
 	}
38 38
 
39 39
 	/** @inheritdoc */
40
-	public function get($key, $default = null){
40
+	public function get($key, $default = null) {
41 41
 		$value = $this->redis->get($this->checkKey($key));
42 42
 
43
-		if($value !== false){
43
+		if ($value !== false) {
44 44
 			return $value;
45 45
 		}
46 46
 
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 		$key = $this->checkKey($key);
53 53
 		$ttl = $this->getTTL($ttl);
54 54
 
55
-		if($ttl === null){
55
+		if ($ttl === null) {
56 56
 			return $this->redis->set($key, $value);
57 57
 		}
58 58
 
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 
81 81
 		$return = [];
82 82
 
83
-		foreach($keys as $key){
83
+		foreach ($keys as $key) {
84 84
 			$return[$key] = $values[$key] !== false ? $values[$key] : $default;
85 85
 		}
86 86
 
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 		$values = $this->getData($values);
93 93
 		$ttl    = $this->getTTL($ttl);
94 94
 
95
-		if($ttl === null){
95
+		if ($ttl === null) {
96 96
 			$this->checkKeyArray(array_keys($values));
97 97
 
98 98
 			return $this->redis->msetnx($values);
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 
101 101
 		$return = [];
102 102
 
103
-		foreach($values as $key => $value){
103
+		foreach ($values as $key => $value) {
104 104
 			$return[] = $this->set($key, $value, $ttl);
105 105
 		}
106 106
 
Please login to merge, or discard this patch.