Completed
Pull Request — master (#237)
by igor
35:16
created
lib/Doctrine/Common/Filter/BloomFilter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,6 +39,6 @@
 block discarded – undo
39 39
     {
40 40
         $bits = $this->persister->getBulk($this->getBits($value));
41 41
 
42
-        return !in_array(0, $bits);
42
+        return ! in_array(0, $bits);
43 43
     }
44 44
 }
Please login to merge, or discard this patch.
lib/Doctrine/Common/Filter/CountingBloomFilter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,6 +39,6 @@
 block discarded – undo
39 39
     {
40 40
         $bits = $this->persister->getBulk($this->getBits($value));
41 41
 
42
-        return !in_array(0, $bits);
42
+        return ! in_array(0, $bits);
43 43
     }
44 44
 }
Please login to merge, or discard this patch.
lib/Doctrine/Common/Filter/Persist/CountString255.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
         $byte++;
36 36
 
37 37
         if ($byte > self::MAX_AMOUNT_PER_BIT) {
38
-            throw new MaxLimitPerBitReached('max amount per bit should not be higher than ' . self::MAX_AMOUNT_PER_BIT);
38
+            throw new MaxLimitPerBitReached('max amount per bit should not be higher than '.self::MAX_AMOUNT_PER_BIT);
39 39
         }
40 40
 
41 41
         $this->bytes[$offsetByte] = chr($byte);
Please login to merge, or discard this patch.
lib/Doctrine/Common/Filter/Persist/CountString15.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
         }
43 43
 
44 44
         if ($low > self::MAX_AMOUNT_PER_BIT || $high > self::MAX_AMOUNT_PER_BIT) {
45
-            throw new MaxLimitPerBitReached('max amount per bit should not be higher than ' . self::MAX_AMOUNT_PER_BIT);
45
+            throw new MaxLimitPerBitReached('max amount per bit should not be higher than '.self::MAX_AMOUNT_PER_BIT);
46 46
         }
47 47
 
48 48
         $this->bytes[$offsetByte] = chr($low | ($high << 4));
Please login to merge, or discard this patch.
lib/Doctrine/Common/Filter/BloomFilterAbstract.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -207,8 +207,8 @@  discard block
 block discarded – undo
207 207
 
208 208
     protected function assertInit()
209 209
     {
210
-        if (!isset($this->setSize) || !isset($this->falsePositiveProbability)) {
211
-            throw new NotInitialized(static::class . ' should be initialized');
210
+        if ( ! isset($this->setSize) || ! isset($this->falsePositiveProbability)) {
211
+            throw new NotInitialized(static::class.' should be initialized');
212 212
         }
213 213
     }
214 214
 
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
             return $bits;
230 230
         } else {
231 231
             return array_map(
232
-                function ($bit) use ($offset) {
232
+                function($bit) use ($offset) {
233 233
                     return $bit + ($offset * $this->bitSize);
234 234
                 },
235 235
                 $bits
@@ -275,6 +275,6 @@  discard block
 block discarded – undo
275 275
      */
276 276
     private function hash(string $value, int $index)
277 277
     {
278
-        return $this->hash->generate($value . $index) % $this->bitSize;
278
+        return $this->hash->generate($value.$index) % $this->bitSize;
279 279
     }
280 280
 }
Please login to merge, or discard this patch.
lib/Doctrine/Common/Filter/DynamicBloomFilter.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,10 +43,10 @@
 block discarded – undo
43 43
         $bits = $this->getBits($value);
44 44
 
45 45
         for ($i = 0; $i <= $bloomFilterCount; ++$i) {
46
-            $result = !in_array(
46
+            $result = ! in_array(
47 47
                 0,
48 48
                 $this->persister->getBulk(array_map(
49
-                        function ($bit) use ($i) {
49
+                        function($bit) use ($i) {
50 50
                             return $bit + ($i * $this->bitSize);
51 51
                         },
52 52
                         $bits
Please login to merge, or discard this patch.
lib/Doctrine/Common/Filter/Hash/Murmur.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,10 +12,10 @@
 block discarded – undo
12 12
      */
13 13
     public function generate(string $value): string
14 14
     {
15
-        $value  = array_values(unpack('C*',(string) $value));
15
+        $value  = array_values(unpack('C*', (string) $value));
16 16
         $klen = count($value);
17 17
         $h1 = 0;
18
-        for ($i = 0, $bytes = $klen-($remainder = $klen & 3); $i < $bytes;) {
18
+        for ($i = 0, $bytes = $klen - ($remainder = $klen & 3); $i < $bytes;) {
19 19
             $k1 = $value[$i]
20 20
                 | ($value[++$i] << 8)
21 21
                 | ($value[++$i] << 16)
Please login to merge, or discard this patch.
lib/Doctrine/Common/Cache/BloomChainCache.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
      */
50 50
     protected function doFetch($id)
51 51
     {
52
-        if (!$this->bloomFilter->has($id)) {
52
+        if ( ! $this->bloomFilter->has($id)) {
53 53
             return false;
54 54
         }
55 55
 
Please login to merge, or discard this patch.