Passed
Push — master ( 5938e5...3abaf0 )
by Rodrigo
01:26
created
src/grid/ActionColumn.php 2 patches
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -36,11 +36,9 @@
 block discarded – undo
36 36
 
37 37
         if(!$this->controller && !$this->action){
38 38
             $this->action = "{action}";
39
-        }
40
-        else if ($this->controller && !$this->action){
39
+        } else if ($this->controller && !$this->action){
41 40
             $this->action = "{controller}/{action}";
42
-        }
43
-        else if (!$this->controller && $this->action) {
41
+        } else if (!$this->controller && $this->action) {
44 42
             $this->controller = Yii::$app->controller->id;
45 43
         }
46 44
     }
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -34,10 +34,10 @@  discard block
 block discarded – undo
34 34
         parent::init();
35 35
         ActionColumnAsset::register(Yii::$app->view);
36 36
 
37
-        if(!$this->controller && !$this->action){
37
+        if (!$this->controller && !$this->action) {
38 38
             $this->action = "{action}";
39 39
         }
40
-        else if ($this->controller && !$this->action){
40
+        else if ($this->controller && !$this->action) {
41 41
             $this->action = "{controller}/{action}";
42 42
         }
43 43
         else if (!$this->controller && $this->action) {
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
     protected function initDefaultButton($name, $iconName, $additionalOptions = [])
63 63
     {
64 64
         if (!isset($this->buttons[$name]) && strpos($this->template, '{' . $name . '}') !== false) {
65
-            $this->buttons[$name] = function ($url, $model, $key) use ($name, $iconName, $additionalOptions) {
65
+            $this->buttons[$name] = function($url, $model, $key) use ($name, $iconName, $additionalOptions) {
66 66
                 switch ($name) {
67 67
                     case 'go': 
68 68
                         $title = Yii::t('yii', 'Redirect');
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
                             $url = Url::to(["{$this->controller}/view", 'id' => $model->id, 'slug' => $model->getAttribute('slug')], true);
75 75
                         }
76 76
 
77
-                        $url = preg_replace(['#'.Yii::$app->request->baseUrl.'#'], $this->baseUrl, $url, 1);
77
+                        $url = preg_replace(['#' . Yii::$app->request->baseUrl . '#'], $this->baseUrl, $url, 1);
78 78
                         break;
79 79
                     case 'view':
80 80
                         $title = Yii::t('yii', 'View');
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
         }
107 107
 
108 108
         $params = is_array($key) ? $key : ['id' => (string) $key];
109
-        $params = array_merge($params, is_array($this->action)? $this->action: [0 => $this->action]);
109
+        $params = array_merge($params, is_array($this->action) ? $this->action : [0 => $this->action]);
110 110
         $params[0] = strtr($params[0], [
111 111
             '{controller}' => $this->controller,
112 112
             '{action}' => $action
Please login to merge, or discard this patch.
src/grid/DateColumn.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,9 +30,9 @@
 block discarded – undo
30 30
     
31 31
     public $filterOptions = [];
32 32
 
33
-    public function init ()
33
+    public function init()
34 34
     {
35
-        $this->format = empty($this->format_raw)? ['date', $this->format]: $this->format_raw;
35
+        $this->format = empty($this->format_raw) ? ['date', $this->format] : $this->format_raw;
36 36
         $this->filter = \yii\jui\DatePicker::widget([
37 37
             'model'=> $this->grid->filterModel,
38 38
             'attribute' => $this->attribute,
Please login to merge, or discard this patch.