Completed
Push — master ( 80a8c8...2f2de9 )
by Loban
03:46
created
src/models/Lang.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
             [['id'], 'trim'],
40 40
             [['id'], 'required'],
41 41
             [['id'], 'string', 'min' => 2, 'max' => 2],
42
-            [['id'], 'match', 'pattern' => '/^' . self::PATTERN . '$/'],
42
+            [['id'], 'match', 'pattern' => '/^'.self::PATTERN.'$/'],
43 43
             [['id'], 'unique'],
44 44
 
45 45
             [['name'], 'trim'],
Please login to merge, or discard this patch.
src/grid/ActionColumn.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
     {
50 50
         foreach ($this->languages as $lang_id => $lang) {
51 51
             $name = "update-$lang_id";
52
-            $this->template .= ' {' . $name . '}';
52
+            $this->template .= ' {'.$name.'}';
53 53
             if (!isset($this->buttons[$name])) {
54 54
                 $this->buttons[$name] = function() use ($lang, $lang_id) {
55 55
                     /** @var \lav45\translate\TranslatedTrait $model */
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 
59 59
                     $params = is_array($key) ? $key : ['id' => (string) $key];
60 60
                     $params[$this->languageAttribute] = $lang_id;
61
-                    $params[0] = $this->controller ? $this->controller . '/update' : 'update';
61
+                    $params[0] = $this->controller ? $this->controller.'/update' : 'update';
62 62
 
63 63
                     $url = Url::toRoute($params);
64 64
 
@@ -72,9 +72,9 @@  discard block
 block discarded – undo
72 72
 
73 73
                     if ($this->ajax) {
74 74
                         $options['data-href'] = $url;
75
-                        return Html::button('<span class="glyphicon glyphicon-pencil"></span> ' . $lang, $options);
75
+                        return Html::button('<span class="glyphicon glyphicon-pencil"></span> '.$lang, $options);
76 76
                     } else {
77
-                        return Html::a('<span class="glyphicon glyphicon-pencil"></span> ' . $lang, $url, $options);
77
+                        return Html::a('<span class="glyphicon glyphicon-pencil"></span> '.$lang, $url, $options);
78 78
                     }
79 79
                 };
80 80
             }
Please login to merge, or discard this patch.
src/TranslatedBehavior.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
      */
165 165
     public function __get($name)
166 166
     {
167
-        $getter = 'get' . $name;
167
+        $getter = 'get'.$name;
168 168
         if (method_exists($this, $getter)) {
169 169
             return $this->$getter();
170 170
         } else {
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
      */
179 179
     public function __set($name, $value)
180 180
     {
181
-        $setter = 'set' . $name;
181
+        $setter = 'set'.$name;
182 182
         if (method_exists($this, $setter)) {
183 183
             $this->$setter($value);
184 184
         } else {
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
         $table = $class::tableName();
252 252
 
253 253
         return $this->getRelation()
254
-            ->onCondition([$table . '.' . $this->languageAttribute => $langList])
254
+            ->onCondition([$table.'.'.$this->languageAttribute => $langList])
255 255
             ->indexBy($this->languageAttribute);
256 256
     }
257 257
 }
Please login to merge, or discard this patch.
src/LocaleHelperTrait.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,7 +27,6 @@
 block discarded – undo
27 27
             return call_user_func($this->primaryLanguage, $locale);
28 28
         }
29 29
         return extension_loaded('intl') ?
30
-            Locale::getPrimaryLanguage($locale) :
31
-            substr($locale, 0, 2);
30
+            Locale::getPrimaryLanguage($locale) : substr($locale, 0, 2);
32 31
     }
33 32
 }
34 33
\ No newline at end of file
Please login to merge, or discard this patch.