Passed
Pull Request — master (#245)
by
unknown
34:41
created
lib/Doctrine/Common/Cache/ApcCache.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@
 block discarded – undo
102 102
 
103 103
         // @TODO - Temporary fix @see https://github.com/krakjoe/apcu/pull/42
104 104
         if (PHP_VERSION_ID >= 50500) {
105
-            $info['num_hits']   = isset($info['num_hits'])   ? $info['num_hits']   : $info['nhits'];
105
+            $info['num_hits']   = isset($info['num_hits']) ? $info['num_hits'] : $info['nhits'];
106 106
             $info['num_misses'] = isset($info['num_misses']) ? $info['num_misses'] : $info['nmisses'];
107 107
             $info['start_time'] = isset($info['start_time']) ? $info['start_time'] : $info['stime'];
108 108
         }
Please login to merge, or discard this patch.
lib/Doctrine/Common/Cache/CacheProvider.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -334,7 +334,7 @@
 block discarded – undo
334 334
      *
335 335
      * @param string $id The id of the cache entry to fetch.
336 336
      *
337
-     * @return mixed|false The cached data or FALSE, if no cache entry exists for the given id.
337
+     * @return string The cached data or FALSE, if no cache entry exists for the given id.
338 338
      */
339 339
     abstract protected function doFetch($id);
340 340
 
Please login to merge, or discard this patch.
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -227,9 +227,9 @@
 block discarded – undo
227 227
 
228 228
     
229 229
         /**
230
-     * @param $prefix
231
-     * @return array
232
-     */
230
+         * @param $prefix
231
+         * @return array
232
+         */
233 233
     public function deleteByPrefix($prefix)
234 234
     {
235 235
         $prefix = $this->getNamespacedIdDelete($prefix);
Please login to merge, or discard this patch.
lib/Doctrine/Common/Cache/CouchbaseCache.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@
 block discarded – undo
108 108
         $stats   = $this->couchbase->getStats();
109 109
         $servers = $this->couchbase->getServers();
110 110
         $server  = explode(":", $servers[0]);
111
-        $key     = $server[0] . ":" . "11210";
111
+        $key     = $server[0].":"."11210";
112 112
         $stats   = $stats[$key];
113 113
         return [
114 114
             Cache::STATS_HITS   => $stats['get_hits'],
Please login to merge, or discard this patch.
lib/Doctrine/Common/Cache/MemcachedCache.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -142,7 +142,7 @@
 block discarded – undo
142 142
     {
143 143
         $stats   = $this->memcached->getStats();
144 144
         $servers = $this->memcached->getServerList();
145
-        $key     = $servers[0]['host'] . ':' . $servers[0]['port'];
145
+        $key     = $servers[0]['host'].':'.$servers[0]['port'];
146 146
         $stats   = $stats[$key];
147 147
         return [
148 148
             Cache::STATS_HITS   => $stats['get_hits'],
Please login to merge, or discard this patch.
lib/Doctrine/Common/Cache/FilesystemCache.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -106,6 +106,6 @@
 block discarded – undo
106 106
         $data     = serialize($data);
107 107
         $filename = $this->getFilename($id);
108 108
 
109
-        return $this->writeFile($filename, $lifeTime . PHP_EOL . $data);
109
+        return $this->writeFile($filename, $lifeTime.PHP_EOL.$data);
110 110
     }
111 111
 }
Please login to merge, or discard this patch.
lib/Doctrine/Common/Cache/FileCache.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -143,7 +143,7 @@
 block discarded – undo
143 143
             // And there is a bug in PHP (https://bugs.php.net/bug.php?id=70943) with path lengths of 259.
144 144
             // So if the id in hex representation would surpass the limit, we use the hash instead. The prefix prevents
145 145
             // collisions between the hash and bin2hex.
146
-            $filename = '_' . $hash;
146
+            $filename = '_'.$hash;
147 147
         } else {
148 148
             $filename = bin2hex($id);
149 149
         }
Please login to merge, or discard this patch.
lib/Doctrine/Common/Cache/CouchbaseBucketCache.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\Common\Cache;
6 6
 
Please login to merge, or discard this patch.
lib/Doctrine/Common/Cache/ExtMongoDBCache.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 
6 6
 namespace Doctrine\Common\Cache;
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
             $this->collection->updateOne(
104 104
                 ['_id' => $id],
105 105
                 ['$set' => [
106
-                    MongoDBCache::EXPIRATION_FIELD => ($lifeTime > 0 ? new UTCDateTime((time() + $lifeTime) * 1000): null),
106
+                    MongoDBCache::EXPIRATION_FIELD => ($lifeTime > 0 ? new UTCDateTime((time() + $lifeTime) * 1000) : null),
107 107
                     MongoDBCache::DATA_FIELD => new Binary(serialize($data), Binary::TYPE_GENERIC),
108 108
                 ]],
109 109
                 ['upsert' => true]
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
                 'recordStats' => 0,
161 161
                 'repl' => 0,
162 162
             ])->toArray()[0];
163
-            $uptime       = $serverStatus['uptime'] ?? null;
163
+            $uptime = $serverStatus['uptime'] ?? null;
164 164
         } catch (Exception $e) {
165 165
         }
166 166
 
Please login to merge, or discard this patch.
lib/Doctrine/Common/Cache/PredisCache.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -78,12 +78,12 @@
 block discarded – undo
78 78
     }
79 79
     
80 80
       
81
-      /**
82
-     * Deletes all cache entries beginning with the given string.
83
-     *
84
-     * @param string $prefix
85
-     * @return array An array of deleted cache ids
86
-     */
81
+        /**
82
+         * Deletes all cache entries beginning with the given string.
83
+         *
84
+         * @param string $prefix
85
+         * @return array An array of deleted cache ids
86
+         */
87 87
     public function deleteByPrefix($prefix)
88 88
     {
89 89
         $deleted = array ();
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
         }
71 71
 
72 72
         // No lifetime, use MSET
73
-        $response = $this->client->mset(array_map(function ($value) {
73
+        $response = $this->client->mset(array_map(function($value) {
74 74
             return serialize($value);
75 75
         }, $keysAndValues));
76 76
 
@@ -86,10 +86,10 @@  discard block
 block discarded – undo
86 86
      */
87 87
     public function deleteByPrefix($prefix)
88 88
     {
89
-        $deleted = array ();
89
+        $deleted = array();
90 90
         $deleted = $this->getIds($prefix);
91 91
         if ($deleted) {
92
-            foreach ( $deleted as $id ) {
92
+            foreach ($deleted as $id) {
93 93
                 $this->doDelete($id);
94 94
             }
95 95
         }
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
     {
109 109
         if ($prefix) {
110 110
             return $this->client
111
-                ->keys('\[' . $prefix . '*');
111
+                ->keys('\['.$prefix.'*');
112 112
         } else {
113 113
             return $this->client
114 114
                 ->keys('*');
Please login to merge, or discard this patch.