@@ -98,11 +98,11 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 | /** |
@@ -147,7 +147,7 @@ |
||
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) { |
@@ -61,7 +61,7 @@ |
||
61 | 61 | $this->assertTrue(false); |
62 | 62 | } |
63 | 63 | } |
64 | - catch(\Exception $e) { |
|
64 | + catch (\Exception $e) { |
|
65 | 65 | $this->assertTrue(false); |
66 | 66 | } |
67 | 67 |
@@ -79,11 +79,11 @@ discard block |
||
79 | 79 | */ |
80 | 80 | public function getGroups() : array |
81 | 81 | { |
82 | - $rSearch = ldap_search( $this->_rConnect , $this->_sBase , "objectclass=group" , array("cn") ); |
|
82 | + $rSearch = ldap_search($this->_rConnect, $this->_sBase, "objectclass=group", array("cn")); |
|
83 | 83 | $aEntries = ldap_get_entries($this->_rConnect, $rSearch); |
84 | 84 | $aGroups = array(); |
85 | 85 | |
86 | - for ( $i = 0 ; $i < $aEntries["count"] ; $i++ ) { |
|
86 | + for ($i = 0; $i < $aEntries["count"]; $i++) { |
|
87 | 87 | |
88 | 88 | $aGroups[] = utf8_encode($aEntries[$i]["dn"]); |
89 | 89 | } |
@@ -191,7 +191,7 @@ discard block |
||
191 | 191 | |
192 | 192 | $aResultSet[$i] = array_intersect_key($aEntries[$i], $aMask); |
193 | 193 | |
194 | - foreach($aResultSet[$i] as &$aValues) { |
|
194 | + foreach ($aResultSet[$i] as &$aValues) { |
|
195 | 195 | |
196 | 196 | unset($aValues['count']); |
197 | 197 | } |
@@ -148,6 +148,6 @@ |
||
148 | 148 | */ |
149 | 149 | private static function _applyCode(string $sContent, string $sCode) : string |
150 | 150 | { |
151 | - return "\033[" . $sCode . "m" . $sContent . "\033[0m\n"; |
|
151 | + return "\033[".$sCode."m".$sContent."\033[0m\n"; |
|
152 | 152 | } |
153 | 153 | } |
154 | 154 | \ No newline at end of file |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | $ImageChoisie = imagecreatefromjpeg($_FILES['ImageNews']['tmp_name']); |
53 | 53 | $TailleImageChoisie = getimagesize($_FILES['ImageNews']['tmp_name']); |
54 | 54 | |
55 | - $rNewImage = imagecreatetruecolor($iWidth , $iHeight); |
|
55 | + $rNewImage = imagecreatetruecolor($iWidth, $iHeight); |
|
56 | 56 | |
57 | 57 | if ($bKeepDimension === false) { |
58 | 58 | |
@@ -89,6 +89,6 @@ discard block |
||
89 | 89 | $NomImageExploitable = time(); |
90 | 90 | |
91 | 91 | header('Content-Type: image/jpeg'); |
92 | - imagejpeg($rNewImage , null, 100); |
|
92 | + imagejpeg($rNewImage, null, 100); |
|
93 | 93 | } |
94 | 94 | } |
@@ -55,8 +55,8 @@ discard block |
||
55 | 55 | * app secret of Facebook |
56 | 56 | * @var array |
57 | 57 | */ |
58 | - private $_aScope = array('email','user_birthday','user_location','user_work_history', |
|
59 | - 'user_about_me','user_hometown'); |
|
58 | + private $_aScope = array('email', 'user_birthday', 'user_location', 'user_work_history', |
|
59 | + 'user_about_me', 'user_hometown'); |
|
60 | 60 | |
61 | 61 | /** |
62 | 62 | * object Facebook of the SDK |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | |
175 | 175 | return $this->_oFacebook->api('/'.$sUser.'/'.$sName); |
176 | 176 | } |
177 | - catch(Exception $e) { |
|
177 | + catch (Exception $e) { |
|
178 | 178 | |
179 | 179 | throw new Exception(__FILE__.':'.__METHOD__.' : You can\'t ask: '.'/'.$sUser.'/'.$sName.' !'); |
180 | 180 | } |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | |
195 | 195 | try { |
196 | 196 | |
197 | - $aParam = array( |
|
197 | + $aParam = array( |
|
198 | 198 | 'method' => 'fql.query', |
199 | 199 | 'query' => $sFql, |
200 | 200 | 'callback' => '' |
@@ -202,7 +202,7 @@ discard block |
||
202 | 202 | |
203 | 203 | return $this->_oFacebook->api($aParam); |
204 | 204 | } |
205 | - catch(Exception $e) { |
|
205 | + catch (Exception $e) { |
|
206 | 206 | |
207 | 207 | throw new Exception(__FILE__.':'.__METHOD__.' : You can\'t ask: '.$sFql.' !'); |
208 | 208 | } |
@@ -235,7 +235,7 @@ discard block |
||
235 | 235 | ) |
236 | 236 | ); |
237 | 237 | } |
238 | - catch(Exception $e) { |
|
238 | + catch (Exception $e) { |
|
239 | 239 | |
240 | 240 | throw new Exception(__FILE__.':'.__METHOD__.' : You can\'t ask: '.'/'.$sUser.'/feed'.' !'); |
241 | 241 | } |
@@ -257,9 +257,9 @@ discard block |
||
257 | 257 | { |
258 | 258 | $user = $this->_oFacebook->getUser(); |
259 | 259 | |
260 | - if ($user){ |
|
260 | + if ($user) { |
|
261 | 261 | |
262 | - try{ |
|
262 | + try { |
|
263 | 263 | |
264 | 264 | $accounts = $this->_oFacebook->api('/me/accounts'); |
265 | 265 | |
@@ -290,7 +290,7 @@ discard block |
||
290 | 290 | ) |
291 | 291 | ); |
292 | 292 | } |
293 | - catch(Exception $e) { |
|
293 | + catch (Exception $e) { |
|
294 | 294 | |
295 | 295 | var_dump($e); |
296 | 296 | throw new Exception(__FILE__.':'.__METHOD__.' : You can\'t ask: '.'/'.$sPageId.'/feed'.' !'); |
@@ -91,7 +91,7 @@ |
||
91 | 91 | * @param int $iTimeout expiration of cache |
92 | 92 | * @return bool |
93 | 93 | */ |
94 | - public static function get(string $sName, int &$iFlags = null, int $iTimeout = 0) : bool |
|
94 | + public static function get(string $sName, int&$iFlags = null, int $iTimeout = 0) : bool |
|
95 | 95 | { |
96 | 96 | return self::_getCacheObject()->get($sName, $iFlags, $iTimeout); |
97 | 97 | } |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | $aJavascript = func_get_args(); |
45 | 45 | $aReturns = array(); |
46 | 46 | |
47 | - foreach($aJavascript as $aJsCombination) { |
|
47 | + foreach ($aJavascript as $aJsCombination) { |
|
48 | 48 | |
49 | 49 | $sJsPath = $sDefaultPath; |
50 | 50 | |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | $aCss = func_get_args(); |
80 | 80 | $aReturns = array(); |
81 | 81 | |
82 | - foreach($aCss as $aCssCombination) { |
|
82 | + foreach ($aCss as $aCssCombination) { |
|
83 | 83 | |
84 | 84 | $sCssPath = $sDefaultPath; |
85 | 85 |