Completed
Pull Request — master (#37)
by
unknown
02:20
created
src/Stichoza/GoogleTranslate/Tokens/GoogleTokenGenerator.php 3 patches
Doc Comments   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,13 +18,16 @@
 block discarded – undo
18 18
      * @param string $source Source language
19 19
      * @param string $target Target language
20 20
      * @param string $text Text to translate
21
-     * @return mixed A token
21
+     * @return string A token
22 22
      */
23 23
     public function generateToken($source, $target, $text)
24 24
     {
25 25
         return $this->TL($text);
26 26
     }
27 27
 
28
+    /**
29
+     * @param string $str
30
+     */
28 31
     private function mb_str_split($str, $length = 1) 
29 32
     {
30 33
         if ($length < 1) return false;
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
             $a = RL($a, '+-a^+6');
51 51
         }
52 52
         $a = RL($a, "+-3^+b+-f");
53
-        $a  =  $a >= 0 ? $a : ($a & 0x7FFFFFFF) + 0x80000000;
53
+        $a = $a >= 0 ? $a : ($a & 0x7FFFFFFF) + 0x80000000;
54 54
         $a = fmod($a, pow(10, 6));
55 55
         return $a . "." . ($a ^ $b);   
56 56
     }
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,9 @@
 block discarded – undo
27 27
 
28 28
     private function mb_str_split($str, $length = 1) 
29 29
     {
30
-        if ($length < 1) return false;
30
+        if ($length < 1) {
31
+         return false;
32
+        }
31 33
         $result = array();
32 34
         for ($i = 0; $i < mb_strlen($str); $i += $length) {
33 35
             $result[] = mb_substr($str, $i, $length);
Please login to merge, or discard this patch.