Completed
Pull Request — develop (#709)
by Agel_Nash
08:54 queued 02:41
created
manager/includes/document.parser.class.inc.php 1 patch
Doc Comments   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -276,7 +276,7 @@  discard block
 block discarded – undo
276 276
      * MODX_MANAGER_PATH."includes/extenders/ex_{$extname}.inc.php"
277 277
      * $extname - extension name in lowercase
278 278
      *
279
-     * @param $extname
279
+     * @param string $extname
280 280
      * @param bool $reload
281 281
      * @return bool
282 282
      */
@@ -319,7 +319,7 @@  discard block
 block discarded – undo
319 319
      * @param int $count_attempts
320 320
      * @param string $type $type
321 321
      * @param string $responseCode
322
-     * @return bool|null
322
+     * @return false|null
323 323
      * @global string $base_url
324 324
      * @global string $site_url
325 325
      */
@@ -1021,7 +1021,7 @@  discard block
 block discarded – undo
1021 1021
     }
1022 1022
 
1023 1023
     /**
1024
-     * @param $contents
1024
+     * @param string $contents
1025 1025
      * @return mixed
1026 1026
      */
1027 1027
     public function RecoveryEscapedTags($contents)
@@ -1045,7 +1045,7 @@  discard block
 block discarded – undo
1045 1045
     }
1046 1046
 
1047 1047
     /**
1048
-     * @param $tstart
1048
+     * @param double $tstart
1049 1049
      * @return array
1050 1050
      */
1051 1051
     public function getTimerStats($tstart)
@@ -1813,7 +1813,7 @@  discard block
 block discarded – undo
1813 1813
 
1814 1814
     /**
1815 1815
      * Remove Comment-Tags from output like <!--@- Comment -@-->
1816
-     * @param $content
1816
+     * @param string $content
1817 1817
      * @param string $left
1818 1818
      * @param string $right
1819 1819
      * @return mixed
@@ -1986,7 +1986,7 @@  discard block
 block discarded – undo
1986 1986
     /**
1987 1987
      * Run snippets as per the tags in $documentSource and replace the tags with the returned values.
1988 1988
      *
1989
-     * @param $content
1989
+     * @param string $content
1990 1990
      * @return string
1991 1991
      * @internal param string $documentSource
1992 1992
      */
@@ -3023,7 +3023,7 @@  discard block
 block discarded – undo
3023 3023
 
3024 3024
     /**
3025 3025
      * @param $templateID
3026
-     * @return mixed
3026
+     * @return string
3027 3027
      */
3028 3028
     public function _getTemplateCodeFromDB($templateID)
