Completed
Push — master ( b30f8b...b7859f )
by Basil
05:32 queued 17s
created
modules/cmsadmin/blocks/FormBlock.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -84,9 +84,9 @@
 block discarded – undo
84 84
             'email' => Yii::$app->request->post('email'),
85 85
             'mailerResponse' => $this->getPostResponse(),
86 86
             'csrf' => Yii::$app->request->csrfToken,
87
-            'nameErrorFlag' => Yii::$app->request->isPost ? (Yii::$app->request->post('name') ? 1 : 0): 1,
88
-            'emailErrorFlag' => Yii::$app->request->isPost ? (Yii::$app->request->post('email') ? 1 : 0): 1,
89
-            'messageErrorFlag' => Yii::$app->request->isPost ? (Yii::$app->request->post('message') ? 1 : 0): 1,
87
+            'nameErrorFlag' => Yii::$app->request->isPost ? (Yii::$app->request->post('name') ? 1 : 0) : 1,
88
+            'emailErrorFlag' => Yii::$app->request->isPost ? (Yii::$app->request->post('email') ? 1 : 0) : 1,
89
+            'messageErrorFlag' => Yii::$app->request->isPost ? (Yii::$app->request->post('message') ? 1 : 0) : 1,
90 90
         ];
91 91
     }
92 92
 
Please login to merge, or discard this patch.
modules/cmsadmin/blocks/ImageBlock.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -92,8 +92,8 @@
 block discarded – undo
92 92
 
93 93
     public function twigAdmin()
94 94
     {
95
-        $image = '{% if extras.imageAdmin.source %}<p><img src="{{extras.imageAdmin.source}}"{% if cfgs.width %} width="{{cfgs.width}}"{% endif %}{% if cfgs.height %} height="{{cfgs.height}}"{% endif %} border="0" style="max-width: 100%;" /><p>{% else %}<span class="block__empty-text">' . Module::t('block_image_no_image') . '</span>{% endif %}';
96
-        $image.= '{% if vars.caption is not empty %}{{vars.caption}}{% endif %}';
95
+        $image = '{% if extras.imageAdmin.source %}<p><img src="{{extras.imageAdmin.source}}"{% if cfgs.width %} width="{{cfgs.width}}"{% endif %}{% if cfgs.height %} height="{{cfgs.height}}"{% endif %} border="0" style="max-width: 100%;" /><p>{% else %}<span class="block__empty-text">'.Module::t('block_image_no_image').'</span>{% endif %}';
96
+        $image .= '{% if vars.caption is not empty %}{{vars.caption}}{% endif %}';
97 97
 
98 98
         return $image;
99 99
     }
Please login to merge, or discard this patch.
modules/cmsadmin/blocks/LinkButtonBlock.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -82,14 +82,14 @@
 block discarded – undo
82 82
 
83 83
     public function twigFrontend()
84 84
     {
85
-        return '{% if extras.linkTarget is not empty %}<a class="{{ extras.cssClass }}"{% if cfgs.targetBlank == 1  %}target="_blank" ' .
86
-        '{% endif %} href="{{ extras.linkTarget }}">{% if vars.label is not empty %} {{ vars.label }} {% endif %}' .
85
+        return '{% if extras.linkTarget is not empty %}<a class="{{ extras.cssClass }}"{% if cfgs.targetBlank == 1  %}target="_blank" '.
86
+        '{% endif %} href="{{ extras.linkTarget }}">{% if vars.label is not empty %} {{ vars.label }} {% endif %}'.
87 87
         '</a>{% endif %}';
88 88
     }
89 89
 
90 90
     public function twigAdmin()
91 91
     {
92
-        return '<p>' . Module::t('block_link_button_name') . ': {% if vars.linkData is empty %}' . Module::t('block_link_button_empty') . '</p>{% else %}' .
92
+        return '<p>'.Module::t('block_link_button_name').': {% if vars.linkData is empty %}'.Module::t('block_link_button_empty').'</p>{% else %}'.
93 93
         '</p><br/><strong>{% if vars.label is not empty %} {{ vars.label }} {% endif %}</strong>{% endif %}';
94 94
     }
