Completed
Push — master ( 6ec166...f38c7d )
by Michal
03:01
created
src/MoTranslator.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
      */
60 60
     public function __construct($filename)
61 61
     {
62
-        if (! is_readable($filename)) {
62
+        if (!is_readable($filename)) {
63 63
             $this->error = 2; // file does not exist
64 64
             return;
65 65
         }
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
         $expr = explode(';', $expr, 2);
123 123
         if (count($expr) == 2) {
124 124
             $expr = $expr[1];
125
-        } else{
125
+        } else {
126 126
             $expr = $expr[0];
127 127
         }
128 128
         $expr = preg_replace('@[^a-zA-Z0-9_:;\(\)\?\|\&=!<>+*/\%-]@', '', $expr);
@@ -142,15 +142,15 @@  discard block
 block discarded – undo
142 142
                     $res .= ') : (';
143 143
                     break;
144 144
                 case ';':
145
-                    $res .= str_repeat( ')', $p) . ';';
145
+                    $res .= str_repeat(')', $p) . ';';
146 146
                     $p = 0;
147 147
                     break;
148 148
                 default:
149 149
                     $res .= $ch;
150 150
             }
151 151
         }
152
-        $res = str_replace('n','$n',$res);
153
-        $res = str_replace('plural','$plural',$res);
152
+        $res = str_replace('n', '$n', $res);
153
+        $res = str_replace('plural', '$plural', $res);
154 154
         return $res;
155 155
     }
156 156
 
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
     {
244 244
         // this should contains all strings separated by NULLs
245 245
         $key = implode(chr(0), array($single, $plural));
246
-        if (! array_key_exists($key, $this->cache_translations)) {
246
+        if (!array_key_exists($key, $this->cache_translations)) {
247 247
             return ($number != 1) ? $plural : $single;
248 248
         }
249 249
 
Please login to merge, or discard this patch.