Completed
Push — develop ( cb7ecf...5e631f )
by Dmytro
17s
created
manager/includes/src/Core.php 1 patch
Doc Comments   +26 added lines, -24 removed lines patch added patch discarded remove patch
@@ -212,7 +212,6 @@  discard block
 block discarded – undo
212 212
 
213 213
     /**
214 214
      * @param array $services
215
-     * @param array $parameters
216 215
      */
217 216
     public function __construct(array $services = array())
218 217
     {
@@ -282,6 +281,9 @@  discard block
 block discarded – undo
282 281
         return $service;
283 282
     }
284 283
 
284
+    /**
285
+     * @param string $name
286
+     */
285 287
     private function checkServiceAlias($name){
286 288
         foreach ($this->providerAliases as $alias => $interface) {
287 289
             if($name === $interface) {
@@ -319,7 +321,7 @@  discard block
 block discarded – undo
319 321
      *
320 322
      * @param object $service         The service.
321 323
      * @param string $name            The service name.
322
-     * @param array  $callDefinitions The service calls definition.
324
+     * @param boolean  $callDefinitions The service calls definition.
323 325
      *
324 326
      * @throws Exceptions\ContainerException On failure.
325 327
      */
@@ -561,7 +563,7 @@  discard block
 block discarded – undo
561 563
      * @param int $count_attempts
562 564
      * @param string $type $type
563 565
      * @param string $responseCode
564
-     * @return bool|null
566
+     * @return false|null
565 567
      * @global string $base_url
566 568
      * @global string $site_url
567 569
      */
@@ -1262,7 +1264,7 @@  discard block
 block discarded – undo
1262 1264
     }
1263 1265
 
1264 1266
     /**
1265
-     * @param $contents
1267
+     * @param string $contents
1266 1268
      * @return mixed
1267 1269
      */
1268 1270
     public function RecoveryEscapedTags($contents)
@@ -1286,7 +1288,7 @@  discard block
 block discarded – undo
1286 1288
     }
1287 1289
 
1288 1290
     /**
1289
-     * @param $tstart
1291
+     * @param double $tstart
1290 1292
      * @return array
1291 1293
      */
1292 1294
     public function getTimerStats($tstart)
@@ -2052,7 +2054,7 @@  discard block
 block discarded – undo
2052 2054
 
2053 2055
     /**
2054 2056
      * Remove Comment-Tags from output like <!--@- Comment -@-->
2055
-     * @param $content
2057
+     * @param string $content
2056 2058
      * @param string $left
2057 2059
      * @param string $right
2058 2060
      * @return mixed
@@ -2228,7 +2230,7 @@  discard block
 block discarded – undo
2228 2230
     /**
2229 2231
      * Run snippets as per the tags in $documentSource and replace the tags with the returned values.
2230 2232
      *
2231
-     * @param $content
2233
+     * @param string $content
2232 2234
      * @return string
2233 2235
      * @internal param string $documentSource
2234 2236
      */
@@ -3263,7 +3265,7 @@  discard block
 block discarded – undo
3263 3265
 
3264 3266
     /**
3265 3267
      * @param $templateID
3266
-     * @return mixed
3268
+     * @return string
3267 3269
      */
3268 3270
     public function _getTemplateCodeFromDB($templateID)
3269 3271
     {
@@ -3306,7 +3308,7 @@  discard block
 block discarded – undo
3306 3308
     /**
3307 3309
      * @param $id
3308 3310
      * @param int $top
3309
-     * @return mixed
3311
+     * @return string
3310 3312
      */
3311 3313
     public function getUltimateParentId($id, $top = 0)
3312 3314
     {
@@ -3646,7 +3648,7 @@  discard block
 block discarded – undo
3646 3648
      *
3647 3649
      * @param int $type Types: 1=template, 2=tv, 3=chunk, 4=snippet, 5=plugin, 6=module, 7=resource, 8=role
3648 3650
      * @param int $id Element- / Resource-id
3649
-     * @return bool
3651
+     * @return false|null
3650 3652
      */
3651 3653
     public function lockElement($type, $id)
3652 3654
     {
@@ -3668,7 +3670,7 @@  discard block
 block discarded – undo
3668 3670
      * @param int $type Types: 1=template, 2=tv, 3=chunk, 4=snippet, 5=plugin, 6=module, 7=resource, 8=role
3669 3671
      * @param int $id Element- / Resource-id
3670 3672
      * @param bool $includeAllUsers true = Deletes not only own user-locks
3671
-     * @return bool
3673
+     * @return false|null
3672 3674
      */
3673 3675
     public function unlockElement($type, $id, $includeAllUsers = false)
3674 3676
     {
@@ -4181,7 +4183,7 @@  discard block
 block discarded – undo
4181 4183
      *                     Default: 1
4182 4184
      * @param string $fields List of fields
4183 4185
      *                       Default: id, pagetitle, description, alias
4184
-     * @return boolean|array
4186
+     * @return string
4185 4187
      */
4186 4188
     public function getPageInfo($pageid = -1, $active = 1, $fields = 'id, pagetitle, description, alias')
4187 4189
     {
@@ -4273,7 +4275,7 @@  discard block
 block discarded – undo
4273 4275
      *
4274 4276
      * @param string $type
4275 4277
      * @param bool $report
4276
-     * @return bool
4278
+     * @return boolean|null
4277 4279
      */
4278 4280
     public function clearCache($type = '', $report = false)
4279 4281
     {
@@ -4639,7 +4641,7 @@  discard block
 block discarded – undo
4639 4641
      * - Placeholders prefix. Default: '{'.
4640 4642
      * @param string $suffix {string}
4641 4643
      * - Placeholders suffix. Default: '}'.
4642
-     * @return bool|mixed|string {string; false} - Parsed chunk or false if $chunkArr is not array.
4644
+     * @return false|string {string; false} - Parsed chunk or false if $chunkArr is not array.
4643 4645
      * - Parsed chunk or false if $chunkArr is not array.
4644 4646
      */
4645 4647
     public function parseChunk($chunkName, $chunkArr, $prefix = '{', $suffix = '}')
@@ -5611,7 +5613,7 @@  discard block
 block discarded – undo
5611 5613
      * Remove event listener - only for use within the current execution cycle
5612 5614
      *
5613 5615
      * @param string $evtName
5614
-     * @return boolean
5616
+     * @return false|null
5615 5617
      */
5616 5618
     public function removeEventListener($evtName)
5617 5619
     {
@@ -5635,7 +5637,7 @@  discard block
 block discarded – undo
5635 5637
      *
5636 5638
      * @param string $evtName
5637 5639
      * @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.
5638
-     * @return boolean|array
5640
+     * @return false|null
5639 5641
      */
5640 5642
     public function invokeEvent($evtName, $extParams = array())
5641 5643
     {
@@ -6280,7 +6282,7 @@  discard block
 block discarded – undo
6280 6282
 
6281 6283
     /**
6282 6284
      * @param string $str
6283
-     * @return bool|mixed|string
6285
+     * @return string
6284 6286
      */
6285 6287
     public function atBindFileContent($str = '')
6286 6288
     {
@@ -6331,8 +6333,8 @@  discard block
 block discarded – undo
6331 6333
     }
6332 6334
 
6333 6335
     /**
6334
-     * @param $str
6335
-     * @return bool|string
6336
+     * @param string $str
6337
+     * @return false|string
6336 6338
      */
6337 6339
     public function getExtFromFilename($str)
6338 6340
     {
@@ -6360,7 +6362,7 @@  discard block
 block discarded – undo
6360 6362
      * @param string $text Error message
6361 6363
      * @param string $file File where the error was detected
6362 6364
      * @param string $line Line number within $file
6363
-     * @return boolean
6365
+     * @return boolean|null
6364 6366
      */
6365 6367
     public function phpError($nr, $text, $file, $line)
6366 6368
     {
@@ -6412,7 +6414,7 @@  discard block
 block discarded – undo
6412 6414
      * @param string $text
6413 6415
      * @param string $line
6414 6416
      * @param string $output
6415
-     * @return bool
6417
+     * @return null|boolean
6416 6418
      */
6417 6419
     public function messageQuit($msg = 'unspecified error', $query = '', $is_error = true, $nr = '', $file = '', $source = '', $text = '', $line = '', $output = '')
6418 6420
     {
@@ -6827,7 +6829,7 @@  discard block
 block discarded – undo
6827 6829
 
6828 6830
     /**
6829 6831
      * @param string $str
6830
-     * @return bool|mixed|string
6832
+     * @return string
6831 6833
      */
6832 6834
     public function atBindInclude($str = '')
6833 6835
     {
@@ -6878,7 +6880,7 @@  discard block
 block discarded – undo
6878 6880
      * @param $str
6879 6881
      * @param int $flags
6880 6882
      * @param string $encode
6881
-     * @return mixed
6883
+     * @return null|string
6882 6884
      */
6883 6885
     public function htmlspecialchars($str, $flags = ENT_COMPAT, $encode = '')
6884 6886
     {
@@ -6886,7 +6888,7 @@  discard block
 block discarded – undo
6886 6888
     }
6887 6889
 
6888 6890
     /**
6889
-     * @param $string
6891
+     * @param string $string
6890 6892
      * @param bool $returnData
6891 6893
      * @return bool|mixed
6892 6894
      */
Please login to merge, or discard this patch.
manager/includes/src/Database.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -371,7 +371,7 @@  discard block
 block discarded – undo
371 371
 
372 372
     /**
373 373
      * @param $fields
374
-     * @param $table
374
+     * @param string $table
375 375
      * @param string $where
376 376
      * @return bool|mixed|mysqli_result
377 377
      */
@@ -516,7 +516,7 @@  discard block
 block discarded – undo
516 516
     }
517 517
 
518 518
     /**
519
-     * @param $name
519
+     * @param string $name
520 520
      * @param mysqli_result|string $dsq
521 521
      * @return array
522 522
      */
Please login to merge, or discard this patch.
manager/includes/src/Support/DataSetPager.php 1 patch
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -33,6 +33,9 @@  discard block
 block discarded – undo
33 33
     public $renderPagerFncArgs;
34 34
     public static $dataSetPagerCnt;
35 35
 
36
+    /**
37
+     * @param boolean|string $id
38
+     */
36 39
     public function __construct($id, $ds, $pageSize = 10, $pageNumber = -1) {
37 40
 		global $_PAGE; // use view state object
38 41
 
@@ -77,6 +80,9 @@  discard block
 block discarded – undo
77 80
 		$this->pageSize = $ps;
78 81
 	}
79 82
 
83
+    /**
84
+     * @param DataGrid $fncName
85
+     */
80 86
     public function setRenderRowFnc($fncName, $args = "") {
81 87
 		$this->renderRowFnc = &$fncName;
82 88
 		$this->renderRowFncArgs = $args;    // extra agruments
Please login to merge, or discard this patch.
manager/actions/mutate_plugin.dynamic.php 1 patch
Switch Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -4,18 +4,18 @@
 block discarded – undo
4 4
 }
5 5
 
6 6
 switch ($modx->getManagerApi()->action) {
7
-    case 102:
8
-        if (!$modx->hasPermission('edit_plugin')) {
9
-            $modx->webAlertAndQuit($_lang["error_no_privileges"]);
10
-        }
11
-        break;
12
-    case 101:
13
-        if (!$modx->hasPermission('new_plugin')) {
7
+        case 102:
8
+            if (!$modx->hasPermission('edit_plugin')) {
9
+                $modx->webAlertAndQuit($_lang["error_no_privileges"]);
10
+            }
11
+            break;
12
+        case 101:
13
+            if (!$modx->hasPermission('new_plugin')) {
14
+                $modx->webAlertAndQuit($_lang["error_no_privileges"]);
15
+            }
16
+            break;
17
+        default:
14 18
             $modx->webAlertAndQuit($_lang["error_no_privileges"]);
15
-        }
16
-        break;
17
-    default:
18
-        $modx->webAlertAndQuit($_lang["error_no_privileges"]);
19 19
 }
20 20
 
21 21
 $id = isset($_REQUEST['id']) ? (int)$_REQUEST['id'] : 0;
Please login to merge, or discard this patch.
manager/actions/mutate_web_user.dynamic.php 1 patch
Switch Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -4,18 +4,18 @@
 block discarded – undo
4 4
 }
5 5
 
6 6
 switch($modx->getManagerApi()->action) {
7
-	case 88:
8
-		if(!$modx->hasPermission('edit_web_user')) {
9
-			$modx->webAlertAndQuit($_lang["error_no_privileges"]);
10
-		}
11
-		break;
12
-	case 87:
13
-		if(!$modx->hasPermission('new_web_user')) {
14
-			$modx->webAlertAndQuit($_lang["error_no_privileges"]);
15
-		}
16
-		break;
17
-	default:
18
-		$modx->webAlertAndQuit($_lang["error_no_privileges"]);
7
+	    case 88:
8
+		    if(!$modx->hasPermission('edit_web_user')) {
9
+			    $modx->webAlertAndQuit($_lang["error_no_privileges"]);
10
+		    }
11
+		    break;
12
+	    case 87:
13
+		    if(!$modx->hasPermission('new_web_user')) {
14
+			    $modx->webAlertAndQuit($_lang["error_no_privileges"]);
15
+		    }
16
+		    break;
17
+	    default:
18
+		    $modx->webAlertAndQuit($_lang["error_no_privileges"]);
19 19
 }
20 20
 
21 21
 $user = isset($_REQUEST['id']) ? (int)$_REQUEST['id'] : 0;
Please login to merge, or discard this patch.
manager/actions/mutate_templates.dynamic.php 1 patch
Switch Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -4,18 +4,18 @@
 block discarded – undo
4 4
 }
5 5
 
6 6
 switch($modx->getManagerApi()->action) {
7
-	case 16:
8
-		if(!$modx->hasPermission('edit_template')) {
9
-			$modx->webAlertAndQuit($_lang["error_no_privileges"]);
10
-		}
11
-		break;
12
-	case 19:
13
-		if(!$modx->hasPermission('new_template')) {
14
-			$modx->webAlertAndQuit($_lang["error_no_privileges"]);
15
-		}
16
-		break;
17
-	default:
18
-		$modx->webAlertAndQuit($_lang["error_no_privileges"]);
7
+	    case 16:
8
+		    if(!$modx->hasPermission('edit_template')) {
9
+			    $modx->webAlertAndQuit($_lang["error_no_privileges"]);
10
+		    }
11
+		    break;
12
+	    case 19:
13
+		    if(!$modx->hasPermission('new_template')) {
14
+			    $modx->webAlertAndQuit($_lang["error_no_privileges"]);
15
+		    }
16
+		    break;
17
+	    default:
18
+		    $modx->webAlertAndQuit($_lang["error_no_privileges"]);
19 19
 }
20 20
 
21 21
 $id = isset($_REQUEST['id']) ? (int)$_REQUEST['id'] : 0;
Please login to merge, or discard this patch.
manager/actions/mutate_snippet.dynamic.php 1 patch
Switch Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -4,18 +4,18 @@
 block discarded – undo
4 4
 }
5 5
 
6 6
 switch ($modx->getManagerApi()->action) {
7
-    case 22:
8
-        if (!$modx->hasPermission('edit_snippet')) {
9
-            $modx->webAlertAndQuit($_lang["error_no_privileges"]);
10
-        }
11
-        break;
12
-    case 23:
13
-        if (!$modx->hasPermission('new_snippet')) {
7
+        case 22:
8
+            if (!$modx->hasPermission('edit_snippet')) {
9
+                $modx->webAlertAndQuit($_lang["error_no_privileges"]);
10
+            }
11
+            break;
12
+        case 23:
13
+            if (!$modx->hasPermission('new_snippet')) {
14
+                $modx->webAlertAndQuit($_lang["error_no_privileges"]);
15
+            }
16
+            break;
17
+        default:
14 18
             $modx->webAlertAndQuit($_lang["error_no_privileges"]);
15
-        }
16
-        break;
17
-    default:
18
-        $modx->webAlertAndQuit($_lang["error_no_privileges"]);
19 19
 }
20 20
 
21 21
 $id = isset($_REQUEST['id']) ? (int)$_REQUEST['id'] : 0;
Please login to merge, or discard this patch.
manager/actions/mutate_module.dynamic.php 1 patch
Switch Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -3,18 +3,18 @@
 block discarded – undo
3 3
 	die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
4 4
 }
5 5
 switch($modx->getManagerApi()->action) {
6
-	case 107:
7
-		if(!$modx->hasPermission('new_module')) {
8
-			$modx->webAlertAndQuit($_lang["error_no_privileges"]);
9
-		}
10
-		break;
11
-	case 108:
12
-		if(!$modx->hasPermission('edit_module')) {
13
-			$modx->webAlertAndQuit($_lang["error_no_privileges"]);
14
-		}
15
-		break;
16
-	default:
17
-		$modx->webAlertAndQuit($_lang["error_no_privileges"]);
6
+	    case 107:
7
+		    if(!$modx->hasPermission('new_module')) {
8
+			    $modx->webAlertAndQuit($_lang["error_no_privileges"]);
9
+		    }
10
+		    break;
11
+	    case 108:
12
+		    if(!$modx->hasPermission('edit_module')) {
13
+			    $modx->webAlertAndQuit($_lang["error_no_privileges"]);
14
+		    }
15
+		    break;
16
+	    default:
17
+		    $modx->webAlertAndQuit($_lang["error_no_privileges"]);
18 18
 }
19 19
 $id = isset($_REQUEST['id']) ? (int)$_REQUEST['id'] : 0;
20 20
 // Get table names (alphabetical)
Please login to merge, or discard this patch.
manager/actions/mutate_user.dynamic.php 1 patch
Switch Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -4,18 +4,18 @@
 block discarded – undo
4 4
 }
5 5
 
6 6
 switch($modx->getManagerApi()->action) {
7
-	case 12:
8
-		if(!$modx->hasPermission('edit_user')) {
9
-			$modx->webAlertAndQuit($_lang["error_no_privileges"]);
10
-		}
11
-		break;
12
-	case 11:
13
-		if(!$modx->hasPermission('new_user')) {
14
-			$modx->webAlertAndQuit($_lang["error_no_privileges"]);
15
-		}
16
-		break;
17
-	default:
18
-		$modx->webAlertAndQuit($_lang["error_no_privileges"]);
7
+	    case 12:
8
+		    if(!$modx->hasPermission('edit_user')) {
9
+			    $modx->webAlertAndQuit($_lang["error_no_privileges"]);
10
+		    }
11
+		    break;
12
+	    case 11:
13
+		    if(!$modx->hasPermission('new_user')) {
14
+			    $modx->webAlertAndQuit($_lang["error_no_privileges"]);
15
+		    }
16
+		    break;
17
+	    default:
18
+		    $modx->webAlertAndQuit($_lang["error_no_privileges"]);
19 19
 }
20 20
 
21 21
 $user = isset($_REQUEST['id']) ? (int)$_REQUEST['id'] : 0;
Please login to merge, or discard this patch.