95 95
 }
Please login to merge, or discard this patch.
modules/cmsadmin/blocks/LineBlock.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -26,10 +26,10 @@
 block discarded – undo
26 26
         return [
27 27
            'vars' => [
28 28
                 ['var' => 'lineSpace', 'label' => Module::t('block_line_linespace_label'), 'type' => 'zaa-select', 'options' => [
29
-                    ['value' => '5px', 'label' => '5px ' . Module::t('block_line_linespace_space')],
30
-                    ['value' => '10px', 'label' => '10px ' . Module::t('block_line_linespace_space')],
31
-                    ['value' => '20px', 'label' => '20px ' . Module::t('block_line_linespace_space')],
32
-                    ['value' => '30px', 'label' => '30px ' . Module::t('block_line_linespace_space')],
29
+                    ['value' => '5px', 'label' => '5px '.Module::t('block_line_linespace_space')],
30
+                    ['value' => '10px', 'label' => '10px '.Module::t('block_line_linespace_space')],
31
+                    ['value' => '20px', 'label' => '20px '.Module::t('block_line_linespace_space')],
32
+                    ['value' => '30px', 'label' => '30px '.Module::t('block_line_linespace_space')],
33 33
                 ], 'initvalue' => '5px'],
34 34
                 ['var' => 'lineStyle', 'label' => Module::t('block_line_linestyle_label'), 'type' => 'zaa-select', 'options' => [
35 35
                     ['value' => 'dotted', 'label' => Module::t('block_line_linestyle_dotted')],
Please login to merge, or discard this patch.
modules/cmsadmin/models/Nav.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -120,13 +120,13 @@  discard block
 block discarded – undo
120 120
 
121 121
         switch ($e->name) {
122 122
             case 'afterInsert':
123
-                Log::add(1, "nav.insert, cms_nav.id '" . $this->id . "'", $this->toArray());
123
+                Log::add(1, "nav.insert, cms_nav.id '".$this->id."'", $this->toArray());
124 124
                 break;
125 125
             case 'afterUpdate':
126
-                Log::add(2, "nav.update, cms_nav.id '" . $this->id . "'", $this->toArray());
126
+                Log::add(2, "nav.update, cms_nav.id '".$this->id."'", $this->toArray());
127 127
                 break;
128 128
             case 'afterDelete':
129
-                Log::add(3, "nav.delete, cms_nav.id '" . $this->id . "'", $this->toArray());
129
+                Log::add(3, "nav.delete, cms_nav.id '".$this->id."'", $this->toArray());
130 130
                 break;
131 131
         }
132 132
     }
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
 
228 228
     public function moveUpstairs()
229 229
     {
230
-        $startIndex = (int)$this->sort_index;
230
+        $startIndex = (int) $this->sort_index;
231 231
         foreach (self::find()->where('sort_index >= :index', ['index' => $startIndex])->andWhere(['nav_container_id' => $this->nav_container_id, 'parent_nav_id' => $this->parent_nav_id])->orderBy('sort_index ASC')->asArray()->all() as $item) {
232 232
             ++$startIndex;
233 233
             Yii::$app->db->createCommand()->update(self::tableName(), ['sort_index' => $startIndex], 'id=:id', ['id' => $item['id']])->execute();
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
 
237 237
     public function moveDownstairs()
238 238
     {
239
-        $startIndex = (int)$this->sort_index;
239
+        $startIndex = (int) $this->sort_index;
240 240
         foreach (self::find()->where('sort_index >= :index', ['index' => $startIndex])->andWhere(['nav_container_id' => $this->nav_container_id, 'parent_nav_id' => $this->parent_nav_id])->orderBy('sort_index ASC')->asArray()->all() as $item) {
241 241
             --$startIndex;
242 242
             Yii::$app->db->createCommand()->update(self::tableName(), ['sort_index' => $startIndex], 'id=:id', ['id' => $item['id']])->execute();
Please login to merge, or discard this patch.
modules/cmsadmin/models/NavItemPage.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
             return $data;
77 77
         }
78 78
 
79
-        throw new Exception("Could not find the requested cms layout id '".$this->layout_id."' for nav item page id '". $this->id . "'. Make sure your page does not have an old inactive/deleted cms layout selected.");
79
+        throw new Exception("Could not find the requested cms layout id '".$this->layout_id."' for nav item page id '".$this->id."'. Make sure your page does not have an old inactive/deleted cms layout selected.");
80 80
     }
81 81
     
82 82
     private function setHasCache($key, $value, $expirationTime)
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
                 }
145 145
             }
146 146
             
147
-            $string.= $blockResponse;
147
+            $string .= $blockResponse;
148 148
         }
149 149
 
150 150
         return $string;
Please login to merge, or discard this patch.
modules/cmsadmin/migrations/m141203_143052_cms_cat.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
 {
7 7
     public function up()
8 8
     {
9
-        $this->createTable('cms_cat', [ // renameed to cms_nav_container
9
+        $this->createTable('cms_cat', [// renameed to cms_nav_container
10 10
             'id' => 'pk',
11 11
             'name' => 'VARCHAR(180) NOT NULL',
12 12
             'rewrite' => 'VARCHAR(80) NOT NULL', // renamed to alias
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
             'is_deleted' => 'TINYINT(1) NOT NULL default 0',
16 16
         ]);
17 17
 
18
-        $this->insert('cms_cat', [ // renamed to cms_nav_container
18
+        $this->insert('cms_cat', [// renamed to cms_nav_container
19 19
             'name' => 'Default Container',
20 20
             'rewrite' => 'default', // renmaed to alias
21 21
             'default_nav_id' => 1,
Please login to merge, or discard this patch.
modules/remoteadmin/models/Site.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -69,14 +69,14 @@
 block discarded – undo
69 69
                 $curl->setBasicAuthentication($this->auth_user, $this->auth_pass);
70 70
             }
71 71
             
72
-            $curl->get($url . 'admin/api-admin-remote?token=' . sha1($this->token));
72
+            $curl->get($url.'admin/api-admin-remote?token='.sha1($this->token));
73 73
             if ($curl->error) {
74 74
                 $data = false;
75 75
             } else {
76 76
                 $data = json_decode($curl->response, true);
77 77
             }
78 78
             
79
-            Yii::$app->cache->set($url, $data, (60*2));
79
+            Yii::$app->cache->set($url, $data, (60 * 2));
80 80
         }
81 81
         
82 82
         return $data;
Please login to merge, or discard this patch.
modules/contactform/controllers/DefaultController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -25,10 +25,10 @@
 block discarded – undo
25 25
         if ($model->load(Yii::$app->request->post()) && $model->validate()) {
26 26
             
27 27
             $html = '<h1>Contact Form</h1><p>Submission Date: '.date("d.m.Y H:i").'</p><table border="1">';
28
-            foreach($model->getAttributes() as $key => $value) {
29
-                $html.='<tr><td>'.$model->getAttributeLabel($key).'</td><td>' . nl2br($value) . '</td>';
28
+            foreach ($model->getAttributes() as $key => $value) {
29
+                $html .= '<tr><td>'.$model->getAttributeLabel($key).'</td><td>'.nl2br($value).'</td>';
30 30
             }
31
-            $html.= '</table>';
31
+            $html .= '</table>';
32 32
             
33 33
             $mail = Yii::$app->mail->compose('contactform', $html);
34 34
             $mail->adresses($this->module->recipients);
Please login to merge, or discard this patch.