Passed
Push — master ( 381d64...69cbf7 )
by Tõnis
02:19
created
views/_country-region-row.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
 use tonisormisson\addressform\AddressHelper;
10 10
 use yii\helpers\ArrayHelper;
11 11
 
12
-$country =$widget->getCountry();
12
+$country = $widget->getCountry();
13 13
 $countryDisabled = !is_null($country);
14 14
 ?>
15 15
 
@@ -27,12 +27,12 @@  discard block
 block discarded – undo
27 27
             'pluginOptions'=>[
28 28
                 'placeholder' => $widget->placeHolders['country'],
29 29
             ],
30
-        ]);?>
31
-        <?= $countryDisabled ?  $form->field($model, 'country')->hiddenInput(['value'=> $country->getIsoAlpha2()])->label(false) : null ?>
30
+        ]); ?>
31
+        <?= $countryDisabled ? $form->field($model, 'country')->hiddenInput(['value'=> $country->getIsoAlpha2()])->label(false) : null ?>
32 32
     </div>
33 33
 
34 34
     <div class="col-sm-6">
35
-    <?php if(is_null($country)):?>
35
+    <?php if (is_null($country)):?>
36 36
         <?= $form->field($model, 'state')->widget(DepDrop::class, [
37 37
             'type'=>DepDrop::TYPE_SELECT2,
38 38
             'select2Options'=>['pluginOptions'=>['allowClear'=>true]],
@@ -43,14 +43,14 @@  discard block
 block discarded – undo
43 43
                 'loadingText' => Yii::t("addressform", "Loading") . "...",
44 44
                 'value' => !is_null($country) ? (new AddressHelper())->formatList($country->getDivisions()) : [],
45 45
             ],
46
-        ]);?>
46
+        ]); ?>
47 47
     <?php else:?>
48 48
         <?= $form->field($model, 'state')->widget(Select2::class, [
49
-            'data'=>  ArrayHelper::map((new AddressHelper())->formatList($country->getDivisions()),'id', 'name'),
49
+            'data'=>  ArrayHelper::map((new AddressHelper())->formatList($country->getDivisions()), 'id', 'name'),
50 50
             'options' => [
51 51
                 'placeholder' => $widget->placeHolders['state'],
52 52
             ],
53
-        ]);?>
54
-    <?php endif;?>
53
+        ]); ?>
54
+    <?php endif; ?>
55 55
     </div>
56 56
 </div>
Please login to merge, or discard this patch.