Completed
Pull Request — develop (#725)
by Agel_Nash
08:07
created
manager/includes/src/Legacy/DeprecatedCore.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -5,10 +5,10 @@
 block discarded – undo
5 5
 class DeprecatedCore implements DeprecatedCoreInterface
6 6
 {
7 7
     /**
8
-    * @deprecated
9
-    *
10
-    * return @void
11
-    */
8
+     * @deprecated
9
+     *
10
+     * return @void
11
+     */
12 12
     public function dbConnect()
13 13
     {
14 14
         $modx = evolutionCMS();
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -119,16 +119,16 @@  discard block
 block discarded – undo
119 119
         for ($i = 0; $i < $tablevel; $i++) {
120 120
             $tabs .= "\t";
121 121
         }
122
-        $listhtml = $ordered == true ? $tabs . "<ol class='$ulroot'$typestr>\n" : $tabs . "<ul class='$ulroot'$typestr>\n";
122
+        $listhtml = $ordered == true ? $tabs."<ol class='$ulroot'$typestr>\n" : $tabs."<ul class='$ulroot'$typestr>\n";
123 123
         foreach ($array as $key => $value) {
124 124
             if (is_array($value)) {
125
-                $listhtml .= $tabs . "\t<li>" . $key . "\n" . $this->makeList($value, $ulprefix . $ulroot, $ulprefix,
126
-                        $type, $ordered, $tablevel + 2) . $tabs . "\t</li>\n";
125
+                $listhtml .= $tabs."\t<li>".$key."\n".$this->makeList($value, $ulprefix.$ulroot, $ulprefix,
126
+                        $type, $ordered, $tablevel + 2).$tabs."\t</li>\n";
127 127
             } else {
128
-                $listhtml .= $tabs . "\t<li>" . $value . "</li>\n";
128
+                $listhtml .= $tabs."\t<li>".$value."</li>\n";
129 129
             }
130 130
         }
131
-        $listhtml .= $ordered == true ? $tabs . "</ol>\n" : $tabs . "</ul>\n";
131
+        $listhtml .= $ordered == true ? $tabs."</ol>\n" : $tabs."</ul>\n";
132 132
 
133 133
         return $listhtml;
134 134
     }
@@ -299,9 +299,9 @@  discard block
 block discarded – undo
299 299
         $msg = addslashes($modx->getDatabase()->escape($msg));
300 300
         if (substr(strtolower($url), 0, 11) == "javascript:") {
301 301
             $act = "__WebAlert();";
302
-            $fnc = "function __WebAlert(){" . substr($url, 11) . "};";
302
+            $fnc = "function __WebAlert(){".substr($url, 11)."};";
303 303
         } else {
304
-            $act = ($url ? "window.location.href='" . addslashes($url) . "';" : "");
304
+            $act = ($url ? "window.location.href='".addslashes($url)."';" : "");
305 305
         }
306 306
         $html = "<script>$fnc window.setTimeout(\"alert('$msg');$act\",100);</script>";
307 307
         if ($modx->isFrontend()) {
Please login to merge, or discard this patch.
manager/includes/src/Legacy/TemplateParser.php 1 patch
Spacing   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -8,46 +8,46 @@  discard block
 block discarded – undo
8 8
      * @param array $data
9 9
      * @return string
10 10
      */
11
-    public function output($config = array(), $data = array()) {
11
+    public function output($config = array(), $data = array()){
12 12
         $modx = evolutionCMS();
13 13
 
14 14
         $output = '';
15 15
         $action = !empty($config['action']) ? $config['action'] : (!empty($_REQUEST['a']) ? $_REQUEST['a'] : '');
16
-        $tab = isset($config['tab']) ? ' AND tab IN(' . $config['tab'] . ')' : '';
16
+        $tab = isset($config['tab']) ? ' AND tab IN('.$config['tab'].')' : '';
17 17
 
18
-        if($action) {
18
+        if ($action) {
19 19
             $sql = $modx->getDatabase()->query('SELECT t1.*, IF(t1.alias=\'\',t1.name,t1.alias) AS alias, t2.category AS category_name
20
-			FROM ' . $modx->getFullTableName('system_templates') . ' AS t1
21
-			INNER JOIN ' . $modx->getFullTableName('categories') . ' AS t2 ON t2.id=t1.category
22
-			WHERE t1.action IN(' . $action . ') ' . $tab . '
20
+			FROM ' . $modx->getFullTableName('system_templates').' AS t1
21
+			INNER JOIN ' . $modx->getFullTableName('categories').' AS t2 ON t2.id=t1.category
22
+			WHERE t1.action IN(' . $action.') '.$tab.'
23 23
 			ORDER BY t1.tab ASC, t1.rank ASC');
24 24
 
25
-            if($modx->getDatabase()->getRecordCount($sql)) {
25
+            if ($modx->getDatabase()->getRecordCount($sql)) {
26 26
                 $tabs = array();
27
-                while($row = $modx->getDatabase()->getRow($sql)) {
28
-                    if(!$row['value'] && !empty($data[$row['name']])) {
27
+                while ($row = $modx->getDatabase()->getRow($sql)) {
28
+                    if (!$row['value'] && !empty($data[$row['name']])) {
29 29
                         $row['value'] = $data[$row['name']];
30 30
                     }
31 31
                     $tabs[$row['tab']]['category_name'] = $row['category_name'];
32 32
                     $tabs[$row['tab']][$row['name']] = $this->render($row);
33 33
                 }
34 34
 
35
-                if(!empty($config['toArray'])) {
35
+                if (!empty($config['toArray'])) {
36 36
                     $output = $tabs;
37 37
                 } else {
38
-                    $output .= '<div class="tab-pane" id="pane_' . $action . '">';
38
+                    $output .= '<div class="tab-pane" id="pane_'.$action.'">';
39 39
                     $output .= '
40 40
 					<script type="text/javascript">
41
-						var pane_' . $action . ' = new WebFXTabPane(document.getElementById("pane_' . $action . '"), ' . ($modx->config['remember_last_tab'] == 1 ? 'true' : 'false') . ');
41
+						var pane_' . $action.' = new WebFXTabPane(document.getElementById("pane_'.$action.'"), '.($modx->config['remember_last_tab'] == 1 ? 'true' : 'false').');
42 42
 					</script>';
43 43
 
44
-                    foreach($tabs as $idTab => $tab) {
45
-                        $output .= '<div class="tab-page" id="tab_' . $action . '_' . $idTab . '">';
44
+                    foreach ($tabs as $idTab => $tab) {
45
+                        $output .= '<div class="tab-page" id="tab_'.$action.'_'.$idTab.'">';
46 46
                         $output .= '
47
-						<h2 class="tab">' . (!empty($config['tabs'][$idTab]) ? $config['tabs'][$idTab] : $tab['category_name']) . '</h2>
48
-						<script type="text/javascript">pane_' . $action . '.addTabPage(document.getElementById("tab_' . $action . '_' . $idTab . '"));</script>';
47
+						<h2 class="tab">' . (!empty($config['tabs'][$idTab]) ? $config['tabs'][$idTab] : $tab['category_name']).'</h2>
48
+						<script type="text/javascript">pane_' . $action.'.addTabPage(document.getElementById("tab_'.$action.'_'.$idTab.'"));</script>';
49 49
                         unset($tab['category_name']);
50
-                        foreach($tab as $item) {
50
+                        foreach ($tab as $item) {
51 51
                             $output .= $item;
52 52
                         }
53 53
                         $output .= '</div>';
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
      * @param array $data
65 65
      * @return string
66 66
      */
67
-    private function render($data) {
67
+    private function render($data){
68 68
         $modx = evolutionCMS(); global $_lang, $_country_lang;
69 69
 
70 70
         $data['lang.name'] = (isset($_lang[$data['alias']]) ? $_lang[$data['alias']] : $data['alias']);
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
         $output = '';
75 75
         $output .= '<div class="form-group row">';
76 76
 
77
-        switch($data['type']) {
77
+        switch ($data['type']) {
78 78
 
79 79
             case 'text':
80 80
                 $output .= '<label class="col-sm-3" for="[+name+]">[+lang.name+]</label>
@@ -108,18 +108,18 @@  discard block
 block discarded – undo
108 108
                 $output .= '<label class="col-sm-3" for="[+name+]">[+lang.name+]</label>';
109 109
                 $output .= '<div class="col-sm-7">';
110 110
                 $output .= '<select name="[+name+]" class="form-control" id="[+name+]" onChange="documentDirty=true;">';
111
-                if($data['name'] == 'country' && isset($_country_lang)) {
111
+                if ($data['name'] == 'country' && isset($_country_lang)) {
112 112
                     $chosenCountry = isset($_POST['country']) ? $_POST['country'] : $data['country'];
113
-                    $output .= '<option value=""' . (!isset($chosenCountry) ? ' selected' : '') . '>&nbsp;</option>';
114
-                    foreach($_country_lang as $key => $value) {
115
-                        $output .= '<option value="' . $key . '"' . (isset($chosenCountry) && $chosenCountry == $key ? ' selected' : '') . '>' . $value . '</option>';
113
+                    $output .= '<option value=""'.(!isset($chosenCountry) ? ' selected' : '').'>&nbsp;</option>';
114
+                    foreach ($_country_lang as $key => $value) {
115
+                        $output .= '<option value="'.$key.'"'.(isset($chosenCountry) && $chosenCountry == $key ? ' selected' : '').'>'.$value.'</option>';
116 116
                     }
117 117
                 } else {
118
-                    if($data['elements']) {
118
+                    if ($data['elements']) {
119 119
                         $elements = explode('||', $data['elements']);
120
-                        foreach($elements as $key => $value) {
120
+                        foreach ($elements as $key => $value) {
121 121
                             $value = explode('==', $value);
122
-                            $output .= '<option value="' . $value[1] . '">' . (isset($_lang[$value[0]]) ? $_lang[$value[0]] : $value[0]) . '</option>';
122
+                            $output .= '<option value="'.$value[1].'">'.(isset($_lang[$value[0]]) ? $_lang[$value[0]] : $value[0]).'</option>';
123 123
                         }
124 124
                     }
125 125
                 }
@@ -133,11 +133,11 @@  discard block
 block discarded – undo
133 133
                 $output .= '<label class="col-sm-3" for="[+name+]">[+lang.name+]</label>';
134 134
                 $output .= '<div class="col-sm-7">';
135 135
                 $output .= '<input type="checkbox" name="[+name+]" class="form-control" id="[+name+]" value="[+value+]" onChange="documentDirty=true;"[+readonly+] />';
136
-                if($data['elements']) {
136
+                if ($data['elements']) {
137 137
                     $elements = explode('||', $data['elements']);
138
-                    foreach($elements as $key => $value) {
138
+                    foreach ($elements as $key => $value) {
139 139
                         $value = explode('==', $value);
140
-                        $output .= '<br /><input type="checkbox" name="' . $value[0] . '" class="form-control" id="' . $value[0] . '" value="' . $value[1] . '" onChange="documentDirty=true;"[+readonly+] /> ' . (isset($_lang[$value[0]]) ? $_lang[$value[0]] : $value[0]);
140
+                        $output .= '<br /><input type="checkbox" name="'.$value[0].'" class="form-control" id="'.$value[0].'" value="'.$value[1].'" onChange="documentDirty=true;"[+readonly+] /> '.(isset($_lang[$value[0]]) ? $_lang[$value[0]] : $value[0]);
141 141
                     }
142 142
                 }
143 143
                 $output .= $data['content'];
@@ -149,11 +149,11 @@  discard block
 block discarded – undo
149 149
                 $output .= '<label class="col-sm-3" for="[+name+]">[+lang.name+]</label>';
150 150
                 $output .= '<div class="col-sm-7">';
151 151
                 $output .= '<input type="radio" name="[+name+]" class="form-control" id="[+name+]" value="[+value+]" onChange="documentDirty=true;"[+readonly+] />';
152
-                if($data['elements']) {
152
+                if ($data['elements']) {
153 153
                     $elements = explode('||', $data['elements']);
154
-                    foreach($elements as $key => $value) {
154
+                    foreach ($elements as $key => $value) {
155 155
                         $value = explode('==', $value);
156
-                        $output .= '<br /><input type="radio" name="[+name+]" class="form-control" id="[+name+]_' . $key . '" value="' . $value[1] . '" onChange="documentDirty=true;"[+readonly+] /> ' . (isset($_lang[$value[0]]) ? $_lang[$value[0]] : $value[0]);
156
+                        $output .= '<br /><input type="radio" name="[+name+]" class="form-control" id="[+name+]_'.$key.'" value="'.$value[1].'" onChange="documentDirty=true;"[+readonly+] /> '.(isset($_lang[$value[0]]) ? $_lang[$value[0]] : $value[0]);
157 157
                     }
158 158
                 }
159 159
                 $output .= $data['content'];
Please login to merge, or discard this patch.
manager/includes/src/Legacy/ModuleCategoriesManager.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -85,8 +85,8 @@  discard block
 block discarded – undo
85 85
     {
86 86
         global $_lang, $_style;
87 87
 
88
-        $filename = trim($view_name) . '.tpl.phtml';
89
-        $file = self::get('views_dir') . $filename;
88
+        $filename = trim($view_name).'.tpl.phtml';
89
+        $file = self::get('views_dir').$filename;
90 90
         $view = &$this;
91 91
 
92 92
         if (is_file($file)
@@ -111,14 +111,14 @@  discard block
 block discarded – undo
111 111
     {
112 112
 
113 113
         $_update = array(
114
-            'id'       => (int)$element_id,
115
-            'category' => (int)$category_id
114
+            'id'       => (int) $element_id,
115
+            'category' => (int) $category_id
116 116
         );
117 117
 
118 118
         $this->getDatabase()->update(
119 119
             $_update,
120 120
             $this->db_tbl[$element],
121
-            "`id` = '" . (int)$element_id . "'"
121
+            "`id` = '".(int) $element_id."'"
122 122
         );
123 123
 
124 124
         return $this->getDatabase()->getAffectedRows() === 1;
Please login to merge, or discard this patch.
manager/includes/src/Exceptions/ServiceNotFoundException.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,4 +2,6 @@
 block discarded – undo
2 2
 
3 3
 use Exception;
4 4
 
5
-class ServiceNotFoundException extends Exception{}
5
+class ServiceNotFoundException extends Exception
6
+{
7
+}
Please login to merge, or discard this patch.
manager/includes/src/Exceptions/ContainerException.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,4 +2,6 @@
 block discarded – undo
2 2
 
3 3
 use Exception;
4 4
 
5
-class ContainerException extends Exception{}
5
+class ContainerException extends Exception
6
+{
7
+}
Please login to merge, or discard this patch.
manager/includes/src/Interfaces/ManagerApiInterface.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,3 +1,5 @@
 block discarded – undo
1 1
 <?php namespace EvolutionCMS\Interfaces;
2 2
 
3
-interface ManagerApiInterface{}
3
+interface ManagerApiInterface
4
+{
5
+}
Please login to merge, or discard this patch.
manager/includes/src/Interfaces/ServiceProviderInterface.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,3 +1,5 @@
 block discarded – undo
1 1
 <?php namespace EvolutionCMS\Interfaces;
2 2
 
3
-interface ServiceProviderInterface{}
3
+interface ServiceProviderInterface
4
+{
5
+}
Please login to merge, or discard this patch.
manager/includes/src/Interfaces/PasswordHashInterface.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,3 +1,5 @@
 block discarded – undo
1 1
 <?php namespace EvolutionCMS\Interfaces;
2 2
 
3
-interface PasswordHashInterface{}
3
+interface PasswordHashInterface
4
+{
5
+}
Please login to merge, or discard this patch.
manager/includes/src/Cache.php 1 patch
Spacing   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
         if (isset($this->aliases[$id])) {
98 98
             if ($this->aliasVisible[$id] == 1) {
99 99
                 if ($path != '') {
100
-                    $path = $this->aliases[$id] . '/' . $path;
100
+                    $path = $this->aliases[$id].'/'.$path;
101 101
                 } else {
102 102
                     $path = $this->aliases[$id];
103 103
                 }
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
             $modx->messageQuit("Cache path not set.");
122 122
         }
123 123
 
124
-        $files = glob(realpath($this->cachePath) . '/*.pageCache.php');
124
+        $files = glob(realpath($this->cachePath).'/*.pageCache.php');
125 125
         $filesincache = count($files);
126 126
         $deletedfiles = array();
127 127
         while ($file = array_shift($files)) {
@@ -156,9 +156,9 @@  discard block
 block discarded – undo
156 156
                 if (isset($opcache)) {
157 157
                     echo '<p>Opcache empty.</p>';
158 158
                 }
159
-                echo '<p>' . $_lang['cache_files_deleted'] . '</p><ul>';
159
+                echo '<p>'.$_lang['cache_files_deleted'].'</p><ul>';
160 160
                 foreach ($deletedfiles as $deletedfile) {
161
-                    echo '<li>' . $deletedfile . '</li>';
161
+                    echo '<li>'.$deletedfile.'</li>';
162 162
                 }
163 163
                 echo '</ul>';
164 164
             }
@@ -177,11 +177,11 @@  discard block
 block discarded – undo
177 177
 
178 178
 
179 179
         // write the file
180
-        $content = '<?php' . "\n";
181
-        $content .= '$recent_update=\'' . $this->request_time . '\';' . "\n";
182
-        $content .= '$cacheRefreshTime=\'' . $cacheRefreshTime . '\';' . "\n";
180
+        $content = '<?php'."\n";
181
+        $content .= '$recent_update=\''.$this->request_time.'\';'."\n";
182
+        $content .= '$cacheRefreshTime=\''.$cacheRefreshTime.'\';'."\n";
183 183
 
184
-        $filename = $this->cachePath . '/sitePublishing.idx.php';
184
+        $filename = $this->cachePath.'/sitePublishing.idx.php';
185 185
         if (!$handle = fopen($filename, 'w')) {
186 186
             exit("Cannot open file ({$filename}");
187 187
         }
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
         $timesArr = array();
206 206
 
207 207
         $result = $modx->getDatabase()->select('MIN(pub_date) AS minpub', '[+prefix+]site_content',
208
-            'pub_date>' . $this->request_time);
208
+            'pub_date>'.$this->request_time);
209 209
         if (!$result) {
210 210
             echo "Couldn't determine next publish event!";
211 211
         }
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
         }
217 217
 
218 218
         $result = $modx->getDatabase()->select('MIN(unpub_date) AS minunpub', '[+prefix+]site_content',
219
-            'unpub_date>' . $this->request_time);
219
+            'unpub_date>'.$this->request_time);
220 220
         if (!$result) {
221 221
             echo "Couldn't determine next unpublish event!";
222 222
         }
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
         $config = array();
256 256
         $content .= '$c=&$this->config;';
257 257
         while (list($key, $value) = $modx->getDatabase()->getRow($rs, 'num')) {
258
-            $content .= '$c[\'' . $key . '\']="' . $this->escapeDoubleQuotes($value) . '";';
258
+            $content .= '$c[\''.$key.'\']="'.$this->escapeDoubleQuotes($value).'";';
259 259
             $config[$key] = $value;
260 260
         }
261 261
 
@@ -293,23 +293,23 @@  discard block
 block discarded – undo
293 293
             $docid = $doc['id'];
294 294
             if ($use_alias_path) {
295 295
                 $tmpPath = $this->getParents($doc['parent']);
296
-                $alias = (strlen($tmpPath) > 0 ? "$tmpPath/" : '') . $doc['alias'];
296
+                $alias = (strlen($tmpPath) > 0 ? "$tmpPath/" : '').$doc['alias'];
297 297
                 $key = $alias;
298 298
             } else {
299 299
                 $key = $doc['alias'];
300 300
             }
301 301
 
302 302
             $doc['path'] = $tmpPath;
303
-            $content .= '$a[' . $docid . ']=array(\'id\'=>' . $docid . ',\'alias\'=>\'' . $doc['alias'] . '\',\'path\'=>\'' . $doc['path'] . '\',\'parent\'=>' . $doc['parent'] . ',\'isfolder\'=>' . $doc['isfolder'] . ',\'alias_visible\'=>' . $doc['alias_visible'] . ');';
304
-            $content .= '$d[\'' . $key . '\']=' . $docid . ';';
305
-            $content .= '$m[]=array(' . $doc['parent'] . '=>' . $docid . ');';
303
+            $content .= '$a['.$docid.']=array(\'id\'=>'.$docid.',\'alias\'=>\''.$doc['alias'].'\',\'path\'=>\''.$doc['path'].'\',\'parent\'=>'.$doc['parent'].',\'isfolder\'=>'.$doc['isfolder'].',\'alias_visible\'=>'.$doc['alias_visible'].');';
304
+            $content .= '$d[\''.$key.'\']='.$docid.';';
305
+            $content .= '$m[]=array('.$doc['parent'].'=>'.$docid.');';
306 306
         }
307 307
 
308 308
         // get content types
309 309
         $rs = $modx->getDatabase()->select('id, contentType', '[+prefix+]site_content', "contentType!='text/html'");
310 310
         $content .= '$c=&$this->contentTypes;';
311 311
         while ($doc = $modx->getDatabase()->getRow($rs)) {
312
-            $content .= '$c[\'' . $doc['id'] . '\']=\'' . $doc['contentType'] . '\';';
312
+            $content .= '$c[\''.$doc['id'].'\']=\''.$doc['contentType'].'\';';
313 313
         }
314 314
 
315 315
         // WRITE Chunks to cache file
@@ -319,7 +319,7 @@  discard block
 block discarded – undo
319 319
             if ($modx->config['minifyphp_incache']) {
320 320
                 $doc['snippet'] = $this->php_strip_whitespace($doc['snippet']);
321 321
             }
322
-            $content .= '$c[\'' . $doc['name'] . '\']=\'' . ($doc['disabled'] ? '' : $this->escapeSingleQuotes($doc['snippet'])) . '\';';
322
+            $content .= '$c[\''.$doc['name'].'\']=\''.($doc['disabled'] ? '' : $this->escapeSingleQuotes($doc['snippet'])).'\';';
323 323
         }
324 324
 
325 325
         // WRITE snippets to cache file
@@ -330,18 +330,18 @@  discard block
 block discarded – undo
330 330
         while ($row = $modx->getDatabase()->getRow($rs)) {
331 331
             $key = $row['name'];
332 332
             if ($row['disabled']) {
333
-                $content .= '$s[\'' . $key . '\']=\'return false;\';';
333
+                $content .= '$s[\''.$key.'\']=\'return false;\';';
334 334
             } else {
335 335
                 $value = trim($row['snippet']);
336 336
                 if ($modx->config['minifyphp_incache']) {
337 337
                     $value = $this->php_strip_whitespace($value);
338 338
                 }
339
-                $content .= '$s[\'' . $key . '\']=\'' . $this->escapeSingleQuotes($value) . '\';';
339
+                $content .= '$s[\''.$key.'\']=\''.$this->escapeSingleQuotes($value).'\';';
340 340
                 $properties = $modx->parseProperties($row['properties']);
341 341
                 $sharedproperties = $modx->parseProperties($row['sharedproperties']);
342 342
                 $properties = array_merge($sharedproperties, $properties);
343 343
                 if (0 < count($properties)) {
344
-                    $content .= '$s[\'' . $key . 'Props\']=\'' . $this->escapeSingleQuotes(json_encode($properties)) . '\';';
344
+                    $content .= '$s[\''.$key.'Props\']=\''.$this->escapeSingleQuotes(json_encode($properties)).'\';';
345 345
                 }
346 346
             }
347 347
         }
@@ -359,13 +359,13 @@  discard block
 block discarded – undo
359 359
             if ($modx->config['minifyphp_incache']) {
360 360
                 $value = $this->php_strip_whitespace($value);
361 361
             }
362
-            $content .= '$p[\'' . $key . '\']=\'' . $this->escapeSingleQuotes($value) . '\';';
362
+            $content .= '$p[\''.$key.'\']=\''.$this->escapeSingleQuotes($value).'\';';
363 363
             if ($row['properties'] != '' || $row['sharedproperties'] != '') {
364 364
                 $properties = $modx->parseProperties($row['properties']);
365 365
                 $sharedproperties = $modx->parseProperties($row['sharedproperties']);
366 366
                 $properties = array_merge($sharedproperties, $properties);
367 367
                 if (0 < count($properties)) {
368
-                    $content .= '$p[\'' . $key . 'Props\']=\'' . $this->escapeSingleQuotes(json_encode($properties)) . '\';';
368
+                    $content .= '$p[\''.$key.'Props\']=\''.$this->escapeSingleQuotes(json_encode($properties)).'\';';
369 369
                 }
370 370
             }
371 371
         }
@@ -388,14 +388,14 @@  discard block
 block discarded – undo
388 388
         }
389 389
         foreach ($events as $evtname => $pluginnames) {
390 390
             $events[$evtname] = $pluginnames;
391
-            $content .= '$e[\'' . $evtname . '\']=array(\'' . implode('\',\'',
392
-                    $this->escapeSingleQuotes($pluginnames)) . '\');';
391
+            $content .= '$e[\''.$evtname.'\']=array(\''.implode('\',\'',
392
+                    $this->escapeSingleQuotes($pluginnames)).'\');';
393 393
         }
394 394
 
395 395
         $content .= "\n";
396 396
 
397 397
         // close and write the file
398
-        $filename = $this->cachePath . 'siteCache.idx.php';
398
+        $filename = $this->cachePath.'siteCache.idx.php';
399 399
 
400 400
         // invoke OnBeforeCacheUpdate event
401 401
         if ($modx) {
@@ -406,8 +406,8 @@  discard block
 block discarded – undo
406 406
             exit("Cannot write main MODX cache file! Make sure the assets/cache directory is writable!");
407 407
         }
408 408
 
409
-        if (!is_file($this->cachePath . '/.htaccess')) {
410
-            file_put_contents($this->cachePath . '/.htaccess', "order deny,allow\ndeny from all\n");
409
+        if (!is_file($this->cachePath.'/.htaccess')) {
410
+            file_put_contents($this->cachePath.'/.htaccess', "order deny,allow\ndeny from all\n");
411 411
         }
412 412
 
413 413
         // invoke OnCacheUpdate event
@@ -429,7 +429,7 @@  discard block
 block discarded – undo
429 429
 
430 430
         $source = trim($source);
431 431
         if (substr($source, 0, 5) !== '<?php') {
432
-            $source = '<?php ' . $source;
432
+            $source = '<?php '.$source;
433 433
         }
434 434
 
435 435
         $tokens = token_get_all($source);
@@ -487,7 +487,7 @@  discard block
 block discarded – undo
487 487
             }
488 488
         }
489 489
         $source = preg_replace(array('@^<\?php@i', '|\s+|', '|<!--|', '|-->|', '|-->\s+<!--|'),
490
-            array('', ' ', "\n" . '<!--', '-->' . "\n", '-->' . "\n" . '<!--'), $_);
490
+            array('', ' ', "\n".'<!--', '-->'."\n", '-->'."\n".'<!--'), $_);
491 491
         $source = trim($source);
492 492
 
493 493
         return $source;
Please login to merge, or discard this patch.