Passed
Push — 1.10.x ( ef00db...25211a )
by Yannick
279:14 queued 234:31
created
main/auth/cas/authcas.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
 require_once api_get_path(SYS_PATH) . 'main/auth/external_login/functions.inc.php';
11 11
 
12 12
 /**
13
- * @return true if cas is configured
13
+ * @return boolean if cas is configured
14 14
  *
15 15
  **/
16 16
 function cas_configured()
Please login to merge, or discard this patch.
main/auth/cas/lib/CAS.php 1 patch
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -523,7 +523,7 @@  discard block
 block discarded – undo
523 523
     /**
524 524
      * Logs a string in debug mode.
525 525
      *
526
-     * @param $str the string to write
526
+     * @param string $str the string to write
527 527
      *
528 528
      * @private
529 529
      */
@@ -545,7 +545,7 @@  discard block
 block discarded – undo
545 545
      * This method is used by interface methods to print an error and where the function
546 546
      * was originally called from.
547 547
      *
548
-     * @param $msg the message to print
548
+     * @param string $msg the message to print
549 549
      *
550 550
      * @private
551 551
      */
@@ -678,7 +678,7 @@  discard block
 block discarded – undo
678 678
     /**
679 679
      * This method returns the phpCAS version.
680 680
      *
681
-     * @return the phpCAS version.
681
+     * @return string phpCAS version.
682 682
      */
683 683
     function getVersion()
