Completed
Push — master ( edd7ee...743d38 )
by Loban
01:21
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/TranslatedBehavior.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
      */
164 164
     public function __get($name)
165 165
     {
166
-        $getter = 'get' . $name;
166
+        $getter = 'get'.$name;
167 167
         if (method_exists($this, $getter)) {
168 168
             return $this->$getter();
169 169
         }
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
      */
177 177
     public function __set($name, $value)
178 178
     {
179
-        $setter = 'set' . $name;
179
+        $setter = 'set'.$name;
180 180
         if (method_exists($this, $setter)) {
181 181
             $this->$setter($value);
182 182
         } else {
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
         $table = $class::tableName();
250 250
 
251 251
         return $this->getRelation()
252
-            ->onCondition([$table . '.' . $this->languageAttribute => $langList])
252
+            ->onCondition([$table.'.'.$this->languageAttribute => $langList])
253 253
             ->indexBy($this->languageAttribute);
254 254
     }
255 255
 }
Please login to merge, or discard this patch.
src/grid/ActionColumn.php 1 patch
Spacing   +3 added lines, -4 removed lines patch added patch discarded remove patch
@@ -45,13 +45,13 @@  discard block
 block discarded – undo
45 45
     {
46 46
         foreach ($this->languages as $lang_id => $lang) {
47 47
             $name = "update-{$lang_id}";
48
-            $this->template .= ' {' . $name . '}';
48
+            $this->template .= ' {'.$name.'}';
49 49
             if (!isset($this->buttons[$name])) {
50 50
                 $this->buttons[$name] = function($_url, $model, $key) use ($lang, $lang_id) {
51 51
                     /** @var \lav45\translate\TranslatedTrait $model */
52 52
                     $params = is_array($key) ? $key : ['id' => (string) $key];
53 53
                     $params[$this->languageAttribute] = $lang_id;
54
-                    $params[0] = $this->controller ? $this->controller . '/update' : 'update';
54
+                    $params[0] = $this->controller ? $this->controller.'/update' : 'update';
55 55
 
56 56
                     $url = Url::toRoute($params);
57 57
 
@@ -63,8 +63,7 @@  discard block
 block discarded – undo
63 63
                     ], $this->buttonOptions);
64 64
 
65 65
                     $color = $model->hasTranslate($lang_id) ?
66
-                        $this->successTranslateButtonClass :
67
-                        $this->notTranslateButtonClass;
66
+                        $this->successTranslateButtonClass : $this->notTranslateButtonClass;
68 67
                     Html::addCssClass($options, $color);
69 68
 
70 69
                     $text = str_replace('{lang}', $lang, $this->buttonTextTemplate);
Please login to merge, or discard this patch.