Completed
Push — master ( 9bf526...20dfc8 )
by Levan
02:08
created
src/Stichoza/GoogleTranslate/Tokens/GoogleTokenGenerator.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -37,13 +37,13 @@  discard block
 block discarded – undo
37 37
 
38 38
         for ($d = array(), $e = 0, $f = 0; $f < mb_strlen($a, 'UTF-8'); $f++) {
39 39
             $g = $this->charCodeAt($a, $f);
40
-            if ( 128 > $g ) {
40
+            if (128 > $g) {
41 41
                 $d[$e++] = $g;
42 42
             } else {
43
-                if ( 2048 > $g ) {
43
+                if (2048 > $g) {
44 44
                     $d[$e++] = $g >> 6 | 192;
45 45
                 } else {
46
-                    if ( 55296 == ($g & 64512) && $f + 1 < mb_strlen($a, 'UTF-8') && 56320 == ($this->charCodeAt($a, $f + 1) & 64512) ) {
46
+                    if (55296 == ($g & 64512) && $f + 1 < mb_strlen($a, 'UTF-8') && 56320 == ($this->charCodeAt($a, $f + 1) & 64512)) {
47 47
                         $g = 65536 + (($g & 1023) << 10) + ($this->charCodeAt($a, ++$f) & 1023);
48 48
                         $d[$e++] = $g >> 18 | 240;
49 49
                         $d[$e++] = $g >> 12 & 63 | 128;
@@ -93,10 +93,10 @@  discard block
 block discarded – undo
93 93
      */
94 94
     private function RL($a, $b)
95 95
     {
96
-        for($c = 0; $c < strlen($b) - 2; $c +=3) {
97
-            $d = $b{$c+2};
96
+        for ($c = 0; $c < strlen($b) - 2; $c += 3) {
97
+            $d = $b{$c + 2};
98 98
             $d = $d >= 'a' ? $this->charCodeAt($d, 0) - 87 : intval($d);
99
-            $d = $b{$c+1} == '+' ? $this->shr32($a, $d) : $a << $d;
99
+            $d = $b{$c + 1} == '+' ? $this->shr32($a, $d) : $a << $d;
100 100
             $a = $b{$c} == '+' ? ($a + $d & 4294967295) : $a ^ $d;
101 101
         }
102 102
         return $a;
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
         $l = strlen($bin);
122 122
         if ($l > 32) {
123 123
             $bin = substr($bin, $l - 32, 32);
124
-        } elseif($l < 32) {
124
+        } elseif ($l < 32) {
125 125
             $bin = str_pad($bin, 32, '0', STR_PAD_LEFT);
126 126
         }
127 127
         return bindec(str_pad(substr($bin, 0, 32 - $bits), 32, '0', STR_PAD_LEFT));
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
         $char = mb_substr($str, $index, 1, 'UTF-8');
140 140
         if (mb_check_encoding($char, 'UTF-8')) {
141 141
             $ret = mb_convert_encoding($char, 'UTF-32BE', 'UTF-8');
142
-            $result =  hexdec(bin2hex($ret));
142
+            $result = hexdec(bin2hex($ret));
143 143
             return $result;
144 144
         }
145 145
         return null;
Please login to merge, or discard this patch.