Passed
Push — master ( df5a4b...5938e5 )
by Rodrigo
02:10 queued 40s
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   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
     public $options = [];
12 12
     public $filterOptions = [];
13 13
 
14
-    public function init ()
14
+    public function init()
15 15
     {
16 16
         $this->format = ['date', $this->format];
17 17
         $this->filter = \yii\jui\DatePicker::widget([
Please login to merge, or discard this patch.