Passed
Pull Request — master (#266)
by Michael
34:32
created
lib/Doctrine/Common/Cache/ArrayCache.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
      */
66 66
     protected function doFetch($id)
67 67
     {
68
-        if (! $this->doContains($id)) {
68
+        if ( ! $this->doContains($id)) {
69 69
             $this->missesCount += 1;
70 70
 
71 71
             return false;
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
      */
82 82
     protected function doContains($id)
83 83
     {
84
-        if (! isset($this->data[$id])) {
84
+        if ( ! isset($this->data[$id])) {
85 85
             return false;
86 86
         }
87 87
 
Please login to merge, or discard this patch.
lib/Doctrine/Common/Cache/PredisCache.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@
 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
 
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/SQLite3Cache.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
     {
79 79
         $item = $this->findById($id);
80 80
 
81
-        if (! $item) {
81
+        if ( ! $item) {
82 82
             return false;
83 83
         }
84 84
 
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
     {
157 157
         list($idField) = $fields = $this->getFields();
158 158
 
159
-        if (! $includeData) {
159
+        if ( ! $includeData) {
160 160
             $key = array_search(static::DATA_FIELD, $fields);
161 161
             unset($fields[$key]);
162 162
         }
Please login to merge, or discard this patch.
lib/Doctrine/Common/Cache/PhpFileCache.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
     {
34 34
         parent::__construct($directory, $extension, $umask);
35 35
 
36
-        self::$emptyErrorHandler = function () {
36
+        self::$emptyErrorHandler = function() {
37 37
         };
38 38
     }
39 39
 
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 
112 112
         restore_error_handler();
113 113
 
114
-        if (! isset($value['lifetime'])) {
114
+        if ( ! isset($value['lifetime'])) {
115 115
             return null;
116 116
         }
117 117
 
Please login to merge, or discard this patch.
lib/Doctrine/Common/Cache/FilesystemCache.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
         $lifetime = -1;
37 37
         $filename = $this->getFilename($id);
38 38
 
39
-        if (! is_file($filename)) {
39
+        if ( ! is_file($filename)) {
40 40
             return false;
41 41
         }
42 42
 
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
         $lifetime = -1;
71 71
         $filename = $this->getFilename($id);
72 72
 
73
-        if (! is_file($filename)) {
73
+        if ( ! is_file($filename)) {
74 74
             return false;
75 75
         }
76 76
 
@@ -98,6 +98,6 @@  discard block
 block discarded – undo
98 98
         $data     = serialize($data);
99 99
         $filename = $this->getFilename($id);
100 100
 
101
-        return $this->writeFile($filename, $lifeTime . PHP_EOL . $data);
101
+        return $this->writeFile($filename, $lifeTime.PHP_EOL.$data);
102 102
     }
103 103
 }
Please login to merge, or discard this patch.
lib/Doctrine/Common/Cache/RiakCache.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
             $response = $this->bucket->get($id);
42 42
 
43 43
             // No objects found
44
-            if (! $response->hasObject()) {
44
+            if ( ! $response->hasObject()) {
45 45
                 return false;
46 46
             }
47 47
 
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
             $response = $this->bucket->get($id, $input);
84 84
 
85 85
             // No objects found
86
-            if (! $response->hasObject()) {
86
+            if ( ! $response->hasObject()) {
87 87
                 return false;
88 88
             }
89 89
 
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
@@ -90,7 +90,7 @@
 block discarded – undo
90 90
         $stats   = $this->couchbase->getStats();
91 91
         $servers = $this->couchbase->getServers();
92 92
         $server  = explode(':', $servers[0]);
93
-        $key     = $server[0] . ':11210';
93
+        $key     = $server[0].':11210';
94 94
         $stats   = $stats[$key];
95 95
         return [
96 96
             Cache::STATS_HITS   => $stats['get_hits'],
Please login to merge, or discard this patch.
lib/Doctrine/Common/Cache/FileCache.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
     public function __construct($directory, $extension = '', $umask = 0002)
68 68
     {
69 69
         // YES, this needs to be *before* createPathIfNeeded()
70
-        if (! is_int($umask)) {
70
+        if ( ! is_int($umask)) {
71 71
             throw new \InvalidArgumentException(sprintf(
72 72
                 'The umask parameter is required to be integer, was: %s',
73 73
                 gettype($umask)
@@ -75,14 +75,14 @@  discard block
 block discarded – undo
75 75
         }
76 76
         $this->umask = $umask;
77 77
 
78
-        if (! $this->createPathIfNeeded($directory)) {
78
+        if ( ! $this->createPathIfNeeded($directory)) {
79 79
             throw new \InvalidArgumentException(sprintf(
80 80
                 'The directory "%s" does not exist and could not be created.',
81 81
                 $directory
82 82
             ));
83 83
         }
84 84
 
85
-        if (! is_writable($directory)) {
85
+        if ( ! is_writable($directory)) {
86 86
             throw new \InvalidArgumentException(sprintf(
87 87
                 'The directory "%s" is not writable.',
88 88
                 $directory
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
             // And there is a bug in PHP (https://bugs.php.net/bug.php?id=70943) with path lengths of 259.
138 138
             // So if the id in hex representation would surpass the limit, we use the hash instead. The prefix prevents
139 139
             // collisions between the hash and bin2hex.
140
-            $filename = '_' . $hash;
140
+            $filename = '_'.$hash;
141 141
         } else {
142 142
             $filename = bin2hex($id);
143 143
         }
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
      */
214 214
     private function createPathIfNeeded(string $path) : bool
215 215
     {
216
-        if (! is_dir($path)) {
216
+        if ( ! is_dir($path)) {
217 217
             if (@mkdir($path, 0777 & (~$this->umask), true) === false && ! is_dir($path)) {
218 218
                 return false;
219 219
             }
@@ -234,11 +234,11 @@  discard block
 block discarded – undo
234 234
     {
235 235
         $filepath = pathinfo($filename, PATHINFO_DIRNAME);
236 236
 
237
-        if (! $this->createPathIfNeeded($filepath)) {
237
+        if ( ! $this->createPathIfNeeded($filepath)) {
238 238
             return false;
239 239
         }
240 240
 
241
-        if (! is_writable($filepath)) {
241
+        if ( ! is_writable($filepath)) {
242 242
             return false;
243 243
         }
244 244
 
Please login to merge, or discard this patch.