3029 3029
     {
@@ -3066,7 +3066,7 @@  discard block
 block discarded – undo
3066 3066
     /**
3067 3067
      * @param $id
3068 3068
      * @param int $top
3069
-     * @return mixed
3069
+     * @return string
3070 3070
      */
3071 3071
     public function getUltimateParentId($id, $top = 0)
3072 3072
     {
@@ -3397,7 +3397,7 @@  discard block
 block discarded – undo
3397 3397
      *
3398 3398
      * @param int $type Types: 1=template, 2=tv, 3=chunk, 4=snippet, 5=plugin, 6=module, 7=resource, 8=role
3399 3399
      * @param int $id Element- / Resource-id
3400
-     * @return bool
3400
+     * @return false|null
3401 3401
      */
3402 3402
     public function lockElement($type, $id)
3403 3403
     {
@@ -3419,7 +3419,7 @@  discard block
 block discarded – undo
3419 3419
      * @param int $type Types: 1=template, 2=tv, 3=chunk, 4=snippet, 5=plugin, 6=module, 7=resource, 8=role
3420 3420
      * @param int $id Element- / Resource-id
3421 3421
      * @param bool $includeAllUsers true = Deletes not only own user-locks
3422
-     * @return bool
3422
+     * @return false|null
3423 3423
      */
3424 3424
     public function unlockElement($type, $id, $includeAllUsers = false)
3425 3425
     {
@@ -3527,7 +3527,7 @@  discard block
 block discarded – undo
3527 3527
      * @param array $params
3528 3528
      * @param string $msg
3529 3529
      * @param array $files
3530
-     * @return mixed
3530
+     * @return boolean
3531 3531
      */
3532 3532
     public function sendmail($params = array(), $msg = '', $files = array())
3533 3533
     {
@@ -3931,7 +3931,7 @@  discard block
 block discarded – undo
3931 3931
      *                     Default: 1
3932 3932
      * @param string $fields List of fields
3933 3933
      *                       Default: id, pagetitle, description, alias
3934
-     * @return boolean|array
3934
+     * @return string
3935 3935
      */
3936 3936
     public function getPageInfo($pageid = -1, $active = 1, $fields = 'id, pagetitle, description, alias')
3937 3937
     {
@@ -4023,7 +4023,7 @@  discard block
 block discarded – undo
4023 4023
      *
4024 4024
      * @param string $type
4025 4025
      * @param bool $report
4026
-     * @return bool
4026
+     * @return boolean|null
4027 4027
      */
4028 4028
     public function clearCache($type = '', $report = false)
4029 4029
     {
@@ -4390,7 +4390,7 @@  discard block
 block discarded – undo
4390 4390
      * - Placeholders prefix. Default: '{'.
4391 4391
      * @param string $suffix {string}
4392 4392
      * - Placeholders suffix. Default: '}'.
4393
-     * @return bool|mixed|string {string; false} - Parsed chunk or false if $chunkArr is not array.
4393
+     * @return false|string {string; false} - Parsed chunk or false if $chunkArr is not array.
4394 4394
      * - Parsed chunk or false if $chunkArr is not array.
4395 4395
      */
4396 4396
     public function parseChunk($chunkName, $chunkArr, $prefix = '{', $suffix = '}')
@@ -5366,7 +5366,7 @@  discard block
 block discarded – undo
5366 5366
      * Remove event listener - only for use within the current execution cycle
5367 5367
      *
5368 5368
      * @param string $evtName
5369
-     * @return boolean
5369
+     * @return false|null
5370 5370
      */
5371 5371
     public function removeEventListener($evtName)
5372 5372
     {
@@ -5390,7 +5390,7 @@  discard block
 block discarded – undo
5390 5390
      *
5391 5391
      * @param string $evtName
5392 5392
      * @param array $extParams Parameters available to plugins. Each array key will be the PHP variable name, and the array value will be the variable value.
5393
-     * @return boolean|array
5393
+     * @return false|null
5394 5394
      */
5395 5395
     public function invokeEvent($evtName, $extParams = array())
5396 5396
     {
@@ -5985,7 +5985,7 @@  discard block
 block discarded – undo
5985 5985
 
5986 5986
     /**
5987 5987
      * @param string $str
5988
-     * @return bool|mixed|string
5988
+     * @return string
5989 5989
      */
5990 5990
     public function atBindFileContent($str = '')
5991 5991
     {
@@ -6036,8 +6036,8 @@  discard block
 block discarded – undo
6036 6036
     }
6037 6037
 
6038 6038
     /**
6039
-     * @param $str
6040
-     * @return bool|string
6039
+     * @param string $str
6040
+     * @return false|string
6041 6041
      */
6042 6042
     public function getExtFromFilename($str)
6043 6043
     {
@@ -6065,7 +6065,7 @@  discard block
 block discarded – undo
6065 6065
      * @param string $text Error message
6066 6066
      * @param string $file File where the error was detected
6067 6067
      * @param string $line Line number within $file
6068
-     * @return boolean
6068
+     * @return boolean|null
6069 6069
      */
6070 6070
     public function phpError($nr, $text, $file, $line)
6071 6071
     {
@@ -6117,7 +6117,7 @@  discard block
 block discarded – undo
6117 6117
      * @param string $text
6118 6118
      * @param string $line
6119 6119
      * @param string $output
6120
-     * @return bool
6120
+     * @return null|boolean
6121 6121
      */
6122 6122
     public function messageQuit($msg = 'unspecified error', $query = '', $is_error = true, $nr = '', $file = '', $source = '', $text = '', $line = '', $output = '')
6123 6123
     {
@@ -6539,7 +6539,7 @@  discard block
 block discarded – undo
6539 6539
 
6540 6540
     /**
6541 6541
      * @param string $str
6542
-     * @return bool|mixed|string
6542
+     * @return string
6543 6543
      */
6544 6544
     public function atBindInclude($str = '')
6545 6545
     {
@@ -6590,7 +6590,7 @@  discard block
 block discarded – undo
6590 6590
      * @param $str
6591 6591
      * @param int $flags
6592 6592
      * @param string $encode
6593
-     * @return mixed
6593
+     * @return string
6594 6594
      */
6595 6595
     public function htmlspecialchars($str, $flags = ENT_COMPAT, $encode = '')
6596 6596
     {
@@ -6599,7 +6599,7 @@  discard block
 block discarded – undo
6599 6599
     }
6600 6600
 
6601 6601
     /**
6602
-     * @param $string
6602
+     * @param string $string
6603 6603
      * @param bool $returnData
6604 6604
      * @return bool|mixed
6605 6605
      */
@@ -6763,7 +6763,7 @@  discard block
 block discarded – undo
6763 6763
     }
6764 6764
 
6765 6765
     /**
6766
-     * @return mixed
6766
+     * @return string
6767 6767
      */
6768 6768
     public function getOutput()
6769 6769
     {
Please login to merge, or discard this patch.
manager/includes/header.inc.php 2 patches
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -20,28 +20,28 @@  discard block
 block discarded – undo
20 20
 $body_class = '';
21 21
 $theme_modes = array('', 'lightness', 'light', 'dark', 'darkness');
22 22
 if (!empty($theme_modes[$_COOKIE['MODX_themeMode']])) {
23
-    $body_class .= ' ' . $theme_modes[$_COOKIE['MODX_themeMode']];
23
+    $body_class .= ' '.$theme_modes[$_COOKIE['MODX_themeMode']];
24 24
 } elseif (!empty($theme_modes[$modx->config['manager_theme_mode']])) {
25
-    $body_class .= ' ' . $theme_modes[$modx->config['manager_theme_mode']];
25
+    $body_class .= ' '.$theme_modes[$modx->config['manager_theme_mode']];
26 26
 }
27 27
 
28
-$css = 'media/style/' . $modx->config['manager_theme'] . '/style.css?v=' . $lastInstallTime;
28
+$css = 'media/style/'.$modx->config['manager_theme'].'/style.css?v='.$lastInstallTime;
29 29
 
30 30
 if ($modx->config['manager_theme'] == 'default') {
31
-    if (!file_exists(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css')
32
-        && is_writable(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css')) {
31
+    if (!file_exists(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/styles.min.css')
32
+        && is_writable(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css')) {
33 33
         $files = array(
34
-            'bootstrap' => MODX_MANAGER_PATH . 'media/style/common/bootstrap/css/bootstrap.min.css',
35
-            'font-awesome' => MODX_MANAGER_PATH . 'media/style/common/font-awesome/css/font-awesome.min.css',
36
-            'fonts' => MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/fonts.css',
37
-            'forms' => MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/forms.css',
38
-            'mainmenu' => MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/mainmenu.css',
39
-            'tree' => MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/tree.css',
40
-            'custom' => MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/custom.css',
41
-            'tabpane' => MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/tabpane.css',
42
-            'contextmenu' => MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/contextmenu.css',
43
-            'index' => MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/index.css',
44
-            'main' => MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/main.css'
34
+            'bootstrap' => MODX_MANAGER_PATH.'media/style/common/bootstrap/css/bootstrap.min.css',
35
+            'font-awesome' => MODX_MANAGER_PATH.'media/style/common/font-awesome/css/font-awesome.min.css',
36
+            'fonts' => MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/fonts.css',
37
+            'forms' => MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/forms.css',
38
+            'mainmenu' => MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/mainmenu.css',
39
+            'tree' => MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/tree.css',
40
+            'custom' => MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/custom.css',
41
+            'tabpane' => MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/tabpane.css',
42
+            'contextmenu' => MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/contextmenu.css',
43
+            'index' => MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/index.css',
44
+            'main' => MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/main.css'
45 45
         );
46 46
         $evtOut = $modx->invokeEvent('OnBeforeMinifyCss', array(
47 47
             'files' => $files,
@@ -58,16 +58,16 @@  discard block
 block discarded – undo
58 58
             default:
59 59
                 $modx->webAlertAndQuit(sprintf($_lang['invalid_event_response'], 'OnBeforeMinifyManagerCss'));
60 60
         }
61
-        require_once MODX_BASE_PATH . 'assets/lib/Formatter/CSSMinify.php';
61
+        require_once MODX_BASE_PATH.'assets/lib/Formatter/CSSMinify.php';
62 62
         $minifier = new Formatter\CSSMinify($files);
63 63
         $css = $minifier->minify();
64 64
         file_put_contents(
65
-            MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css',
65
+            MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/styles.min.css',
66 66
             $css
67 67
         );
68 68
     }
69
-    if (file_exists(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css')) {
70
-        $css = 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css?v=' . $lastInstallTime;
69
+    if (file_exists(MODX_MANAGER_PATH.'media/style/'.$modx->config['manager_theme'].'/css/styles.min.css')) {
70
+        $css = 'media/style/'.$modx->config['manager_theme'].'/css/styles.min.css?v='.$lastInstallTime;
71 71
     }
72 72
 }
73 73
 
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
     <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
83 83
     <link rel="stylesheet" type="text/css" href="<?= $css ?>"/>
84 84
     <script type="text/javascript" src="media/script/tabpane.js"></script>
85
-    <?= sprintf('<script type="text/javascript" src="%s"></script>' . "\n", $modx->config['mgr_jquery_path']) ?>
85
+    <?= sprintf('<script type="text/javascript" src="%s"></script>'."\n", $modx->config['mgr_jquery_path']) ?>
86 86
     <?php if ($modx->config['show_picker'] != "0") { ?>
87 87
         <script src="media/style/<?= $modx->config['manager_theme'] ?>/js/color.switcher.js"
88 88
                 type="text/javascript"></script>
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
     <?php } ?>
96 96
 
97 97
     <!-- OnManagerMainFrameHeaderHTMLBlock -->
98
-    <?= $onManagerMainFrameHeaderHTMLBlock . "\n" ?>
98
+    <?= $onManagerMainFrameHeaderHTMLBlock."\n" ?>
99 99
 
100 100
     <script type="text/javascript">
101 101
       if (!evo) {
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
     <script>
126 126
         <?php
127 127
         if (isset($_REQUEST['r']) && preg_match('@^[0-9]+$@', $_REQUEST['r'])) {
128
-            echo 'doRefresh(' . $_REQUEST['r'] . ");\n";
128
+            echo 'doRefresh('.$_REQUEST['r'].");\n";
129 129
         }
130 130
         ?>
131 131
     </script>
Please login to merge, or discard this patch.
Braces   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
2
+if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
3 3
     die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />
4 4
     Please use the EVO Content Manager instead of accessing this file directly.");
5 5
 }
@@ -10,26 +10,26 @@  discard block
 block discarded – undo
10 10
 $modx_textdir = isset($modx_textdir) ? $modx_textdir : null;
11 11
 $onManagerMainFrameHeaderHTMLBlock = is_array($evtOut) ? implode("\n", $evtOut) : '';
12 12
 $textdir = $modx_textdir === 'rtl' ? 'rtl' : 'ltr';
13
-if (!isset($modx->config['mgr_jquery_path'])) {
13
+if (!isset($modx->config['mgr_jquery_path'])) {
14 14
     $modx->config['mgr_jquery_path'] = 'media/script/jquery/jquery.min.js';
15 15
 }
16
-if (!isset($modx->config['mgr_date_picker_path'])) {
16
+if (!isset($modx->config['mgr_date_picker_path'])) {
17 17
     $modx->config['mgr_date_picker_path'] = 'media/script/air-datepicker/datepicker.inc.php';
18 18
 }
19 19
 
20 20
 $body_class = '';
21 21
 $theme_modes = array('', 'lightness', 'light', 'dark', 'darkness');
22
-if (!empty($theme_modes[$_COOKIE['MODX_themeMode']])) {
22
+if (!empty($theme_modes[$_COOKIE['MODX_themeMode']])) {
23 23
     $body_class .= ' ' . $theme_modes[$_COOKIE['MODX_themeMode']];
24
-} elseif (!empty($theme_modes[$modx->config['manager_theme_mode']])) {
24
+} elseif (!empty($theme_modes[$modx->config['manager_theme_mode']])) {
25 25
     $body_class .= ' ' . $theme_modes[$modx->config['manager_theme_mode']];
26 26
 }
27 27
 
28 28
 $css = 'media/style/' . $modx->config['manager_theme'] . '/style.css?v=' . $lastInstallTime;
29 29
 
30
-if ($modx->config['manager_theme'] == 'default') {
30
+if ($modx->config['manager_theme'] == 'default') {
31 31
     if (!file_exists(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css')
32
-        && is_writable(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css')) {
32
+        && is_writable(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css')) {
33 33
         $files = array(
34 34
             'bootstrap' => MODX_MANAGER_PATH . 'media/style/common/bootstrap/css/bootstrap.min.css',
35 35
             'font-awesome' => MODX_MANAGER_PATH . 'media/style/common/font-awesome/css/font-awesome.min.css',
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
             'source' => 'manager',
49 49
             'theme' => $modx->config['manager_theme']
50 50
         ));
51
-        switch (true) {
51
+        switch (true) {
52 52
             case empty($evtOut):
53 53
             case is_array($evtOut) && count($evtOut) === 0:
54 54
                 break;
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
             $css
67 67
         );
68 68
     }
69
-    if (file_exists(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css')) {
69
+    if (file_exists(MODX_MANAGER_PATH . 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css')) {
70 70
         $css = 'media/style/' . $modx->config['manager_theme'] . '/css/styles.min.css?v=' . $lastInstallTime;
71 71
     }
72 72
 }
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
     <script src="media/script/main.js"></script>
125 125
     <script>
126 126
         <?php
127
-        if (isset($_REQUEST['r']) && preg_match('@^[0-9]+$@', $_REQUEST['r'])) {
127
+        if (isset($_REQUEST['r']) && preg_match('@^[0-9]+$@', $_REQUEST['r'])) {
128 128
             echo 'doRefresh(' . $_REQUEST['r'] . ");\n";
129 129
         }
130 130
         ?>
Please login to merge, or discard this patch.