Passed
Push — master ( 01a3c8...def57d )
by Rodrigo
02:34
created
src/grid/ActionColumn.php 2 patches
Spacing   +4 added lines, -4 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');
@@ -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.
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.