Passed
Push — master ( b19ee7...39be8f )
by Rodrigo
03:07
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   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -36,10 +36,10 @@  discard block
 block discarded – undo
36 36
         parent::init();
37 37
         ActionColumnAsset::register(Yii::$app->view);
38 38
 
39
-        if(!$this->controller && !$this->action){
39
+        if (!$this->controller && !$this->action) {
40 40
             $this->action = "{action}";
41 41
         }
42
-        else if ($this->controller && !$this->action){
42
+        else if ($this->controller && !$this->action) {
43 43
             $this->action = "{controller}/{action}";
44 44
         }
45 45
         else if (!$this->controller && $this->action) {
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
     protected function initDefaultButton($name, $iconName, $additionalOptions = [])
65 65
     {
66 66
         if (!isset($this->buttons[$name]) && strpos($this->template, '{' . $name . '}') !== false) {
67
-            $this->buttons[$name] = function ($url, $model, $key) use ($name, $iconName, $additionalOptions) {
67
+            $this->buttons[$name] = function($url, $model, $key) use ($name, $iconName, $additionalOptions) {
68 68
                 switch ($name) {
69 69
                     case 'go': 
70 70
                         $title = Yii::t('yii', 'Redirect');
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
                             $url = Url::to(["{$this->controller}/view", 'id' => $model->id, 'slug' => $model->getAttribute('slug')], true);
77 77
                         }
78 78
 
79
-                        $url = preg_replace(['#'.Yii::$app->request->baseUrl.'#'], $this->baseUrl, $url, 1);
79
+                        $url = preg_replace(['#' . Yii::$app->request->baseUrl . '#'], $this->baseUrl, $url, 1);
80 80
                         break;
81 81
                     case 'view':
82 82
                         $title = Yii::t('yii', 'View');
@@ -108,8 +108,8 @@  discard block
 block discarded – undo
108 108
         }
109 109
 
110 110
         $params = is_array($key) ? $key : ['id' => (string) $key];
111
-        $params = isset($this->modelClass)?array_merge($params, ['modelClass' => $this->modelClass]):$params;
112
-        $params = array_merge($params, is_array($this->action)? $this->action: [0 => $this->action]);
111
+        $params = isset($this->modelClass) ?array_merge($params, ['modelClass' => $this->modelClass]) : $params;
112
+        $params = array_merge($params, is_array($this->action) ? $this->action : [0 => $this->action]);
113 113
         $params[0] = strtr($params[0], [
114 114
             '{controller}' => $this->controller,
115 115
             '{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
@@ -34,9 +34,9 @@
 block discarded – undo
34 34
 
35 35
     public $placeholder = 'Selecione {attribute}';
36 36
 
37
-    public function init ()
37
+    public function init()
38 38
     {
39
-        $this->format = empty($this->format_raw)? ['date', $this->format]: $this->format_raw;
39
+        $this->format = empty($this->format_raw) ? ['date', $this->format] : $this->format_raw;
40 40
         $this->placeholder = strtr(Yii::t('app', $this->placeholder), ['{attribute}' => $this->grid->filterModel->getAttributeLabel($this->attribute)]);
41 41
         $this->filter = \yii\jui\DatePicker::widget([
42 42
             'model'=> $this->grid->filterModel,
Please login to merge, or discard this patch.