684 684
     {
@@ -1105,7 +1105,7 @@  discard block
 block discarded – undo
1105 1105
      * @warning should not be called only after phpCAS::forceAuthentication()
1106 1106
      * or phpCAS::checkAuthentication().
1107 1107
      *
1108
-     * @return the login name of the authenticated user
1108
+     * @return string login name of the authenticated user
1109 1109
      */
1110 1110
     function getUser()
1111 1111
     {
Please login to merge, or discard this patch.
main/auth/cas/lib/CAS/client.php 1 patch
Doc Comments   +41 added lines, -39 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
      *
74 74
      * Used by CASClient::PrintHTMLHeader() and CASClient::printHTMLFooter().
75 75
      *
76
-     * @param $str the string to filter and output
76
+     * @param string $str the string to filter and output
77 77
      *
78 78
      * @private
79 79
      */
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
     /**
186 186
      * This method returns the language used by phpCAS.
187 187
      *
188
-     * @return a string representing the language
188
+     * @return string string representing the language
189 189
      *
190 190
      * @private
191 191
      */
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
     /**
212 212
      * This method returns a string depending on the language.
213 213
      *
214
-     * @param $str the index of the string in $_string.
214
+     * @param integer $str the index of the string in $_string.
215 215
      *
216 216
      * @return the string corresponding to $index in $string.
217 217
      *
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
      * This method is used to set the language used by phpCAS.
233 233
      * @note Can be called only once.
234 234
      *
235
-     * @param $lang a string representing the language.
235
+     * @param string $lang a string representing the language.
236 236
      *
237 237
      * @public
238 238
      * @sa CAS_LANG_FRENCH, CAS_LANG_ENGLISH
@@ -426,7 +426,7 @@  discard block
 block discarded – undo
426 426
 
427 427
     /**
428 428
      * This method is used to retrieve the service validating URL of the CAS server.
429
-     * @return a URL.
429
+     * @return string URL.
430 430
      * @private
431 431
      */
432 432
     function getServerServiceValidateURL()
@@ -448,7 +448,7 @@  discard block
 block discarded – undo
448 448
 
449 449
     /**
450 450
      * This method is used to retrieve the SAML validating URL of the CAS server.
451
-     * @return a URL.
451
+     * @return string URL.
452 452
      * @private
453 453
      */
454 454
     function getServerSamlValidateURL()
@@ -468,7 +468,7 @@  discard block
 block discarded – undo
468 468
 
469 469
     /**
470 470
      * This method is used to retrieve the proxy validating URL of the CAS server.
471
-     * @return a URL.
471
+     * @return string URL.
472 472
      * @private
473 473
      */
474 474
     function getServerProxyValidateURL()
@@ -549,7 +549,7 @@  discard block
 block discarded – undo
549 549
 
550 550
     /**
551 551
      * This method checks to see if the request is secured via HTTPS
552
-     * @return true if https, false otherwise
552
+     * @return boolean if https, false otherwise
553 553
      * @private
554 554
      */
555 555
     function isHttps()
@@ -570,7 +570,7 @@  discard block
 block discarded – undo
570 570
      * CASClient constructor.
571 571
      *
572 572
      * @param $server_version the version of the CAS server
573
-     * @param $proxy TRUE if the CAS client is a CAS proxy, FALSE otherwise
573
+     * @param boolean $proxy TRUE if the CAS client is a CAS proxy, FALSE otherwise
574 574
      * @param $server_hostname the hostname of the CAS server
575 575
      * @param $server_port the port the CAS server is running on
576 576
      * @param $server_uri the URI the CAS server is responding on
@@ -778,7 +778,7 @@  discard block
 block discarded – undo
778 778
      * @warning should be called only after CASClient::forceAuthentication() or
779 779
      * CASClient::isAuthenticated(), otherwise halt with an error.
780 780
      *
781
-     * @return the login name of the authenticated user
781
+     * @return string login name of the authenticated user
782 782
      */
783 783
     function getUser()
784 784
     {
@@ -860,7 +860,7 @@  discard block
 block discarded – undo
860 860
     /**
861 861
      * This method is called to be sure that the user is authenticated. When not
862 862
      * authenticated, halt by redirecting to the CAS server; otherwise return TRUE.
863
-     * @return TRUE when the user is authenticated; otherwise halt.
863
+     * @return boolean when the user is authenticated; otherwise halt.
864 864
      * @public
865 865
      */
866 866
     function forceAuthentication()
@@ -906,7 +906,7 @@  discard block
 block discarded – undo
906 906
 
907 907
     /**
908 908
      * This method is called to check whether the user is authenticated or not.
909
-     * @return TRUE when the user is authenticated, FALSE otherwise.
909
+     * @return boolean when the user is authenticated, FALSE otherwise.
910 910
      * @public
911 911
      */
912 912
     function checkAuthentication()
@@ -960,7 +960,7 @@  discard block
 block discarded – undo
960 960
      * This method is called to check if the user is authenticated (previously or by
961 961
      * tickets given in the URL).
962 962
      *
963
-     * @return TRUE when the user is authenticated. Also may redirect to the same URL without the ticket.
963
+     * @return boolean when the user is authenticated. Also may redirect to the same URL without the ticket.
964 964
      *
965 965
      * @public
966 966
      */
@@ -1026,7 +1026,7 @@  discard block
 block discarded – undo
1026 1026
 
1027 1027
     /**
1028 1028
      * This method tells if the current session is authenticated.
1029
-     * @return true if authenticated based soley on $_SESSION variable
1029
+     * @return boolean if authenticated based soley on $_SESSION variable
1030 1030
      * @since 0.4.22 by Brendan Arnold
1031 1031
      */
1032 1032
     function isSessionAuthenticated()
@@ -1040,7 +1040,7 @@  discard block
 block discarded – undo
1040 1040
      *
1041 1041
      * @note This function switches to callback mode when needed.
1042 1042
      *
1043
-     * @return TRUE when the user has already been authenticated; FALSE otherwise.
1043
+     * @return boolean when the user has already been authenticated; FALSE otherwise.
1044 1044
      *
1045 1045
      * @private
1046 1046
      */
@@ -1154,7 +1154,7 @@  discard block
 block discarded – undo
1154 1154
     }
1155 1155
 
1156 1156
     /**
1157
-     * @return true if the current request is a logout request.
1157
+     * @return boolean if the current request is a logout request.
1158 1158
      * @private
1159 1159
      */
1160 1160
     function isLogoutRequest()
@@ -1270,7 +1270,7 @@  discard block
 block discarded – undo
1270 1270
 
1271 1271
     /**
1272 1272
      * This method returns the Service Ticket provided in the URL of the request.
1273
-     * @return The service ticket.
1273
+     * @return string service ticket.
1274 1274
      * @private
1275 1275
      */
1276 1276
     function getST()
@@ -1290,7 +1290,7 @@  discard block
 block discarded – undo
1290 1290
 
1291 1291
     /**
1292 1292
      * This method tells if a Service Ticket was stored.
1293
-     * @return TRUE if a Service Ticket has been stored.
1293
+     * @return boolean if a Service Ticket has been stored.
1294 1294
      * @private
1295 1295
      */
1296 1296
     function hasST()
@@ -1365,7 +1365,7 @@  discard block
 block discarded – undo
1365 1365
      * $text_reponse and $tree_response on success. These parameters are used later
1366 1366
      * by CASClient::validatePGT() for CAS proxies.
1367 1367
      * Used for all CAS 1.0 validations
1368
-     * @param $validate_url the URL of the request to the CAS server.
1368
+     * @param string $validate_url the URL of the request to the CAS server.
1369 1369
      * @param $text_response the response of the CAS server, as is (XML text).
1370 1370
      * @param $tree_response the response of the CAS server, as a DOM XML tree.
1371 1371
      *
@@ -1497,7 +1497,7 @@  discard block
 block discarded – undo
1497 1497
      * $text_reponse and $tree_response on success. These parameters are used later
1498 1498
      * by CASClient::validatePGT() for CAS proxies.
1499 1499
      *
1500
-     * @param $validate_url the URL of the request to the CAS server.
1500
+     * @param string $validate_url the URL of the request to the CAS server.
1501 1501
      * @param $text_response the response of the CAS server, as is (XML text).
1502 1502
      * @param $tree_response the response of the CAS server, as a DOM XML tree.
1503 1503
      *
@@ -1684,7 +1684,7 @@  discard block
 block discarded – undo
1684 1684
 
1685 1685
     /**
1686 1686
      * This method returns the Proxy Granting Ticket given by the CAS server.
1687
-     * @return The Proxy Granting Ticket.
1687
+     * @return string Proxy Granting Ticket.
1688 1688
      * @private
1689 1689
      */
1690 1690
     function getPGT()
@@ -1704,7 +1704,7 @@  discard block
 block discarded – undo
1704 1704
 
1705 1705
     /**
1706 1706
      * This method tells if a Proxy Granting Ticket was stored.
1707
-     * @return TRUE if a Proxy Granting Ticket has been stored.
1707
+     * @return boolean if a Proxy Granting Ticket has been stored.
1708 1708
      * @private
1709 1709
      */
1710 1710
     function hasPGT()
@@ -1739,7 +1739,7 @@  discard block
 block discarded – undo
1739 1739
     /**
1740 1740
      * This method sets/unsets callback mode.
1741 1741
      *
1742
-     * @param $callback_mode TRUE to set callback mode, FALSE otherwise.
1742
+     * @param boolean $callback_mode TRUE to set callback mode, FALSE otherwise.
1743 1743
      *
1744 1744
      * @private
1745 1745
      */
@@ -1752,7 +1752,7 @@  discard block
 block discarded – undo
1752 1752
      * This method returns TRUE when the CAs client is running i callback mode,
1753 1753
      * FALSE otherwise.
1754 1754
      *
1755
-     * @return A boolean.
1755
+     * @return boolean boolean.
1756 1756
      *
1757 1757
      * @private
1758 1758
      */
@@ -1776,7 +1776,7 @@  discard block
 block discarded – undo
1776 1776
      * fact the URL of the current request without any CGI parameter, except if
1777 1777
      * phpCAS::setFixedCallbackURL() was used).
1778 1778
      *
1779
-     * @return The callback URL
1779
+     * @return string callback URL
1780 1780
      *
1781 1781
      * @private
1782 1782
      */
@@ -1820,6 +1820,7 @@  discard block
 block discarded – undo
1820 1820
      * This method sets the callback url.
1821 1821
      *
1822 1822
      * @param $callback_url url to set callback
1823
+     * @param string $url
1823 1824
      *
1824 1825
      * @private
1825 1826
      */
@@ -1904,7 +1905,7 @@  discard block
 block discarded – undo
1904 1905
     /**
1905 1906
      * This method reads a PGT from its Iou and deletes the corresponding storage entry.
1906 1907
      *
1907
-     * @param $pgt_iou the PGT Iou
1908
+     * @param string $pgt_iou the PGT Iou
1908 1909
      *
1909 1910
      * @return The PGT corresponding to the Iou, FALSE when not found.
1910 1911
      *
@@ -2037,7 +2038,7 @@  discard block
 block discarded – undo
2037 2038
      * @param $err_code an error code (PHPCAS_SERVICE_OK on success).
2038 2039
      * @param $err_msg an error message (empty on success).
2039 2040
      *
2040
-     * @return a Proxy Ticket, or FALSE on error.
2041
+     * @return false|string Proxy Ticket, or FALSE on error.
2041 2042
      *
2042 2043
      * @private
2043 2044
      */
@@ -2140,14 +2141,14 @@  discard block
 block discarded – undo
2140 2141
     /**
2141 2142
      * This method is used to acces a remote URL.
2142 2143
      *
2143
-     * @param $url the URL to access.
2144
+     * @param string $url the URL to access.
2144 2145
      * @param $cookies an array containing cookies strings such as 'name=val'
2145 2146
      * @param $headers an array containing the HTTP header lines of the response
2146 2147
      * (an empty array on failure).
2147 2148
      * @param $body the body of the response, as a string (empty on failure).
2148 2149
      * @param $err_msg an error message, filled on failure.
2149 2150
      *
2150
-     * @return TRUE on success, FALSE otherwise (in this later case, $err_msg
2151
+     * @return boolean on success, FALSE otherwise (in this later case, $err_msg
2151 2152
      * contains an error message).
2152 2153
      *
2153 2154
      * @private
@@ -2250,7 +2251,7 @@  discard block
 block discarded – undo
2250 2251
     /**
2251 2252
      * This method is used to build the SAML POST body sent to /samlValidate URL.
2252 2253
      *
2253
-     * @return the SOAP-encased SAMLP artifact (the ticket).
2254
+     * @return string SOAP-encased SAMLP artifact (the ticket).
2254 2255
      *
2255 2256
      * @private
2256 2257
      */
@@ -2289,7 +2290,7 @@  discard block
 block discarded – undo
2289 2290
      * @param $output the output of the service (also used to give an error
2290 2291
      * message on failure).
2291 2292
      *
2292
-     * @return TRUE on success, FALSE otherwise (in this later case, $err_code
2293
+     * @return boolean on success, FALSE otherwise (in this later case, $err_code
2293 2294
      * gives the reason why it failed and $output contains an error message).
2294 2295
      *
2295 2296
      * @public
@@ -2436,7 +2437,7 @@  discard block
 block discarded – undo
2436 2437
 
2437 2438
     /**
2438 2439
      * This method returns the Proxy Ticket provided in the URL of the request.
2439
-     * @return The proxy ticket.
2440
+     * @return string proxy ticket.
2440 2441
      * @private
2441 2442
      */
2442 2443
     function getPT()
@@ -2457,7 +2458,7 @@  discard block
 block discarded – undo
2457 2458
 
2458 2459
     /**
2459 2460
      * This method tells if a Proxy Ticket was stored.
2460
-     * @return TRUE if a Proxy Ticket has been stored.
2461
+     * @return boolean if a Proxy Ticket has been stored.
2461 2462
      * @private
2462 2463
      */
2463 2464
     function hasPT()
@@ -2467,7 +2468,7 @@  discard block
 block discarded – undo
2467 2468
 
2468 2469
     /**
2469 2470
      * This method returns the SAML Ticket provided in the URL of the request.
2470
-     * @return The SAML ticket.
2471
+     * @return string SAML ticket.
2471 2472
      * @private
2472 2473
      */
2473 2474
     function getSA()
@@ -2487,7 +2488,7 @@  discard block
 block discarded – undo
2487 2488
 
2488 2489
     /**
2489 2490
      * This method tells if a SAML Ticket was stored.
2490
-     * @return TRUE if a SAML Ticket has been stored.
2491
+     * @return boolean if a SAML Ticket has been stored.
2491 2492
      * @private
2492 2493
      */
2493 2494
     function hasSA()
@@ -2507,6 +2508,7 @@  discard block
 block discarded – undo
2507 2508
     /**
2508 2509
      * This method is used to validate a ST or PT; halt on failure
2509 2510
      * Used for all CAS 2.0 validations
2511
+     * @param string $validate_url
2510 2512
      * @return bool TRUE when successfull, halt otherwise by calling CASClient::authError().
2511 2513
      *
2512 2514
      * @private
@@ -2623,7 +2625,7 @@  discard block
 block discarded – undo
2623 2625
      * This method returns the URL of the current request (without any ticket
2624 2626
      * CGI parameter).
2625 2627
      *
2626
-     * @return The URL
2628
+     * @return string URL
2627 2629
      *
2628 2630
      * @private
2629 2631
      */
@@ -2701,7 +2703,7 @@  discard block
 block discarded – undo
2701 2703
     /**
2702 2704
      * This method sets the URL of the current request
2703 2705
      *
2704
-     * @param $url url to set for service
2706
+     * @param string $url url to set for service
2705 2707
      *
2706 2708
      * @private
2707 2709
      */
@@ -2716,9 +2718,9 @@  discard block
 block discarded – undo
2716 2718
     /**
2717 2719
      * This method is used to print the HTML output when the user was not authenticated.
2718 2720
      *
2719
-     * @param $failure the failure that occured
2721
+     * @param string $failure the failure that occured
2720 2722
      * @param $cas_url the URL the CAS server was asked for
2721
-     * @param $no_response the response from the CAS server (other
2723
+     * @param boolean $no_response the response from the CAS server (other
2722 2724
      * parameters are ignored if TRUE)
2723 2725
      * @param $bad_response bad response from the CAS server ($err_code
2724 2726
      * and $err_msg ignored if TRUE)
Please login to merge, or discard this patch.
main/auth/cas/lib/CAS/domxml-php4-to-php5.php 1 patch
Doc Comments   +7 added lines patch added patch discarded remove patch
@@ -811,6 +811,9 @@  discard block
 block discarded – undo
811 811
         $this->myDOMXPath = new DOMXPath($this->myOwnerDocument->myDOMNode);
812 812
     }
813 813
 
814
+    /**
815
+     * @param string $eval_str
816
+     */
814 817
     function xpath_eval($eval_str, $contextnode = null)
815 818
     {
816 819
         if (method_exists($this->myDOMXPath, 'evaluate')) {
@@ -824,6 +827,10 @@  discard block
 block discarded – undo
824 827
         return ($xp->type === XPATH_UNDEFINED) ? false : $xp;
825 828
     }
826 829
 
830
+    /**
831
+     * @param string $prefix
832
+     * @param string $namespaceURI
833
+     */
827 834
     function xpath_register_ns($prefix, $namespaceURI)
828 835
     {
829 836
         return $this->myDOMXPath->registerNamespace($prefix, $namespaceURI);
Please login to merge, or discard this patch.