Passed
Branch master (e94900)
by judicael
03:54
created
bundles/core/Config.php 1 patch
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -196,8 +196,8 @@  discard block
 block discarded – undo
196 196
 	 *
197 197
 	 * @access private
198 198
 	 * @param  string $sFileToMerge file to get
199
-	 * @param  object $base base
200
-	 * @return object
199
+	 * @param  stdClass $base base
200
+	 * @return stdClass
201 201
 	 */
202 202
 	private static function  _mergeAndGetConf(string $sFileToMerge, \StdClass $base) : \StdClass
203 203
 	{
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
 	 *
223 223
 	 * @access private
224 224
 	 * @param  $oConfFiles
225
-	 * @param  StdClass $base
225
+	 * @param  stdClass $base
226 226
 	 * @return multitype:array multitype:array
227 227
 	 */
228 228
 	private static function _recursiveGet($oConfFiles, StdClass $base) : array
Please login to merge, or discard this patch.
bundles/core/Mother.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
 	 *
119 119
 	 * @access public
120 120
 	 * @param  mixed $mKey
121
-	 * @return void
121
+	 * @return boolean
122 122
 	 */
123 123
 	public function __isset($mKey)
124 124
 	{
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
 	 *
131 131
 	 * @access public
132 132
 	 * @param  mixed $mOffset
133
-	 * @return mixed
133
+	 * @return boolean
134 134
 	 */
135 135
 	function offsetExists($mOffset)
136 136
 	{
Please login to merge, or discard this patch.
bundles/core/Router.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
 	 * run the routeur
91 91
 	 *
92 92
 	 * @access public
93
-	 * @return void
93
+	 * @return null|boolean
94 94
 	 */
95 95
 	public function run() 
96 96
 	{
@@ -378,7 +378,7 @@  discard block
 block discarded – undo
378 378
 	 * load a route
379 379
 	 *
380 380
 	 * @access private
381
-	 * @param  stdClass $oRoute one route
381
+	 * @param  \stdClass $oRoute one route
382 382
 	 * @param  string $RequestUri URI
383 383
 	 * @return void
384 384
 	 */
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
     					}
195 195
     					else if (isset($oHost->routes)) {
196 196
     
197
-    						foreach($oHost->routes as $sKey => $oRoute) {
197
+    						foreach ($oHost->routes as $sKey => $oRoute) {
198 198
 
199 199
     							$mReturn = $this->_route($oRoute, $_SERVER['REQUEST_URI']);
200 200
 
@@ -328,7 +328,7 @@  discard block
 block discarded – undo
328 328
 						$this->_sBaseUri = preg_replace('#^[^/]+#', '', $sHost);
329 329
 					}
330 330
 
331
-					foreach($oHost->routes as $sKey => $oRoute) {
331
+					foreach ($oHost->routes as $sKey => $oRoute) {
332 332
 
333 333
 						$this->_route($oRoute, $sRoute);
334 334
 					}
@@ -392,7 +392,7 @@  discard block
 block discarded – undo
392 392
 
393 393
 			$sFinalRoute = preg_replace_callback(
394 394
 				'|\[/{0,1}:([a-zA-Z_]+)\]|',
395
-				function ($aMatches) use ($oRoute) {
395
+				function($aMatches) use ($oRoute) {
396 396
 					return "/{0,1}(?P<".$aMatches[1].">".$oRoute->constraints->{$aMatches[1]}.")";
397 397
 				},
398 398
 				$sRoute
@@ -432,7 +432,7 @@  discard block
 block discarded – undo
432 432
 
433 433
 			// create the $_GET by the URL
434 434
 
435
-			foreach($aMatch as $mKey => $sResults) {
435
+			foreach ($aMatch as $mKey => $sResults) {
436 436
 
437 437
 				if (is_string($mKey)) {
438 438
 
Please login to merge, or discard this patch.
bundles/core/Security.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
63 63
 	 * check security of access
64 64
 	 *
65 65
 	 * @access public
66
-	 * @return void
66
+	 * @return null|boolean
67 67
 	 */
68 68
 
69 69
 	public function checkSecurity() {
Please login to merge, or discard this patch.
bundles/core/UrlManager.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
 	 * @access public
43 43
 	 * @param  string $sCode code of the url between "routes" and "route" in Route.conf
44 44
 	 * @param  array $aParams parameters to create the url
45
-	 * @return void
45
+	 * @return string
46 46
 	 *
47 47
 	 * @tutorial	If I have this route I could make my URL:
48 48
 	 *
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 
83 83
 						$aRoutes = array();
84 84
 
85
-						foreach($oHost->routes as $sKey => $oRoute) {
85
+						foreach ($oHost->routes as $sKey => $oRoute) {
86 86
 
87 87
 							if ($sKey === $sCode) {
88 88
 
@@ -135,8 +135,8 @@  discard block
 block discarded – undo
135 135
 			throw new \Exception();
136 136
 		}
137 137
 		
138
-		$sStringToEncode = str_replace(['à','á','â','ã','ä','ç','è','é','ê','ë','ì','í','î','ï','ñ','ò','ó','ô','õ','ö','ù','ú','û','ü','ý','ÿ','À','Á','Â','Ã','Ä','Ç','È','É','Ê','Ë','Ì','Í','Î','Ï','Ñ','Ò','Ó','Ô','Õ','Ö','Ù','Ú','Û','Ü','Ý'],
139
-			['a','a','a','a','a','c','e','e','e','e','i','i','i','i','n','o','o','o','o','o','u','u','u','u','y','y','A','A','A','A','A','C','E','E','E','E','I','I','I','I','N','O','O','O','O','O','U','U','U','U','Y'],
138
+		$sStringToEncode = str_replace(['à', 'á', 'â', 'ã', 'ä', 'ç', 'è', 'é', 'ê', 'ë', 'ì', 'í', 'î', 'ï', 'ñ', 'ò', 'ó', 'ô', 'õ', 'ö', 'ù', 'ú', 'û', 'ü', 'ý', 'ÿ', 'À', 'Á', 'Â', 'Ã', 'Ä', 'Ç', 'È', 'É', 'Ê', 'Ë', 'Ì', 'Í', 'Î', 'Ï', 'Ñ', 'Ò', 'Ó', 'Ô', 'Õ', 'Ö', 'Ù', 'Ú', 'Û', 'Ü', 'Ý'],
139
+			['a', 'a', 'a', 'a', 'a', 'c', 'e', 'e', 'e', 'e', 'i', 'i', 'i', 'i', 'n', 'o', 'o', 'o', 'o', 'o', 'u', 'u', 'u', 'u', 'y', 'y', 'A', 'A', 'A', 'A', 'A', 'C', 'E', 'E', 'E', 'E', 'I', 'I', 'I', 'I', 'N', 'O', 'O', 'O', 'O', 'O', 'U', 'U', 'U', 'U', 'Y'],
140 140
 				$sStringToEncode);
141 141
 
142 142
 		$sStringToEncode = preg_replace('/[^a-zA-Z0-9_]+/', '_', preg_quote($sStringToEncode));
Please login to merge, or discard this patch.
bundles/ext/facebook/base_facebook.php 2 patches
Doc Comments   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -503,7 +503,7 @@  discard block
 block discarded – undo
503 503
    * Get the UID of the connected user, or 0
504 504
    * if the Facebook user is not connected.
505 505
    *
506
-   * @return string the UID if available.
506
+   * @return integer the UID if available.
507 507
    */
508 508
   public function getUser() {
509 509
     if ($this->user !== null) {
@@ -757,6 +757,7 @@  discard block
 block discarded – undo
757 757
    * either logged in to Facebook or has granted an offline access permission.
758 758
    *
759 759
    * @param string $code An authorization code.
760
+   * @param string $redirect_uri
760 761
    * @return mixed An access token exchanged for the authorization code, or
761 762
    *               false if an access token could not be generated.
762 763
    */
@@ -1135,7 +1136,7 @@  discard block
 block discarded – undo
1135 1136
   /**
1136 1137
    * Build the URL for given domain alias, path and parameters.
1137 1138
    *
1138
-   * @param $name string The name of the domain
1139
+   * @param string $name string The name of the domain
1139 1140
    * @param $path string Optional path (without a leading slash)
1140 1141
    * @param $params array Optional query parameters
1141 1142
    *
@@ -1402,6 +1403,9 @@  discard block
 block discarded – undo
1402 1403
     return self::endsWith($big, '.'.$small);
1403 1404
   }
1404 1405
 
1406
+  /**
1407
+   * @param string $small
1408
+   */
1405 1409
   protected static function endsWith($big, $small) {
1406 1410
     $len = strlen($small);
1407 1411
     if ($len === 0) {
Please login to merge, or discard this patch.
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -98,11 +98,11 @@  discard block
 block discarded – undo
98 98
    * @return string The string representation of the error
99 99
    */
100 100
   public function __toString() {
101
-    $str = $this->getType() . ': ';
101
+    $str = $this->getType().': ';
102 102
     if ($this->code != 0) {
103
-      $str .= $this->code . ': ';
103
+      $str .= $this->code.': ';
104 104
     }
105
-    return $str . $this->message;
105
+    return $str.$this->message;
106 106
   }
107 107
 }
108 108
 
@@ -530,7 +530,7 @@  discard block
 block discarded – undo
530 530
       if (array_key_exists('user_id', $signed_request)) {
531 531
         $user = $signed_request['user_id'];
532 532
 
533
-        if($user != $this->getPersistentData('user_id')){
533
+        if ($user != $this->getPersistentData('user_id')) {
534 534
           $this->clearAllPersistentData();
535 535
         }
536 536
 
@@ -576,7 +576,7 @@  discard block
 block discarded – undo
576 576
    * @param array $params Provide custom parameters
577 577
    * @return string The URL for the login flow
578 578
    */
579
-  public function getLoginUrl($params=array()) {
579
+  public function getLoginUrl($params = array()) {
580 580
     $this->establishCSRFTokenState();
581 581
     $currentUrl = $this->getCurrentUrl();
582 582
 
@@ -605,7 +605,7 @@  discard block
 block discarded – undo
605 605
    * @param array $params Provide custom parameters
606 606
    * @return string The URL for the logout flow
607 607
    */
608
-  public function getLogoutUrl($params=array()) {
608
+  public function getLogoutUrl($params = array()) {
609 609
     return $this->getUrl(
610 610
       'www',
611 611
       'logout.php',
@@ -627,7 +627,7 @@  discard block
 block discarded – undo
627 627
    * @param array $params Provide custom parameters
628 628
    * @return string The URL for the logout flow
629 629
    */
630
-  public function getLoginStatusUrl($params=array()) {
630
+  public function getLoginStatusUrl($params = array()) {
631 631
     return $this->getUrl(
632 632
       'www',
633 633
       'extern/login_status.php',
@@ -937,7 +937,7 @@  discard block
 block discarded – undo
937 937
    *
938 938
    * @return string The response text
939 939
    */
940
-  protected function makeRequest($url, $params, $ch=null) {
940
+  protected function makeRequest($url, $params, $ch = null) {
941 941
     if (!$ch) {
942 942
       $ch = curl_init();
943 943
     }
@@ -967,7 +967,7 @@  discard block
 block discarded – undo
967 967
       self::errorLog('Invalid or no certificate authority found, '.
968 968
                      'using bundled information');
969 969
       curl_setopt($ch, CURLOPT_CAINFO,
970
-                  dirname(__FILE__) . '/fb_ca_chain_bundle.crt');
970
+                  dirname(__FILE__).'/fb_ca_chain_bundle.crt');
971 971
       $result = curl_exec($ch);
972 972
     }
973 973
 
@@ -1020,7 +1020,7 @@  discard block
 block discarded – undo
1020 1020
 
1021 1021
     if (strtoupper($data['algorithm']) !== self::SIGNED_REQUEST_ALGORITHM) {
1022 1022
       self::errorLog(
1023
-        'Unknown algorithm. Expected ' . self::SIGNED_REQUEST_ALGORITHM);
1023
+        'Unknown algorithm. Expected '.self::SIGNED_REQUEST_ALGORITHM);
1024 1024
       return null;
1025 1025
     }
1026 1026
 
@@ -1044,7 +1044,7 @@  discard block
 block discarded – undo
1044 1044
   protected function makeSignedRequest($data) {
1045 1045
     if (!is_array($data)) {
1046 1046
       throw new InvalidArgumentException(
1047
-        'makeSignedRequest expects an array. Got: ' . print_r($data, true));
1047
+        'makeSignedRequest expects an array. Got: '.print_r($data, true));
1048 1048
     }
1049 1049
     $data['algorithm'] = self::SIGNED_REQUEST_ALGORITHM;
1050 1050
     $data['issued_at'] = time();
@@ -1141,7 +1141,7 @@  discard block
 block discarded – undo
1141 1141
    *
1142 1142
    * @return string The URL for the given parameters
1143 1143
    */
1144
-  protected function getUrl($name, $path='', $params=array()) {
1144
+  protected function getUrl($name, $path = '', $params = array()) {
1145 1145
     $url = self::$DOMAIN_MAP[$name];
1146 1146
     if ($path) {
1147 1147
       if ($path[0] === '/') {
@@ -1150,7 +1150,7 @@  discard block
 block discarded – undo
1150 1150
       $url .= $path;
1151 1151
     }
1152 1152
     if ($params) {
1153
-      $url .= '?' . http_build_query($params, null, '&');
1153
+      $url .= '?'.http_build_query($params, null, '&');
1154 1154
     }
1155 1155
 
1156 1156
     return $url;
@@ -1206,7 +1206,7 @@  discard block
 block discarded – undo
1206 1206
    * @return string The current URL
1207 1207
    */
1208 1208
   protected function getCurrentUrl() {
1209
-    $protocol = $this->getHttpProtocol() . '://';
1209
+    $protocol = $this->getHttpProtocol().'://';
1210 1210
     $host = $this->getHttpHost();
1211 1211
     $currentUrl = $protocol.$host.$_SERVER['REQUEST_URI'];
1212 1212
     $parts = parse_url($currentUrl);
@@ -1232,10 +1232,10 @@  discard block
 block discarded – undo
1232 1232
       isset($parts['port']) &&
1233 1233
       (($protocol === 'http://' && $parts['port'] !== 80) ||
1234 1234
        ($protocol === 'https://' && $parts['port'] !== 443))
1235
-      ? ':' . $parts['port'] : '';
1235
+      ? ':'.$parts['port'] : '';
1236 1236
 
1237 1237
     // rebuild
1238
-    return $protocol . $parts['host'] . $port . $parts['path'] . $query;
1238
+    return $protocol.$parts['host'].$port.$parts['path'].$query;
1239 1239
   }
1240 1240
 
1241 1241
   /**
Please login to merge, or discard this patch.
bundles/ext/facebook/facebook.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -150,6 +150,9 @@
 block discarded – undo
150 150
     return self::FBSS_COOKIE_NAME . '_' . $this->getAppId();
151 151
   }
152 152
 
153
+  /**
154
+   * @param string $key
155
+   */
153 156
   protected function constructSessionVariableName($key) {
154 157
     $parts = array('fb', $this->getAppId(), $key);
155 158
     if ($this->sharedSessionID) {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -147,7 +147,7 @@
 block discarded – undo
147 147
   }
148 148
 
149 149
   protected function getSharedSessionCookieName() {
150
-    return self::FBSS_COOKIE_NAME . '_' . $this->getAppId();
150
+    return self::FBSS_COOKIE_NAME.'_'.$this->getAppId();
151 151
   }
152 152
 
153 153
   protected function constructSessionVariableName($key) {
Please login to merge, or discard this patch.
bundles/lib/Cache/File.php 2 patches
Doc Comments   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 	 *
98 98
 	 * @access public
99 99
 	 * @param  string $sName name of the session
100
-	 * @return mixed
100
+	 * @return boolean
101 101
 	 */
102 102
 	public function delete(string $sName)
103 103
 	{
@@ -108,7 +108,6 @@  discard block
 block discarded – undo
108 108
 	 * flush the cache
109 109
 	 *
110 110
 	 * @access public
111
-	 * @param  string $sName name of the session
112 111
 	 * @return mixed
113 112
 	 */
114 113
 	public function flush()
@@ -121,7 +120,7 @@  discard block
 block discarded – undo
121 120
 	 *
122 121
 	 * @access public
123 122
 	 * @param  string $sName name of the session
124
-	 * @return mixed
123
+	 * @return string
125 124
 	 */
126 125
 	private function _getSubDirectory($sName)
127 126
 	{
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
 	 * @param  int $iTimeout expiration of cache
62 62
 	 * @return mixed
63 63
 	 */
64
-	public function get(string $sName, int &$iFlags = null, int $iTimeout = 0)
64
+	public function get(string $sName, int&$iFlags = null, int $iTimeout = 0)
65 65
 	{ 
66 66
 	    return parent::get($sName);
67 67
 	}
Please login to merge, or discard this patch.
bundles/lib/Cache/Mock.php 2 patches
Doc Comments   +5 added lines, -6 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 	 * @param  string $sName name of the session
38 38
 	 * @param  int $iFlags flags
39 39
 	 * @param  int $iTimeout expiration of cache
40
-	 * @return mixed
40
+	 * @return boolean
41 41
 	 */
42 42
 	public function get(string $sName, int &$iFlags = null, int $iTimeout = 0)
43 43
 	{ 
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 	 * @param  mixed $mValue value of this sesion var
53 53
 	 * @param  int $iFlag unused
54 54
 	 * @param  int $iExpire expiration of cache
55
-	 * @return \Venus\lib\Cache\Apc
55
+	 * @return boolean
56 56
 	 */
57 57
 	public function set(string $sName, $mValue, int $iFlag = 0, int $iExpire = false)
58 58
 	{ 
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 	 * flush the cache
64 64
 	 *
65 65
 	 * @access public
66
-	 * @return mixed
66
+	 * @return boolean
67 67
 	 */
68 68
 	public function flush()
69 69
 	{
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 	 *
76 76
 	 * @access public
77 77
 	 * @param  string $sName name of the session
78
-	 * @return mixed
78
+	 * @return boolean
79 79
 	 */
80 80
 	public function delete(string $sName)
81 81
 	{
@@ -88,9 +88,8 @@  discard block
 block discarded – undo
88 88
 	 * @access public
89 89
 	 * @param  string $sName name of the session
90 90
 	 * @param  mixed $mValue value of this sesion var
91
-	 * @param  int $iFlag unused
92 91
 	 * @param  int $iExpire expiration of cache
93
-	 * @return mixed
92
+	 * @return boolean
94 93
 	 */
95 94
 	public function add($sName, $mValue, $iExpire = false)
96 95
 	{ 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
 	 * @param  int $iTimeout expiration of cache
62 62
 	 * @return mixed
63 63
 	 */
64
-	public function get(string $sName, int &$iFlags = null, int $iTimeout = 0)
64
+	public function get(string $sName, int&$iFlags = null, int $iTimeout = 0)
65 65
 	{ 
66 66
 	    return parent::get($sName);
67 67
 	}
Please login to merge, or discard this patch.