Completed
Push — master ( 369c90...324e29 )
by Michael
04:57
created
class/references_categories.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -22,9 +22,9 @@  discard block
 block discarded – undo
22 22
     die('XOOPS root path not defined');
23 23
 }
24 24
 
25
-require_once XOOPS_ROOT_PATH . '/kernel/object.php';
25
+require_once XOOPS_ROOT_PATH.'/kernel/object.php';
26 26
 if (!class_exists('references_XoopsPersistableObjectHandler')) {
27
-    require_once XOOPS_ROOT_PATH . '/modules/references/class/PersistableObjectHandler.php';
27
+    require_once XOOPS_ROOT_PATH.'/modules/references/class/PersistableObjectHandler.php';
28 28
 }
29 29
 
30 30
 class references_categories extends references_Object
@@ -58,9 +58,9 @@  discard block
 block discarded – undo
58 58
     public function getUrl($shortVersion = false)
59 59
     {
60 60
         if (!$shortVersion) {
61
-            return REFERENCES_URL . 'category.php?category_id=' . $this->getVar('category_id');
61
+            return REFERENCES_URL.'category.php?category_id='.$this->getVar('category_id');
62 62
         } else {
63
-            return 'category.php?category_id=' . $this->getVar('category_id');
63
+            return 'category.php?category_id='.$this->getVar('category_id');
64 64
         }
65 65
     }
66 66
 
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
         $gperm_handler = xoops_getHandler('groupperm');
111 111
         $categories    = $gperm_handler->getItemIds($permissionsType, $groups, $currentModule->getVar('mid'));
112 112
         if (is_array($categories) && count($categories) > 0) {
113
-            $permissions[$permissionsType] = new Criteria('category_id', '(' . implode(',', $categories) . ')', 'IN');
113
+            $permissions[$permissionsType] = new Criteria('category_id', '('.implode(',', $categories).')', 'IN');
114 114
         } else {    // Ne peut rien voir
115 115
             $permissions[$permissionsType] = new Criteria('category_id', '0', '=');
116 116
         }
@@ -176,8 +176,8 @@  discard block
 block discarded – undo
176 176
         if (count($categories) == 0) {
177 177
             return $ret;
178 178
         }
179
-        $jump  = REFERENCES_URL . 'category.php?category_id=';
180
-        $extra = " onchange='location=\"" . $jump . "\"+this.options[this.selectedIndex].value'";
179
+        $jump  = REFERENCES_URL.'category.php?category_id=';
180
+        $extra = " onchange='location=\"".$jump."\"+this.options[this.selectedIndex].value'";
181 181
 
182 182
         return references_utils::htmlSelect($selectName, $categories, $selected, true, '', false, 1, $extra);
183 183
     }
Please login to merge, or discard this patch.
category.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -24,15 +24,15 @@  discard block
 block discarded – undo
24 24
  *
25 25
  * @param integer $category_id Le numéro de la catégorie
26 26
  */
27
-require __DIR__ . '/header.php';
27
+require __DIR__.'/header.php';
28 28
 $xoopsOption['template_main'] = 'references_category.tpl';
29
-require XOOPS_ROOT_PATH . '/header.php';
29
+require XOOPS_ROOT_PATH.'/header.php';
30 30
 
31
-$baseurl = REFERENCES_URL . basename(__FILE__);
31
+$baseurl = REFERENCES_URL.basename(__FILE__);
32 32
 $limit   = references_utils::getModuleOption('items_index_page');
33 33
 $start   = $index = 0;
34 34
 
35
-$category_id = isset($_GET['category_id']) ? (int)$_GET['category_id'] : 0;
35
+$category_id = isset($_GET['category_id']) ? (int) $_GET['category_id'] : 0;
36 36
 if ($category_id == 0) {
37 37
     header('Location: index.php', true, 301);
38 38
     exit;
@@ -61,18 +61,18 @@  discard block
 block discarded – undo
61 61
 $xoopsTpl->assign('use_rss', references_utils::getModuleOption('use_rss'));
62 62
 
63 63
 // MooTools
64
-$xoTheme->addScript(REFERENCES_JS_URL . 'js/mootools.js');
65
-$xoTheme->addScript(REFERENCES_JS_URL . 'js/mootools-1.2-more.js');
66
-if (isset($xoopsConfig) && file_exists(REFERENCES_PATH . 'language/' . $xoopsConfig['language'] . '/slimbox.js')) {
67
-    $xoTheme->addScript(REFERENCES_URL . 'language/' . $xoopsConfig['language'] . '/slimbox.js');
64
+$xoTheme->addScript(REFERENCES_JS_URL.'js/mootools.js');
65
+$xoTheme->addScript(REFERENCES_JS_URL.'js/mootools-1.2-more.js');
66
+if (isset($xoopsConfig) && file_exists(REFERENCES_PATH.'language/'.$xoopsConfig['language'].'/slimbox.js')) {
67
+    $xoTheme->addScript(REFERENCES_URL.'language/'.$xoopsConfig['language'].'/slimbox.js');
68 68
 } else {
69
-    $xoTheme->addScript(REFERENCES_JS_URL . 'js/slimbox.js');
69
+    $xoTheme->addScript(REFERENCES_JS_URL.'js/slimbox.js');
70 70
 }
71 71
 
72 72
 $categoriesSelect = $h_references_categories->getCategoriesSelect('categoriesSelect', $category->getVar('category_id'));
73 73
 $xoopsTpl->assign('categoriesSelect', $categoriesSelect);
74
-$xoTheme->addStylesheet(REFERENCES_JS_URL . 'css/slimbox.css');
75
-$xoTheme->addStylesheet(REFERENCES_JS_URL . 'css/accordion.css');
74
+$xoTheme->addStylesheet(REFERENCES_JS_URL.'css/slimbox.css');
75
+$xoTheme->addStylesheet(REFERENCES_JS_URL.'css/accordion.css');
76 76
 
77 77
 // ****************************************************************************************************************************
78 78
 $xoopsTpl->assign('thumbsWidth', references_utils::getModuleOption('thumbs_width'));
@@ -89,6 +89,6 @@  discard block
 block discarded – undo
89 89
     }
90 90
 }
91 91
 $xoopsTpl->assign('isAdmin', references_utils::isAdmin());
92
-$title = $category->getVar('category_title', 'n') . ' - ' . $xoopsModule->name();
92
+$title = $category->getVar('category_title', 'n').' - '.$xoopsModule->name();
93 93
 references_utils::setMetas($title, $title);
94
-require XOOPS_ROOT_PATH . '/footer.php';
94
+require XOOPS_ROOT_PATH.'/footer.php';
Please login to merge, or discard this patch.
list.tag.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,5 +18,5 @@
 block discarded – undo
18 18
  *
19 19
  * ****************************************************************************
20 20
  */
21
-require __DIR__ . '/header.php';
22
-require XOOPS_ROOT_PATH . '/modules/tag/list.tag.php';
21
+require __DIR__.'/header.php';
22
+require XOOPS_ROOT_PATH.'/modules/tag/list.tag.php';
Please login to merge, or discard this patch.
config.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -20,13 +20,13 @@
 block discarded – undo
20 20
  */
21 21
 if (!defined('REFERENCES_CACHE_PATH')) {
22 22
     // Le chemin du cache (il est conseillé de le mettre en dehors de la portée du web)
23
-    define('REFERENCES_CACHE_PATH', XOOPS_UPLOAD_PATH . DIRECTORY_SEPARATOR . REFERENCES_DIRNAME . '_cache' . DIRECTORY_SEPARATOR);
23
+    define('REFERENCES_CACHE_PATH', XOOPS_UPLOAD_PATH.DIRECTORY_SEPARATOR.REFERENCES_DIRNAME.'_cache'.DIRECTORY_SEPARATOR);
24 24
 
25 25
     // Thumbs / Vignettes prefixe
26
-    define('REFERENCES_THUMBS_PREFIX', 'thumb_');        // Thumbs prefix (when thumbs are automatically created)
26
+    define('REFERENCES_THUMBS_PREFIX', 'thumb_'); // Thumbs prefix (when thumbs are automatically created)
27 27
 
28 28
     // Short text length / Longueur des textes raccourcis
29
-    define('REFERENCES_SHORTEN_TEXT', '200');        // Characters count / Nombre de caract�res
29
+    define('REFERENCES_SHORTEN_TEXT', '200'); // Characters count / Nombre de caract�res
30 30
 
31 31
     define('REFERENCES_METAGEN_MAX_KEYWORDS', 40);
32 32
     define('REFERENCES_METAGEN_KEYWORDS_ORDER', 0);
Please login to merge, or discard this patch.
header.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -19,8 +19,8 @@
 block discarded – undo
19 19
  * ****************************************************************************
20 20
  */
21 21
 if (file_exists('../../mainfile.php')) {
22
-    require __DIR__ . '/../../mainfile.php';
22
+    require __DIR__.'/../../mainfile.php';
23 23
 } elseif (file_exists('../../../mainfile.php')) {
24
-    require __DIR__ . '/../../../mainfile.php';
24
+    require __DIR__.'/../../../mainfile.php';
25 25
 }
26
-require_once XOOPS_ROOT_PATH . '/modules/references/include/common.php';
26
+require_once XOOPS_ROOT_PATH.'/modules/references/include/common.php';
Please login to merge, or discard this patch.
plugins/actions/twitter/Twitter.class.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
     function __construct($user, $pass, $debug = false)
20 20
     {
21 21
         // Store an auth key for the HTTP Authorization: header
22
-        $this->auth  = base64_encode($user . ':' . $pass);
22
+        $this->auth  = base64_encode($user.':'.$pass);
23 23
         $this->debug = $debug;
24 24
     }
25 25
 
@@ -34,12 +34,12 @@  discard block
 block discarded – undo
34 34
             $this->error = "Socket error #{$errno}: {$errstr}";
35 35
             return false;
36 36
         }
37
-        $post_data = 'status=' . urlencode($new_status);
37
+        $post_data = 'status='.urlencode($new_status);
38 38
         $to_send   = "POST /statuses/update.xml HTTP/1.1\r\n";
39 39
         $to_send .= "Host: twitter.com\r\n";
40
-        $to_send .= 'Content-Length: ' . strlen($post_data) . "\r\n";
40
+        $to_send .= 'Content-Length: '.strlen($post_data)."\r\n";
41 41
         $to_send .= "Authorization: Basic {$this->auth}\r\n\r\n";
42
-        $to_send .= $post_data . "\r\n\r\n";
42
+        $to_send .= $post_data."\r\n\r\n";
43 43
         $bytes = fwrite($fp, $to_send);
44 44
         if ($bytes === false) {
45 45
             $this->error = 'Socket error: Error sending data.';
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
             $response .= $buf;
60 60
         }
61 61
         if ($this->debug) echo "Received:\n{$response}";
62
-        $was_error = preg_match('#' . preg_quote('<error>') . '(.+)' . preg_quote('</error>') . '#i', $response, $matches);
62
+        $was_error = preg_match('#'.preg_quote('<error>').'(.+)'.preg_quote('</error>').'#i', $response, $matches);
63 63
         if ($was_error) {
64 64
             $this->error = "Twitter error: {$matches[1]}";
65 65
             return false;
Please login to merge, or discard this patch.
plugins/actions/twitter/bitly.class.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
             $curr = $matches[0][$i];
85 85
             // ignore bitly urls
86 86
             if (!strstr($curr, 'http://bit.ly')) {
87
-                $postFields .= '&longUrl=' . urlencode($curr);
87
+                $postFields .= '&longUrl='.urlencode($curr);
88 88
             }
89 89
         }
90 90
 
@@ -97,14 +97,14 @@  discard block
 block discarded – undo
97 97
 
98 98
     public function expand($message)
99 99
     {
100
-        $postFields = '&hash=' . $this->getHash($message);
100
+        $postFields = '&hash='.$this->getHash($message);
101 101
         return $this->process('expand', $postFields);
102 102
     }
103 103
 
104 104
     public function info($bitlyUrl)
105 105
     {
106 106
         $hash       = $this->getHash($bitlyUrl);
107
-        $postFields = '&hash=' . $hash;
107
+        $postFields = '&hash='.$hash;
108 108
         return $this->process('info', $postFields);
109 109
     }
110 110
 
@@ -112,19 +112,19 @@  discard block
 block discarded – undo
112 112
     {
113 113
         // Take only first hash or url. Ignore others.
114 114
         $a          = split(',', $bitlyUrl);
115
-        $postFields = '&hash=' . $this->getHash($a[0]);
115
+        $postFields = '&hash='.$this->getHash($a[0]);
116 116
         return $this->process('stats', $postFields);
117 117
     }
118 118
 
119 119
     protected function process($action, $postFields)
120 120
     {
121
-        $ch = curl_init($this->api . $action);
121
+        $ch = curl_init($this->api.$action);
122 122
 
123
-        $postFields = 'version=' . $this->version . $postFields;
124
-        $postFields .= '&format=' . $this->format;
123
+        $postFields = 'version='.$this->version.$postFields;
124
+        $postFields .= '&format='.$this->format;
125 125
         $postFields .= '&history=1';
126 126
 
127
-        curl_setopt($ch, CURLOPT_USERPWD, $this->login . ':' . $this->apiKey);
127
+        curl_setopt($ch, CURLOPT_USERPWD, $this->login.':'.$this->apiKey);
128 128
         curl_setopt($ch, CURLOPT_POST, 1);
129 129
         curl_setopt($ch, CURLOPT_POSTFIELDS, $postFields);
130 130
         curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
Please login to merge, or discard this patch.
plugins/actions/twitter/twitter.php 1 patch
Spacing   +289 added lines, -289 removed lines patch added patch discarded remove patch
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
         }
159 159
 
160 160
         // process parameters
161
-        foreach ($parameters as $key => $value) $chunks[] = $key . '=' . str_replace('%25', '%', $value);
161
+        foreach ($parameters as $key => $value) $chunks[] = $key.'='.str_replace('%25', '%', $value);
162 162
 
163 163
         // return
164 164
         return implode('&', $chunks);
@@ -182,8 +182,8 @@  discard block
 block discarded – undo
182 182
     private function calculateBaseString($url, $method, array $parameters)
183 183
     {
184 184
         // redefine
185
-        $url        = (string)$url;
186
-        $parameters = (array)$parameters;
185
+        $url        = (string) $url;
186
+        $parameters = (array) $parameters;
187 187
 
188 188
         // init var
189 189
         $pairs  = array();
@@ -200,12 +200,12 @@  discard block
 block discarded – undo
200 200
 
201 201
         // process queries
202 202
         foreach ($parameters as $key => $value) {
203
-            $chunks[] = self::urlencode_rfc3986($key) . '%3D' . self::urlencode_rfc3986($value);
203
+            $chunks[] = self::urlencode_rfc3986($key).'%3D'.self::urlencode_rfc3986($value);
204 204
         }
205 205
 
206 206
         // buils base
207
-        $base = $method . '&';
208
-        $base .= urlencode($url) . '&';
207
+        $base = $method.'&';
208
+        $base .= urlencode($url).'&';
209 209
         $base .= implode('%26', $chunks);
210 210
 
211 211
         // return
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
     private function calculateHeader(array $parameters, $url = null)
225 225
     {
226 226
         // redefine
227
-        $url = (string)$url;
227
+        $url = (string) $url;
228 228
 
229 229
         // divide into parts
230 230
         $parts = parse_url($url);
@@ -233,10 +233,10 @@  discard block
 block discarded – undo
233 233
         $chunks = array();
234 234
 
235 235
         // process queries
236
-        foreach ($parameters as $key => $value) $chunks[] = str_replace('%25', '%', self::urlencode_rfc3986($key) . '="' . self::urlencode_rfc3986($value) . '"');
236
+        foreach ($parameters as $key => $value) $chunks[] = str_replace('%25', '%', self::urlencode_rfc3986($key).'="'.self::urlencode_rfc3986($value).'"');
237 237
 
238 238
         // build return
239
-        $return = 'Authorization: OAuth realm="' . $parts['scheme'] . '://' . $parts['host'] . $parts['path'] . '", ';
239
+        $return = 'Authorization: OAuth realm="'.$parts['scheme'].'://'.$parts['host'].$parts['path'].'", ';
240 240
         $return .= implode(',', $chunks);
241 241
 
242 242
         // prepend name and OAuth part
@@ -256,31 +256,31 @@  discard block
 block discarded – undo
256 256
     private function doOAuthCall($method, array $parameters = null)
257 257
     {
258 258
         // redefine
259
-        $method = (string)$method;
259
+        $method = (string) $method;
260 260
 
261 261
         // append default parameters
262 262
         $parameters['oauth_consumer_key']     = $this->getConsumerKey();
263
-        $parameters['oauth_nonce']            = md5(microtime() . rand());
263
+        $parameters['oauth_nonce']            = md5(microtime().rand());
264 264
         $parameters['oauth_timestamp']        = time();
265 265
         $parameters['oauth_signature_method'] = 'HMAC-SHA1';
266 266
         $parameters['oauth_version']          = '1.0';
267 267
 
268 268
         // calculate the base string
269
-        $base = $this->calculateBaseString(self::SECURE_API_URL . '/oauth/' . $method, 'POST', $parameters);
269
+        $base = $this->calculateBaseString(self::SECURE_API_URL.'/oauth/'.$method, 'POST', $parameters);
270 270
 
271 271
         // add sign into the parameters
272
-        $parameters['oauth_signature'] = $this->hmacsha1($this->getConsumerSecret() . '&' . $this->getOAuthTokenSecret(), $base);
272
+        $parameters['oauth_signature'] = $this->hmacsha1($this->getConsumerSecret().'&'.$this->getOAuthTokenSecret(), $base);
273 273
 
274 274
         // calculate header
275
-        $header = $this->calculateHeader($parameters, self::SECURE_API_URL . '/oauth/' . $method);
275
+        $header = $this->calculateHeader($parameters, self::SECURE_API_URL.'/oauth/'.$method);
276 276
 
277 277
         // set options
278
-        $options[CURLOPT_URL]            = self::SECURE_API_URL . '/oauth/' . $method;
278
+        $options[CURLOPT_URL]            = self::SECURE_API_URL.'/oauth/'.$method;
279 279
         $options[CURLOPT_PORT]           = self::SECURE_API_PORT;
280 280
         $options[CURLOPT_USERAGENT]      = $this->getUserAgent();
281 281
         $options[CURLOPT_FOLLOWLOCATION] = true;
282 282
         $options[CURLOPT_RETURNTRANSFER] = true;
283
-        $options[CURLOPT_TIMEOUT]        = (int)$this->getTimeOut();
283
+        $options[CURLOPT_TIMEOUT]        = (int) $this->getTimeOut();
284 284
         $options[CURLOPT_SSL_VERIFYPEER] = false;
285 285
         $options[CURLOPT_SSL_VERIFYHOST] = false;
286 286
         $options[CURLOPT_HTTPHEADER]     = array('Expect:');
@@ -336,18 +336,18 @@  discard block
 block discarded – undo
336 336
         $allowedMethods = array('GET', 'POST');
337 337
 
338 338
         // redefine
339
-        $url          = (string)$url;
340
-        $parameters   = (array)$parameters;
341
-        $authenticate = (bool)$authenticate;
342
-        $method       = (string)$method;
343
-        $expectJSON   = (bool)$expectJSON;
339
+        $url          = (string) $url;
340
+        $parameters   = (array) $parameters;
341
+        $authenticate = (bool) $authenticate;
342
+        $method       = (string) $method;
343
+        $expectJSON   = (bool) $expectJSON;
344 344
 
345 345
         // validate method
346
-        if (!in_array($method, $allowedMethods)) throw new TwitterException('Unknown method (' . $method . '). Allowed methods are: ' . implode(', ', $allowedMethods));
346
+        if (!in_array($method, $allowedMethods)) throw new TwitterException('Unknown method ('.$method.'). Allowed methods are: '.implode(', ', $allowedMethods));
347 347
 
348 348
         // append default parameters
349 349
         $oauth['oauth_consumer_key']     = $this->getConsumerKey();
350
-        $oauth['oauth_nonce']            = md5(microtime() . rand());
350
+        $oauth['oauth_nonce']            = md5(microtime().rand());
351 351
         $oauth['oauth_timestamp']        = time();
352 352
         $oauth['oauth_token']            = $this->getOAuthToken();
353 353
         $oauth['oauth_signature_method'] = 'HMAC-SHA1';
@@ -358,12 +358,12 @@  discard block
 block discarded – undo
358 358
         if (!empty($parameters)) $data = array_merge($data, $parameters);
359 359
 
360 360
         // calculate the base string
361
-        $base = $this->calculateBaseString(self::API_URL . '/' . $url, $method, $data);
361
+        $base = $this->calculateBaseString(self::API_URL.'/'.$url, $method, $data);
362 362
 
363 363
         // add sign into the parameters
364
-        $oauth['oauth_signature'] = $this->hmacsha1($this->getConsumerSecret() . '&' . $this->getOAuthTokenSecret(), $base);
364
+        $oauth['oauth_signature'] = $this->hmacsha1($this->getConsumerSecret().'&'.$this->getOAuthTokenSecret(), $base);
365 365
 
366
-        $headers[] = $this->calculateHeader($oauth, self::API_URL . '/' . $url);
366
+        $headers[] = $this->calculateHeader($oauth, self::API_URL.'/'.$url);
367 367
         $headers[] = 'Expect:';
368 368
 
369 369
         // based on the method, we should handle the parameters in a different way
@@ -384,14 +384,14 @@  discard block
 block discarded – undo
384 384
                 elseif ($fileInfo['extension'] === 'png') $mimeType = 'image/png';
385 385
 
386 386
                 // init var
387
-                $content = '--' . $boundary . "\r\n";
387
+                $content = '--'.$boundary."\r\n";
388 388
 
389 389
                 // set file
390
-                $content = 'Content-Disposition: form-data; name="image";filename="' . $fileInfo['basename'] . '"' . "\r\n" . 'Content-Type: ' . $mimeType . "\r\n\r\n" . file_get_contents($filePath) . "\r\n--" . $boundary . "\r\n";
390
+                $content = 'Content-Disposition: form-data; name="image";filename="'.$fileInfo['basename'].'"'."\r\n".'Content-Type: '.$mimeType."\r\n\r\n".file_get_contents($filePath)."\r\n--".$boundary."\r\n";
391 391
 
392 392
                 // build headers
393
-                $headers[] = 'Content-Type: multipart/form-data; boundary=' . $boundary;
394
-                $headers[] = 'Content-Length: ' . strlen($content);
393
+                $headers[] = 'Content-Type: multipart/form-data; boundary='.$boundary;
394
+                $headers[] = 'Content-Length: '.strlen($content);
395 395
 
396 396
                 // set content
397 397
                 $options[CURLOPT_POSTFIELDS] = $content;
@@ -402,16 +402,16 @@  discard block
 block discarded – undo
402 402
             $options[CURLOPT_POST] = 1;
403 403
         } else {
404 404
             // add the parameters into the querystring
405
-            if (!empty($parameters)) $url .= '?' . $this->buildQuery($parameters);
405
+            if (!empty($parameters)) $url .= '?'.$this->buildQuery($parameters);
406 406
         }
407 407
 
408 408
         // set options
409
-        $options[CURLOPT_URL]            = self::API_URL . '/' . $url;
409
+        $options[CURLOPT_URL]            = self::API_URL.'/'.$url;
410 410
         $options[CURLOPT_PORT]           = self::API_PORT;
411 411
         $options[CURLOPT_USERAGENT]      = $this->getUserAgent();
412 412
         $options[CURLOPT_FOLLOWLOCATION] = true;
413 413
         $options[CURLOPT_RETURNTRANSFER] = true;
414
-        $options[CURLOPT_TIMEOUT]        = (int)$this->getTimeOut();
414
+        $options[CURLOPT_TIMEOUT]        = (int) $this->getTimeOut();
415 415
         $options[CURLOPT_SSL_VERIFYPEER] = false;
416 416
         $options[CURLOPT_SSL_VERIFYHOST] = false;
417 417
         $options[CURLOPT_HTTP_VERSION]   = CURL_HTTP_VERSION_1_1;
@@ -562,7 +562,7 @@  discard block
 block discarded – undo
562 562
      */
563 563
     public function getTimeOut()
564 564
     {
565
-        return (int)$this->timeOut;
565
+        return (int) $this->timeOut;
566 566
     }
567 567
 
568 568
     /**
@@ -573,7 +573,7 @@  discard block
 block discarded – undo
573 573
      */
574 574
     public function getUserAgent()
575 575
     {
576
-        return (string)'PHP Twitter/' . self::VERSION . ' ' . $this->userAgent;
576
+        return (string) 'PHP Twitter/'.self::VERSION.' '.$this->userAgent;
577 577
     }
578 578
 
579 579
     /**
@@ -584,7 +584,7 @@  discard block
 block discarded – undo
584 584
      */
585 585
     private function setConsumerKey($key)
586 586
     {
587
-        $this->consumerKey = (string)$key;
587
+        $this->consumerKey = (string) $key;
588 588
     }
589 589
 
590 590
     /**
@@ -595,7 +595,7 @@  discard block
 block discarded – undo
595 595
      */
596 596
     private function setConsumerSecret($secret)
597 597
     {
598
-        $this->consumerSecret = (string)$secret;
598
+        $this->consumerSecret = (string) $secret;
599 599
     }
600 600
 
601 601
     /**
@@ -606,7 +606,7 @@  discard block
 block discarded – undo
606 606
      */
607 607
     public function setOAuthToken($token)
608 608
     {
609
-        $this->oAuthToken = (string)$token;
609
+        $this->oAuthToken = (string) $token;
610 610
     }
611 611
 
612 612
     /**
@@ -617,7 +617,7 @@  discard block
 block discarded – undo
617 617
      */
618 618
     public function setOAuthTokenSecret($secret)
619 619
     {
620
-        $this->oAuthTokenSecret = (string)$secret;
620
+        $this->oAuthTokenSecret = (string) $secret;
621 621
     }
622 622
 
623 623
     /**
@@ -628,7 +628,7 @@  discard block
 block discarded – undo
628 628
      */
629 629
     public function setTimeOut($seconds)
630 630
     {
631
-        $this->timeOut = (int)$seconds;
631
+        $this->timeOut = (int) $seconds;
632 632
     }
633 633
 
634 634
     /**
@@ -640,7 +640,7 @@  discard block
 block discarded – undo
640 640
      */
641 641
     public function setUserAgent($userAgent)
642 642
     {
643
-        $this->userAgent = (string)$userAgent;
643
+        $this->userAgent = (string) $userAgent;
644 644
     }
645 645
 
646 646
     /**
@@ -685,14 +685,14 @@  discard block
 block discarded – undo
685 685
     public function statusesPublicTimeline($skipUser = false)
686 686
     {
687 687
         // redefine
688
-        $skipUser = (bool)$skipUser;
688
+        $skipUser = (bool) $skipUser;
689 689
 
690 690
         // build parameters
691 691
         $parameters = array();
692 692
         if ($skipUser) $parameters['skip_user'] = 'true';
693 693
 
694 694
         // make the call
695
-        return (array)$this->doCall('statuses/public_timeline.json', $parameters);
695
+        return (array) $this->doCall('statuses/public_timeline.json', $parameters);
696 696
     }
697 697
 
698 698
     /**
@@ -708,18 +708,18 @@  discard block
 block discarded – undo
708 708
     public function statusesHomeTimeline($sinceId = null, $maxId = null, $count = null, $page = null, $skipUser = false)
709 709
     {
710 710
         // redefine
711
-        $skipUser = (bool)$skipUser;
711
+        $skipUser = (bool) $skipUser;
712 712
 
713 713
         // build parameters
714 714
         $parameters = array();
715
-        if ($sinceId != null) $parameters['since_id'] = (string)$sinceId;
716
-        if ($maxId != null) $parameters['max_id'] = (string)$maxId;
717
-        if ($count != null) $parameters['count'] = (int)$count;
718
-        if ($page != null) $parameters['page'] = (int)$page;
715
+        if ($sinceId != null) $parameters['since_id'] = (string) $sinceId;
716
+        if ($maxId != null) $parameters['max_id'] = (string) $maxId;
717
+        if ($count != null) $parameters['count'] = (int) $count;
718
+        if ($page != null) $parameters['page'] = (int) $page;
719 719
         if ($skipUser) $parameters['skip_user'] = 'true';
720 720
 
721 721
         // make the call
722
-        return (array)$this->doCall('statuses/home_timeline.json', $parameters, true);
722
+        return (array) $this->doCall('statuses/home_timeline.json', $parameters, true);
723 723
     }
724 724
 
725 725
     /**
@@ -739,18 +739,18 @@  discard block
 block discarded – undo
739 739
     public function statusesFriendsTimeline($sinceId = null, $maxId = null, $count = null, $page = null, $skipUser = false)
740 740
     {
741 741
         // redefine
742
-        $skipUser = (bool)$skipUser;
742
+        $skipUser = (bool) $skipUser;
743 743
 
744 744
         // build parameters
745 745
         $parameters = array();
746
-        if ($sinceId != null) $parameters['since_id'] = (string)$sinceId;
747
-        if ($maxId != null) $parameters['max_id'] = (string)$maxId;
748
-        if ($count != null) $parameters['count'] = (int)$count;
749
-        if ($page != null) $parameters['page'] = (int)$page;
746
+        if ($sinceId != null) $parameters['since_id'] = (string) $sinceId;
747
+        if ($maxId != null) $parameters['max_id'] = (string) $maxId;
748
+        if ($count != null) $parameters['count'] = (int) $count;
749
+        if ($page != null) $parameters['page'] = (int) $page;
750 750
         if ($skipUser) $parameters['skip_user'] = 'true';
751 751
 
752 752
         // make the call
753
-        return (array)$this->doCall('statuses/friends_timeline.json', $parameters, true);
753
+        return (array) $this->doCall('statuses/friends_timeline.json', $parameters, true);
754 754
     }
755 755
 
756 756
     /**
@@ -773,21 +773,21 @@  discard block
 block discarded – undo
773 773
     public function statusesUserTimeline($id = null, $userId = null, $screenName = null, $sinceId = null, $maxId = null, $count = null, $page = null, $skipUser = false)
774 774
     {
775 775
         // redefine
776
-        $skipUser = (bool)$skipUser;
776
+        $skipUser = (bool) $skipUser;
777 777
 
778 778
         // build parameters
779 779
         $parameters = array();
780
-        if ($id != null) $parameters['id'] = (string)$id;
781
-        if ($userId != null) $parameters['user_id'] = (string)$userId;
782
-        if ($screenName != null) $parameters['screen_name'] = (string)$screenName;
783
-        if ($sinceId != null) $parameters['since_id'] = (string)$sinceId;
784
-        if ($maxId != null) $parameters['max_id'] = (string)$maxId;
785
-        if ($count != null) $parameters['count'] = (int)$count;
786
-        if ($page != null) $parameters['page'] = (int)$page;
780
+        if ($id != null) $parameters['id'] = (string) $id;
781
+        if ($userId != null) $parameters['user_id'] = (string) $userId;
782
+        if ($screenName != null) $parameters['screen_name'] = (string) $screenName;
783
+        if ($sinceId != null) $parameters['since_id'] = (string) $sinceId;
784
+        if ($maxId != null) $parameters['max_id'] = (string) $maxId;
785
+        if ($count != null) $parameters['count'] = (int) $count;
786
+        if ($page != null) $parameters['page'] = (int) $page;
787 787
         if ($skipUser) $parameters['skip_user'] = 'true';
788 788
 
789 789
         // make the call
790
-        return (array)$this->doCall('statuses/user_timeline.json', $parameters, true);
790
+        return (array) $this->doCall('statuses/user_timeline.json', $parameters, true);
791 791
     }
792 792
 
793 793
     /**
@@ -812,13 +812,13 @@  discard block
 block discarded – undo
812 812
 
813 813
         // build parameters
814 814
         $parameters = array();
815
-        if ($sinceId != null) $parameters['since_id'] = (string)$sinceId;
816
-        if ($maxId != null) $parameters['max_id'] = (string)$maxId;
817
-        if ($count != null) $parameters['count'] = (int)$count;
818
-        if ($page != null) $parameters['page'] = (int)$page;
815
+        if ($sinceId != null) $parameters['since_id'] = (string) $sinceId;
816
+        if ($maxId != null) $parameters['max_id'] = (string) $maxId;
817
+        if ($count != null) $parameters['count'] = (int) $count;
818
+        if ($page != null) $parameters['page'] = (int) $page;
819 819
 
820 820
         // make the call
821
-        return (array)$this->doCall('statuses/mentions.json', $parameters);
821
+        return (array) $this->doCall('statuses/mentions.json', $parameters);
822 822
     }
823 823
 
824 824
     /**
@@ -843,13 +843,13 @@  discard block
 block discarded – undo
843 843
 
844 844
         // build parameters
845 845
         $parameters = array();
846
-        if ($sinceId != null) $parameters['since_id'] = (string)$sinceId;
847
-        if ($maxId != null) $parameters['max_id'] = (string)$maxId;
848
-        if ($count != null) $parameters['count'] = (int)$count;
849
-        if ($page != null) $parameters['page'] = (int)$page;
846
+        if ($sinceId != null) $parameters['since_id'] = (string) $sinceId;
847
+        if ($maxId != null) $parameters['max_id'] = (string) $maxId;
848
+        if ($count != null) $parameters['count'] = (int) $count;
849
+        if ($page != null) $parameters['page'] = (int) $page;
850 850
 
851 851
         // make the call
852
-        return (array)$this->doCall('statuses/retweeted_by_me.json', $parameters);
852
+        return (array) $this->doCall('statuses/retweeted_by_me.json', $parameters);
853 853
     }
854 854
 
855 855
     /**
@@ -874,13 +874,13 @@  discard block
 block discarded – undo
874 874
 
875 875
         // build parameters
876 876
         $parameters = array();
877
-        if ($sinceId != null) $parameters['since_id'] = (string)$sinceId;
878
-        if ($maxId != null) $parameters['max_id'] = (string)$maxId;
879
-        if ($count != null) $parameters['count'] = (int)$count;
880
-        if ($page != null) $parameters['page'] = (int)$page;
877
+        if ($sinceId != null) $parameters['since_id'] = (string) $sinceId;
878
+        if ($maxId != null) $parameters['max_id'] = (string) $maxId;
879
+        if ($count != null) $parameters['count'] = (int) $count;
880
+        if ($page != null) $parameters['page'] = (int) $page;
881 881
 
882 882
         // make the call
883
-        return (array)$this->doCall('statuses/retweeted_by_me.json', $parameters);
883
+        return (array) $this->doCall('statuses/retweeted_by_me.json', $parameters);
884 884
     }
885 885
 
886 886
 
@@ -907,13 +907,13 @@  discard block
 block discarded – undo
907 907
 
908 908
         // build parameters
909 909
         $parameters = array();
910
-        if ($sinceId != null) $parameters['since_id'] = (string)$sinceId;
911
-        if ($maxId != null) $parameters['max_id'] = (string)$maxId;
912
-        if ($count != null) $parameters['count'] = (int)$count;
913
-        if ($page != null) $parameters['page'] = (int)$page;
910
+        if ($sinceId != null) $parameters['since_id'] = (string) $sinceId;
911
+        if ($maxId != null) $parameters['max_id'] = (string) $maxId;
912
+        if ($count != null) $parameters['count'] = (int) $count;
913
+        if ($page != null) $parameters['page'] = (int) $page;
914 914
 
915 915
         // make the call
916
-        return (array)$this->doCall('statuses/retweets_of_me.json', $parameters);
916
+        return (array) $this->doCall('statuses/retweets_of_me.json', $parameters);
917 917
     }
918 918
 
919 919
     /**
@@ -925,10 +925,10 @@  discard block
 block discarded – undo
925 925
     public function statusesShow($id)
926 926
     {
927 927
         // build parameters
928
-        $parameters['id'] = (string)$id;
928
+        $parameters['id'] = (string) $id;
929 929
 
930 930
         // make the call
931
-        return (array)$this->doCall('statuses/show.json', $parameters);
931
+        return (array) $this->doCall('statuses/show.json', $parameters);
932 932
     }
933 933
 
934 934
     /**
@@ -945,15 +945,15 @@  discard block
 block discarded – undo
945 945
     public function statusesUpdate($status, $inReplyToStatusId = null, $lat = null, $long = null, $placeId = null, $displayCoordinates = false)
946 946
     {
947 947
         // build parameters
948
-        $parameters['status'] = (string)$status;
949
-        if ($inReplyToStatusId != null) $parameters['in_reply_to_status_id'] = (string)$inReplyToStatusId;
950
-        if ($lat != null) $parameters['lat'] = (float)$lat;
951
-        if ($long != null) $parameters['long'] = (float)$long;
952
-        if ($placeId != null) $parameters['place_id'] = (string)$placeId;
948
+        $parameters['status'] = (string) $status;
949
+        if ($inReplyToStatusId != null) $parameters['in_reply_to_status_id'] = (string) $inReplyToStatusId;
950
+        if ($lat != null) $parameters['lat'] = (float) $lat;
951
+        if ($long != null) $parameters['long'] = (float) $long;
952
+        if ($placeId != null) $parameters['place_id'] = (string) $placeId;
953 953
         if ($displayCoordinates) $parameters['display_coordinates'] = 'true';
954 954
 
955 955
         // make the call
956
-        return (array)$this->doCall('statuses/update.json', $parameters, true, 'POST');
956
+        return (array) $this->doCall('statuses/update.json', $parameters, true, 'POST');
957 957
     }
958 958
 
959 959
     /**
@@ -966,10 +966,10 @@  discard block
 block discarded – undo
966 966
     public function statusesDestroy($id)
967 967
     {
968 968
         // build parameters
969
-        $parameters['id'] = (string)$id;
969
+        $parameters['id'] = (string) $id;
970 970
 
971 971
         // make the call
972
-        return (array)$this->doCall('statuses/destroy.json', $parameters, true, 'POST');
972
+        return (array) $this->doCall('statuses/destroy.json', $parameters, true, 'POST');
973 973
     }
974 974
 
975 975
     /**
@@ -981,7 +981,7 @@  discard block
 block discarded – undo
981 981
     public function statusesRetweet($id)
982 982
     {
983 983
         // make the call
984
-        return (array)$this->doCall('statuses/retweet/' . $id . '.json', null, true, 'POST');
984
+        return (array) $this->doCall('statuses/retweet/'.$id.'.json', null, true, 'POST');
985 985
     }
986 986
 
987 987
     /**
@@ -1000,10 +1000,10 @@  discard block
 block discarded – undo
1000 1000
 
1001 1001
         // build parameters
1002 1002
         $parameters = null;
1003
-        if ($count != null) $parameters['count'] = (int)$count;
1003
+        if ($count != null) $parameters['count'] = (int) $count;
1004 1004
 
1005 1005
         // make the call
1006
-        return (array)$this->doCall('statuses/retweets/' . $id . '.json', $parameters);
1006
+        return (array) $this->doCall('statuses/retweets/'.$id.'.json', $parameters);
1007 1007
     }
1008 1008
 
1009 1009
     /**
@@ -1025,11 +1025,11 @@  discard block
 block discarded – undo
1025 1025
 
1026 1026
         // build parameters
1027 1027
         $parameters = null;
1028
-        if ($count != null) $parameters['count'] = (int)$count;
1029
-        if ($page != null) $parameters['page'] = (int)$page;
1028
+        if ($count != null) $parameters['count'] = (int) $count;
1029
+        if ($page != null) $parameters['page'] = (int) $page;
1030 1030
 
1031 1031
         // make the call
1032
-        return (array)$this->doCall('statuses/' . (string)$id . '/retweeted_by.json', $parameters, true);
1032
+        return (array) $this->doCall('statuses/'.(string) $id.'/retweeted_by.json', $parameters, true);
1033 1033
     }
1034 1034
 
1035 1035
     /**
@@ -1051,11 +1051,11 @@  discard block
 block discarded – undo
1051 1051
 
1052 1052
         // build parameters
1053 1053
         $parameters = null;
1054
-        if ($count != null) $parameters['count'] = (int)$count;
1055
-        if ($page != null) $parameters['page'] = (int)$page;
1054
+        if ($count != null) $parameters['count'] = (int) $count;
1055
+        if ($page != null) $parameters['page'] = (int) $page;
1056 1056
 
1057 1057
         // make the call
1058
-        return (array)$this->doCall('statuses/' . (string)$id . '/retweeted_by/ids.json', $parameters, true);
1058
+        return (array) $this->doCall('statuses/'.(string) $id.'/retweeted_by/ids.json', $parameters, true);
1059 1059
     }
1060 1060
 
1061 1061
 
@@ -1080,12 +1080,12 @@  discard block
 block discarded – undo
1080 1080
         if ($id == '' && $userId == '' && $screenName == '') throw new TwitterException('Specify an id or an userId or a screenName.');
1081 1081
 
1082 1082
         // build parameters
1083
-        if ($id != null) $parameters['id'] = (string)$id;
1084
-        if ($userId != null) $parameters['user_id'] = (string)$userId;
1085
-        if ($screenName != null) $parameters['screen_name'] = (string)$screenName;
1083
+        if ($id != null) $parameters['id'] = (string) $id;
1084
+        if ($userId != null) $parameters['user_id'] = (string) $userId;
1085
+        if ($screenName != null) $parameters['screen_name'] = (string) $screenName;
1086 1086
 
1087 1087
         // make the call
1088
-        return (array)$this->doCall('users/show.json', $parameters);
1088
+        return (array) $this->doCall('users/show.json', $parameters);
1089 1089
     }
1090 1090
 
1091 1091
     /**
@@ -1103,8 +1103,8 @@  discard block
 block discarded – undo
1103 1103
     public function usersLookup($userIds = null, $screenNames = null)
1104 1104
     {
1105 1105
         // redefine
1106
-        $userIds     = (array)$userIds;
1107
-        $screenNames = (array)$screenNames;
1106
+        $userIds     = (array) $userIds;
1107
+        $screenNames = (array) $screenNames;
1108 1108
 
1109 1109
         // validate
1110 1110
         if (empty($userIds) && empty($screenNames)) throw new TwitterException('Specify an userId or a screenName.');
@@ -1114,7 +1114,7 @@  discard block
 block discarded – undo
1114 1114
         if (!empty($screenNames)) $parameters['screen_name'] = implode(',', $screenNames);
1115 1115
 
1116 1116
         // make the call
1117
-        return (array)$this->doCall('users/lookup.json', $parameters, true);
1117
+        return (array) $this->doCall('users/lookup.json', $parameters, true);
1118 1118
 
1119 1119
     }
1120 1120
 
@@ -1130,12 +1130,12 @@  discard block
 block discarded – undo
1130 1130
     public function usersSearch($q, $perPage = null, $page = null)
1131 1131
     {
1132 1132
         // build parameters
1133
-        $parameters['q'] = (string)$q;
1134
-        if ($perPage != null) $parameters['per_page'] = (int)$perPage;
1135
-        if ($page != null) $parameters['page'] = (int)$page;
1133
+        $parameters['q'] = (string) $q;
1134
+        if ($perPage != null) $parameters['per_page'] = (int) $perPage;
1135
+        if ($page != null) $parameters['page'] = (int) $page;
1136 1136
 
1137 1137
         // make the call
1138
-        return (array)$this->doCall('users/search.json', $parameters, true);
1138
+        return (array) $this->doCall('users/search.json', $parameters, true);
1139 1139
 
1140 1140
     }
1141 1141
 
@@ -1146,7 +1146,7 @@  discard block
 block discarded – undo
1146 1146
      */
1147 1147
     public function usersSuggestions()
1148 1148
     {
1149
-        return (array)$this->doCall('users/suggestions.json', null, true);
1149
+        return (array) $this->doCall('users/suggestions.json', null, true);
1150 1150
     }
1151 1151
 
1152 1152
     /**
@@ -1158,7 +1158,7 @@  discard block
 block discarded – undo
1158 1158
      */
1159 1159
     public function usersSuggestionsSlug($slug)
1160 1160
     {
1161
-        return (array)$this->doCall('users/suggestions/' . (string)$slug . '.json');
1161
+        return (array) $this->doCall('users/suggestions/'.(string) $slug.'.json');
1162 1162
     }
1163 1163
 
1164 1164
     /**
@@ -1179,13 +1179,13 @@  discard block
 block discarded – undo
1179 1179
     {
1180 1180
         // build parameters
1181 1181
         $parameters = array();
1182
-        if ($id != null) $parameters['id'] = (string)$id;
1183
-        if ($userId != null) $parameters['user_id'] = (string)$userId;
1184
-        if ($screenName != null) $parameters['screen_name'] = (string)$screenName;
1185
-        if ($cursor != null) $parameters['cursor'] = (int)$cursor;
1182
+        if ($id != null) $parameters['id'] = (string) $id;
1183
+        if ($userId != null) $parameters['user_id'] = (string) $userId;
1184
+        if ($screenName != null) $parameters['screen_name'] = (string) $screenName;
1185
+        if ($cursor != null) $parameters['cursor'] = (int) $cursor;
1186 1186
 
1187 1187
         // make the call
1188
-        return (array)$this->doCall('statuses/friends.json', $parameters);
1188
+        return (array) $this->doCall('statuses/friends.json', $parameters);
1189 1189
     }
1190 1190
 
1191 1191
     /**
@@ -1202,13 +1202,13 @@  discard block
 block discarded – undo
1202 1202
     {
1203 1203
         // build parameters
1204 1204
         $parameters = array();
1205
-        if ($id != null) $parameters['id'] = (string)$id;
1206
-        if ($userId != null) $parameters['user_id'] = (string)$userId;
1207
-        if ($screenName != null) $parameters['screen_name'] = (string)$screenName;
1208
-        if ($cursor != null) $parameters['cursor'] = (int)$cursor;
1205
+        if ($id != null) $parameters['id'] = (string) $id;
1206
+        if ($userId != null) $parameters['user_id'] = (string) $userId;
1207
+        if ($screenName != null) $parameters['screen_name'] = (string) $screenName;
1208
+        if ($cursor != null) $parameters['cursor'] = (int) $cursor;
1209 1209
 
1210 1210
         // make the call
1211
-        return (array)$this->doCall('statuses/followers.json', $parameters);
1211
+        return (array) $this->doCall('statuses/followers.json', $parameters);
1212 1212
     }
1213 1213
 
1214 1214
 
@@ -1221,7 +1221,7 @@  discard block
 block discarded – undo
1221 1221
      */
1222 1222
     public function trends()
1223 1223
     {
1224
-        return (array)$this->doCall('trends.json');
1224
+        return (array) $this->doCall('trends.json');
1225 1225
     }
1226 1226
 
1227 1227
     /**
@@ -1235,10 +1235,10 @@  discard block
 block discarded – undo
1235 1235
     {
1236 1236
         // build parameters
1237 1237
         $parameters = array();
1238
-        if ($exclude != null) $parameters['exclude'] = (string)$exclude;
1238
+        if ($exclude != null) $parameters['exclude'] = (string) $exclude;
1239 1239
 
1240 1240
         // make the call
1241
-        return (array)$this->doCall('trends/current.json', $parameters);
1241
+        return (array) $this->doCall('trends/current.json', $parameters);
1242 1242
     }
1243 1243
 
1244 1244
     /**
@@ -1252,11 +1252,11 @@  discard block
 block discarded – undo
1252 1252
     {
1253 1253
         // build parameters
1254 1254
         $parameters = array();
1255
-        if ($exclude != null) $parameters['exclude'] = (string)$exclude;
1256
-        if ($date != null) $parameters['date'] = (string)$date;
1255
+        if ($exclude != null) $parameters['exclude'] = (string) $exclude;
1256
+        if ($date != null) $parameters['date'] = (string) $date;
1257 1257
 
1258 1258
         // make the call
1259
-        return (array)$this->doCall('trends/daily.json', $parameters);
1259
+        return (array) $this->doCall('trends/daily.json', $parameters);
1260 1260
     }
1261 1261
 
1262 1262
     /**
@@ -1270,11 +1270,11 @@  discard block
 block discarded – undo
1270 1270
     {
1271 1271
         // build parameters
1272 1272
         $parameters = array();
1273
-        if ($exclude != null) $parameters['exclude'] = (string)$exclude;
1274
-        if ($date != null) $parameters['date'] = (string)$date;
1273
+        if ($exclude != null) $parameters['exclude'] = (string) $exclude;
1274
+        if ($date != null) $parameters['date'] = (string) $date;
1275 1275
 
1276 1276
         // make the call
1277
-        return (array)$this->doCall('trends/weekly.json', $parameters);
1277
+        return (array) $this->doCall('trends/weekly.json', $parameters);
1278 1278
     }
1279 1279
 
1280 1280
 
@@ -1298,15 +1298,15 @@  discard block
 block discarded – undo
1298 1298
         $allowedModes = array('public', 'private');
1299 1299
 
1300 1300
         // validate
1301
-        if ($mode != null && !in_array($mode, $allowedModes)) throw new TwitterException('Invalid mode (), possible values are: ' . implode($allowedModes) . '.');
1301
+        if ($mode != null && !in_array($mode, $allowedModes)) throw new TwitterException('Invalid mode (), possible values are: '.implode($allowedModes).'.');
1302 1302
 
1303 1303
         // build parameters
1304
-        $parameters['name'] = (string)$name;
1305
-        if ($mode != null) $parameters['mode'] = (string)$mode;
1306
-        if ($description != null) $parameters['description'] = (string)$description;
1304
+        $parameters['name'] = (string) $name;
1305
+        if ($mode != null) $parameters['mode'] = (string) $mode;
1306
+        if ($description != null) $parameters['description'] = (string) $description;
1307 1307
 
1308 1308
         // make the call
1309
-        return (array)$this->doCall((string)$user . '/lists.json', $parameters, true, 'POST');
1309
+        return (array) $this->doCall((string) $user.'/lists.json', $parameters, true, 'POST');
1310 1310
     }
1311 1311
 
1312 1312
     /**
@@ -1319,10 +1319,10 @@  discard block
 block discarded – undo
1319 1319
     public function userLists($user, $cursor = null)
1320 1320
     {
1321 1321
         $parameters = null;
1322
-        if ($cursor != null) $parameters['cursor'] = (string)$cursor;
1322
+        if ($cursor != null) $parameters['cursor'] = (string) $cursor;
1323 1323
 
1324 1324
         // make the call
1325
-        return (array)$this->doCall((string)$user . '/lists.json', $parameters, true);
1325
+        return (array) $this->doCall((string) $user.'/lists.json', $parameters, true);
1326 1326
     }
1327 1327
 
1328 1328
     /**
@@ -1335,7 +1335,7 @@  discard block
 block discarded – undo
1335 1335
     public function userListsId($user, $id)
1336 1336
     {
1337 1337
         // make the call
1338
-        return (array)$this->doCall((string)$user . '/lists/' . (string)$id . '.json', null, true);
1338
+        return (array) $this->doCall((string) $user.'/lists/'.(string) $id.'.json', null, true);
1339 1339
     }
1340 1340
 
1341 1341
     /**
@@ -1359,15 +1359,15 @@  discard block
 block discarded – undo
1359 1359
         $allowedModes = array('public', 'private');
1360 1360
 
1361 1361
         // validate
1362
-        if ($mode != null && !in_array($mode, $allowedModes)) throw new TwitterException('Invalid mode (), possible values are: ' . implode($allowedModes) . '.');
1362
+        if ($mode != null && !in_array($mode, $allowedModes)) throw new TwitterException('Invalid mode (), possible values are: '.implode($allowedModes).'.');
1363 1363
 
1364 1364
         // build parameters
1365
-        if ($name != null) $parameters['name'] = (string)$name;
1366
-        if ($mode != null) $parameters['mode'] = (string)$mode;
1367
-        if ($description != null) $parameters['description'] = (string)$description;
1365
+        if ($name != null) $parameters['name'] = (string) $name;
1366
+        if ($mode != null) $parameters['mode'] = (string) $mode;
1367
+        if ($description != null) $parameters['description'] = (string) $description;
1368 1368
 
1369 1369
         // make the call
1370
-        return (array)$this->doCall((string)$user . '/lists/' . (string)$id . '.json', $parameters, true, 'POST');
1370
+        return (array) $this->doCall((string) $user.'/lists/'.(string) $id.'.json', $parameters, true, 'POST');
1371 1371
     }
1372 1372
 
1373 1373
     /**
@@ -1394,13 +1394,13 @@  discard block
 block discarded – undo
1394 1394
 
1395 1395
         // build parameters
1396 1396
         $parameters = array();
1397
-        if ($sinceId != null) $parameters['since_id'] = (string)$sinceId;
1398
-        if ($maxId != null) $parameters['max_id'] = (string)$maxId;
1399
-        if ($count != null) $parameters['per_page'] = (int)$count;
1400
-        if ($page != null) $parameters['page'] = (int)$page;
1397
+        if ($sinceId != null) $parameters['since_id'] = (string) $sinceId;
1398
+        if ($maxId != null) $parameters['max_id'] = (string) $maxId;
1399
+        if ($count != null) $parameters['per_page'] = (int) $count;
1400
+        if ($page != null) $parameters['page'] = (int) $page;
1401 1401
 
1402 1402
         // make the call
1403
-        return (array)$this->doCall((string)$user . '/lists/' . (string)$id . '/statuses.json', $parameters);
1403
+        return (array) $this->doCall((string) $user.'/lists/'.(string) $id.'/statuses.json', $parameters);
1404 1404
     }
1405 1405
 
1406 1406
     /**
@@ -1413,10 +1413,10 @@  discard block
 block discarded – undo
1413 1413
     public function userListsMemberships($user, $cursor = null)
1414 1414
     {
1415 1415
         $parameters = null;
1416
-        if ($cursor != null) $parameters['cursor'] = (string)$cursor;
1416
+        if ($cursor != null) $parameters['cursor'] = (string) $cursor;
1417 1417
 
1418 1418
         // make the call
1419
-        return (array)$this->doCall((string)$user . '/lists/memberships.json', $parameters, true);
1419
+        return (array) $this->doCall((string) $user.'/lists/memberships.json', $parameters, true);
1420 1420
     }
1421 1421
 
1422 1422
     /**
@@ -1429,10 +1429,10 @@  discard block
 block discarded – undo
1429 1429
     public function userListsSubscriptions($user, $cursor = null)
1430 1430
     {
1431 1431
         $parameters = null;
1432
-        if ($cursor != null) $parameters['cursor'] = (string)$cursor;
1432
+        if ($cursor != null) $parameters['cursor'] = (string) $cursor;
1433 1433
 
1434 1434
         // make the call
1435
-        return (array)$this->doCall((string)$user . '/lists/subscriptions.json', $parameters, true);
1435
+        return (array) $this->doCall((string) $user.'/lists/subscriptions.json', $parameters, true);
1436 1436
     }
1437 1437
 
1438 1438
 
@@ -1448,10 +1448,10 @@  discard block
 block discarded – undo
1448 1448
     public function userListMembers($user, $id, $cursor = null)
1449 1449
     {
1450 1450
         $parameters = null;
1451
-        if ($cursor != null) $parameters['cursor'] = (string)$cursor;
1451
+        if ($cursor != null) $parameters['cursor'] = (string) $cursor;
1452 1452
 
1453 1453
         // make the call
1454
-        return (array)$this->doCall((string)$user . '/' . (string)$id . '/members.json', $parameters, true);
1454
+        return (array) $this->doCall((string) $user.'/'.(string) $id.'/members.json', $parameters, true);
1455 1455
     }
1456 1456
 
1457 1457
     /**
@@ -1465,10 +1465,10 @@  discard block
 block discarded – undo
1465 1465
     public function userListMembersCreate($user, $id, $userId)
1466 1466
     {
1467 1467
         // build parameters
1468
-        $parameters['id'] = (string)$userId;
1468
+        $parameters['id'] = (string) $userId;
1469 1469
 
1470 1470
         // make the call
1471
-        return (array)$this->doCall((string)$user . '/' . (string)$id . '/members.json', $parameters, true, 'POST');
1471
+        return (array) $this->doCall((string) $user.'/'.(string) $id.'/members.json', $parameters, true, 'POST');
1472 1472
     }
1473 1473
 
1474 1474
     /**
@@ -1482,11 +1482,11 @@  discard block
 block discarded – undo
1482 1482
     public function userListMembersDelete($user, $id, $userId)
1483 1483
     {
1484 1484
         // build parameters
1485
-        $parameters['id']      = (string)$userId;
1485
+        $parameters['id']      = (string) $userId;
1486 1486
         $parameters['_method'] = 'DELETE';
1487 1487
 
1488 1488
         // make the call
1489
-        return (array)$this->doCall((string)$user . '/' . (string)$id . '/members.json', $parameters, true, 'POST');
1489
+        return (array) $this->doCall((string) $user.'/'.(string) $id.'/members.json', $parameters, true, 'POST');
1490 1490
     }
1491 1491
 
1492 1492
     /**
@@ -1503,7 +1503,7 @@  discard block
 block discarded – undo
1503 1503
     {
1504 1504
         try {
1505 1505
             // make the call
1506
-            return (array)$this->doCall((string)$user . '/' . (string)$id . '/members/' . (string)$userId . '.json', null, true);
1506
+            return (array) $this->doCall((string) $user.'/'.(string) $id.'/members/'.(string) $userId.'.json', null, true);
1507 1507
         } // catch exceptions
1508 1508
         catch (TwitterException $e) {
1509 1509
             if ($e->getMessage() === 'The specified user is not a member of this list') {
@@ -1525,10 +1525,10 @@  discard block
 block discarded – undo
1525 1525
     public function userListSubscribers($user, $id, $cursor = null)
1526 1526
     {
1527 1527
         $parameters = null;
1528
-        if ($cursor != null) $parameters['cursor'] = (string)$cursor;
1528
+        if ($cursor != null) $parameters['cursor'] = (string) $cursor;
1529 1529
 
1530 1530
         // make the call
1531
-        return (array)$this->doCall((string)$user . '/' . (string)$id . '/subscribers.json', $parameters, true);
1531
+        return (array) $this->doCall((string) $user.'/'.(string) $id.'/subscribers.json', $parameters, true);
1532 1532
     }
1533 1533
 
1534 1534
     /**
@@ -1541,7 +1541,7 @@  discard block
 block discarded – undo
1541 1541
     public function userListSubscribersCreate($user, $id)
1542 1542
     {
1543 1543
         // make the call
1544
-        return (array)$this->doCall((string)$user . '/' . (string)$id . '/subscribers.json', null, true, 'POST');
1544
+        return (array) $this->doCall((string) $user.'/'.(string) $id.'/subscribers.json', null, true, 'POST');
1545 1545
     }
1546 1546
 
1547 1547
     /**
@@ -1557,7 +1557,7 @@  discard block
 block discarded – undo
1557 1557
         $parameters['_method'] = 'DELETE';
1558 1558
 
1559 1559
         // make the call
1560
-        return (array)$this->doCall((string)$user . '/' . (string)$id . '/subscribers.json', $parameters, true, 'POST');
1560
+        return (array) $this->doCall((string) $user.'/'.(string) $id.'/subscribers.json', $parameters, true, 'POST');
1561 1561
     }
1562 1562
 
1563 1563
     /**
@@ -1574,7 +1574,7 @@  discard block
 block discarded – undo
1574 1574
     {
1575 1575
         try {
1576 1576
             // make the call
1577
-            return (array)$this->doCall((string)$user . '/' . (string)$id . '/subscribers/' . (string)$userId . '.json', null, true);
1577
+            return (array) $this->doCall((string) $user.'/'.(string) $id.'/subscribers/'.(string) $userId.'.json', null, true);
1578 1578
         } // catch exceptions
1579 1579
         catch (TwitterException $e) {
1580 1580
             if ($e->getMessage() === 'The specified user is not a subscriber of this list') {
@@ -1608,13 +1608,13 @@  discard block
 block discarded – undo
1608 1608
 
1609 1609
         // build parameters
1610 1610
         $parameters = array();
1611
-        if ($sinceId != null) $parameters['since_id'] = (string)$sinceId;
1612
-        if ($maxId != null) $parameters['max_id'] = (string)$maxId;
1613
-        if ($count != null) $parameters['count'] = (int)$count;
1614
-        if ($page != null) $parameters['page'] = (int)$page;
1611
+        if ($sinceId != null) $parameters['since_id'] = (string) $sinceId;
1612
+        if ($maxId != null) $parameters['max_id'] = (string) $maxId;
1613
+        if ($count != null) $parameters['count'] = (int) $count;
1614
+        if ($page != null) $parameters['page'] = (int) $page;
1615 1615
 
1616 1616
         // make the call
1617
-        return (array)$this->doCall('direct_messages.json', $parameters, true);
1617
+        return (array) $this->doCall('direct_messages.json', $parameters, true);
1618 1618
     }
1619 1619
 
1620 1620
     /**
@@ -1639,13 +1639,13 @@  discard block
 block discarded – undo
1639 1639
 
1640 1640
         // build parameters
1641 1641
         $parameters = array();
1642
-        if ($sinceId != null) $parameters['since_id'] = (string)$sinceId;
1643
-        if ($maxId != null) $parameters['max_id'] = (string)$maxId;
1644
-        if ($count != null) $parameters['count'] = (int)$count;
1645
-        if ($page != null) $parameters['page'] = (int)$page;
1642
+        if ($sinceId != null) $parameters['since_id'] = (string) $sinceId;
1643
+        if ($maxId != null) $parameters['max_id'] = (string) $maxId;
1644
+        if ($count != null) $parameters['count'] = (int) $count;
1645
+        if ($page != null) $parameters['page'] = (int) $page;
1646 1646
 
1647 1647
         // make the call
1648
-        return (array)$this->doCall('direct_messages/sent.json', $parameters, true);
1648
+        return (array) $this->doCall('direct_messages/sent.json', $parameters, true);
1649 1649
     }
1650 1650
 
1651 1651
     /**
@@ -1669,13 +1669,13 @@  discard block
 block discarded – undo
1669 1669
         if ($id == '' && $userId == '' && $screenName == '') throw new TwitterException('Specify an id or an userId or a screenName.');
1670 1670
 
1671 1671
         // build parameters
1672
-        $parameters['text'] = (string)$text;
1673
-        if ($id != null) $parameters['user'] = (string)$id;
1674
-        if ($userId != null) $parameters['user_id'] = (string)$userId;
1675
-        if ($screenName != null) $parameters['screen_name'] = (string)$screenName;
1672
+        $parameters['text'] = (string) $text;
1673
+        if ($id != null) $parameters['user'] = (string) $id;
1674
+        if ($userId != null) $parameters['user_id'] = (string) $userId;
1675
+        if ($screenName != null) $parameters['screen_name'] = (string) $screenName;
1676 1676
 
1677 1677
         // make the call
1678
-        return (array)$this->doCall('direct_messages/new.json', $parameters, true, 'POST');
1678
+        return (array) $this->doCall('direct_messages/new.json', $parameters, true, 'POST');
1679 1679
     }
1680 1680
 
1681 1681
     /**
@@ -1687,10 +1687,10 @@  discard block
 block discarded – undo
1687 1687
     public function directMessagesDestroy($id)
1688 1688
     {
1689 1689
         // build parameters
1690
-        $parameters['id'] = (string)$id;
1690
+        $parameters['id'] = (string) $id;
1691 1691
 
1692 1692
         // make the call
1693
-        return (array)$this->doCall('direct_messages/destroy.json', $parameters, true, 'POST');
1693
+        return (array) $this->doCall('direct_messages/destroy.json', $parameters, true, 'POST');
1694 1694
     }
1695 1695
 
1696 1696
 
@@ -1718,13 +1718,13 @@  discard block
 block discarded – undo
1718 1718
         if ($id == '' && $userId == '' && $screenName == '') throw new TwitterException('Specify an id or an userId or a screenName.');
1719 1719
 
1720 1720
         // build parameters
1721
-        if ($id != null) $parameters['id'] = (string)$id;
1722
-        if ($userId != null) $parameters['user_id'] = (string)$userId;
1723
-        if ($screenName != null) $parameters['screen_name'] = (string)$screenName;
1721
+        if ($id != null) $parameters['id'] = (string) $id;
1722
+        if ($userId != null) $parameters['user_id'] = (string) $userId;
1723
+        if ($screenName != null) $parameters['screen_name'] = (string) $screenName;
1724 1724
         $parameters['follow'] = $follow ? 'true' : 'false';
1725 1725
 
1726 1726
         // make the call
1727
-        return (array)$this->doCall('friendships/create.json', $parameters, true, 'POST');
1727
+        return (array) $this->doCall('friendships/create.json', $parameters, true, 'POST');
1728 1728
     }
1729 1729
 
1730 1730
     /**
@@ -1747,12 +1747,12 @@  discard block
 block discarded – undo
1747 1747
         if ($id == '' && $userId == '' && $screenName == '') throw new TwitterException('Specify an id or an userId or a screenName.');
1748 1748
 
1749 1749
         // build parameters
1750
-        if ($id != null) $parameters['id'] = (string)$id;
1751
-        if ($userId != null) $parameters['user_id'] = (string)$userId;
1752
-        if ($screenName != null) $parameters['screen_name'] = (string)$screenName;
1750
+        if ($id != null) $parameters['id'] = (string) $id;
1751
+        if ($userId != null) $parameters['user_id'] = (string) $userId;
1752
+        if ($screenName != null) $parameters['screen_name'] = (string) $screenName;
1753 1753
 
1754 1754
         // make the call
1755
-        return (array)$this->doCall('friendships/destroy.json', $parameters, true, 'POST');
1755
+        return (array) $this->doCall('friendships/destroy.json', $parameters, true, 'POST');
1756 1756
     }
1757 1757
 
1758 1758
     /**
@@ -1765,11 +1765,11 @@  discard block
 block discarded – undo
1765 1765
     public function friendshipsExists($userA, $userB)
1766 1766
     {
1767 1767
         // build parameters
1768
-        $parameters['user_a'] = (string)$userA;
1769
-        $parameters['user_b'] = (string)$userB;
1768
+        $parameters['user_a'] = (string) $userA;
1769
+        $parameters['user_b'] = (string) $userB;
1770 1770
 
1771 1771
         // make the call
1772
-        return (bool)$this->doCall('friendships/exists.json', $parameters);
1772
+        return (bool) $this->doCall('friendships/exists.json', $parameters);
1773 1773
     }
1774 1774
 
1775 1775
     /**
@@ -1794,13 +1794,13 @@  discard block
 block discarded – undo
1794 1794
         if ($targetId == '' && $targetScreenName == '') throw new TwitterException('Specify an targetId or a targetScreenName.');
1795 1795
 
1796 1796
         // build parameters
1797
-        if ($sourceId != null) $parameters['source_id'] = (string)$sourceId;
1798
-        if ($sourceScreenName != null) $parameters['source_screen_name'] = (string)$sourceScreenName;
1799
-        if ($targetId != null) $parameters['target_id'] = (string)$targetId;
1800
-        if ($targetScreenName != null) $parameters['target_screen_name'] = (string)$targetScreenName;
1797
+        if ($sourceId != null) $parameters['source_id'] = (string) $sourceId;
1798
+        if ($sourceScreenName != null) $parameters['source_screen_name'] = (string) $sourceScreenName;
1799
+        if ($targetId != null) $parameters['target_id'] = (string) $targetId;
1800
+        if ($targetScreenName != null) $parameters['target_screen_name'] = (string) $targetScreenName;
1801 1801
 
1802 1802
         // make the call
1803
-        return (array)$this->doCall('friendships/show.json', $parameters);
1803
+        return (array) $this->doCall('friendships/show.json', $parameters);
1804 1804
     }
1805 1805
 
1806 1806
     /**
@@ -1812,10 +1812,10 @@  discard block
 block discarded – undo
1812 1812
     public function friendshipsIncoming($cursor = null)
1813 1813
     {
1814 1814
         $parameters = null;
1815
-        if ($cursor != null) $parameters['cursor'] = (string)$cursor;
1815
+        if ($cursor != null) $parameters['cursor'] = (string) $cursor;
1816 1816
 
1817 1817
         // make the call
1818
-        return (array)$this->doCall('friendships/incoming.json', $parameters, true);
1818
+        return (array) $this->doCall('friendships/incoming.json', $parameters, true);
1819 1819
     }
1820 1820
 
1821 1821
     /**
@@ -1827,10 +1827,10 @@  discard block
 block discarded – undo
1827 1827
     public function friendshipsOutgoing($cursor = null)
1828 1828
     {
1829 1829
         $parameters = null;
1830
-        if ($cursor != null) $parameters['cursor'] = (string)$cursor;
1830
+        if ($cursor != null) $parameters['cursor'] = (string) $cursor;
1831 1831
 
1832 1832
         // make the call
1833
-        return (array)$this->doCall('friendships/outgoing.json', $parameters, true);
1833
+        return (array) $this->doCall('friendships/outgoing.json', $parameters, true);
1834 1834
     }
1835 1835
 
1836 1836
 
@@ -1856,13 +1856,13 @@  discard block
 block discarded – undo
1856 1856
         if ($id == '' && $userId == '' && $screenName == '') throw new TwitterException('Specify an id or an userId or a screenName.');
1857 1857
 
1858 1858
         // build parameters
1859
-        if ($id != null) $parameters['id'] = (string)$id;
1860
-        if ($userId != null) $parameters['user_id'] = (string)$userId;
1861
-        if ($screenName != null) $parameters['screen_name'] = (string)$screenName;
1862
-        if ($cursor != null) $parameters['cursor'] = (string)$cursor;
1859
+        if ($id != null) $parameters['id'] = (string) $id;
1860
+        if ($userId != null) $parameters['user_id'] = (string) $userId;
1861
+        if ($screenName != null) $parameters['screen_name'] = (string) $screenName;
1862
+        if ($cursor != null) $parameters['cursor'] = (string) $cursor;
1863 1863
 
1864 1864
         // make the call
1865
-        return (array)$this->doCall('friends/ids.json', $parameters);
1865
+        return (array) $this->doCall('friends/ids.json', $parameters);
1866 1866
     }
1867 1867
 
1868 1868
     /**
@@ -1886,13 +1886,13 @@  discard block
 block discarded – undo
1886 1886
         if ($id == '' && $userId == '' && $screenName == '') throw new TwitterException('Specify an id or an userId or a screenName.');
1887 1887
 
1888 1888
         // build parameters
1889
-        if ($id != null) $parameters['id'] = (string)$id;
1890
-        if ($userId != null) $parameters['user_id'] = (string)$userId;
1891
-        if ($screenName != null) $parameters['screen_name'] = (string)$screenName;
1892
-        if ($cursor != null) $parameters['cursor'] = (string)$cursor;
1889
+        if ($id != null) $parameters['id'] = (string) $id;
1890
+        if ($userId != null) $parameters['user_id'] = (string) $userId;
1891
+        if ($screenName != null) $parameters['screen_name'] = (string) $screenName;
1892
+        if ($cursor != null) $parameters['cursor'] = (string) $cursor;
1893 1893
 
1894 1894
         // make the call
1895
-        return (array)$this->doCall('followers/ids.json', $parameters);
1895
+        return (array) $this->doCall('followers/ids.json', $parameters);
1896 1896
     }
1897 1897
 
1898 1898
 
@@ -1905,7 +1905,7 @@  discard block
 block discarded – undo
1905 1905
     public function accountVerifyCredentials()
1906 1906
     {
1907 1907
         // make the call
1908
-        return (array)$this->doCall('account/verify_credentials.json', null, true);
1908
+        return (array) $this->doCall('account/verify_credentials.json', null, true);
1909 1909
     }
1910 1910
 
1911 1911
     /**
@@ -1915,7 +1915,7 @@  discard block
 block discarded – undo
1915 1915
     public function accountRateLimitStatus()
1916 1916
     {
1917 1917
         // make the call
1918
-        return (array)$this->doCall('account/rate_limit_status.json', null);
1918
+        return (array) $this->doCall('account/rate_limit_status.json', null);
1919 1919
     }
1920 1920
 
1921 1921
     /**
@@ -1945,10 +1945,10 @@  discard block
 block discarded – undo
1945 1945
     public function accountUpdateDeliveryDevices($device)
1946 1946
     {
1947 1947
         // build parameters
1948
-        $parameters['device'] = (string)$device;
1948
+        $parameters['device'] = (string) $device;
1949 1949
 
1950 1950
         // make the call
1951
-        return (array)$this->doCall('account/update_delivery_device.json', $parameters, true, 'POST');
1951
+        return (array) $this->doCall('account/update_delivery_device.json', $parameters, true, 'POST');
1952 1952
     }
1953 1953
 
1954 1954
     /**
@@ -1977,14 +1977,14 @@  discard block
 block discarded – undo
1977 1977
         ) throw new TwitterException('Specify a profileBackgroundColor, profileTextColor, profileLinkColor, profileSidebarFillColor or a profileSidebarBorderColor.');
1978 1978
 
1979 1979
         // build parameters
1980
-        if ($profileBackgroundColor != null) $parameters['profile_background_color'] = (string)$profileBackgroundColor;
1981
-        if ($profileTextColor != null) $parameters['profile_text_color'] = (string)$profileTextColor;
1982
-        if ($profileLinkColor != null) $parameters['profile_link_color'] = (string)$profileLinkColor;
1983
-        if ($profileSidebarFillColor != null) $parameters['profile_sidebar_fill_color'] = (string)$profileSidebarFillColor;
1984
-        if ($profileSidebarBorderColor != null) $parameters['profile_sidebar_border_color'] = (string)$profileSidebarBorderColor;
1980
+        if ($profileBackgroundColor != null) $parameters['profile_background_color'] = (string) $profileBackgroundColor;
1981
+        if ($profileTextColor != null) $parameters['profile_text_color'] = (string) $profileTextColor;
1982
+        if ($profileLinkColor != null) $parameters['profile_link_color'] = (string) $profileLinkColor;
1983
+        if ($profileSidebarFillColor != null) $parameters['profile_sidebar_fill_color'] = (string) $profileSidebarFillColor;
1984
+        if ($profileSidebarBorderColor != null) $parameters['profile_sidebar_border_color'] = (string) $profileSidebarBorderColor;
1985 1985
 
1986 1986
         // make the call
1987
-        return (array)$this->doCall('account/update_profile_colors.json', $parameters, true, 'POST');
1987
+        return (array) $this->doCall('account/update_profile_colors.json', $parameters, true, 'POST');
1988 1988
     }
1989 1989
 
1990 1990
     /**
@@ -2000,10 +2000,10 @@  discard block
 block discarded – undo
2000 2000
         throw new TwitterException('Not implemented');
2001 2001
 
2002 2002
         // validate
2003
-        if (!file_exists($image)) throw new TwitterException('Image (' . $image . ') doesn\'t exists.');
2003
+        if (!file_exists($image)) throw new TwitterException('Image ('.$image.') doesn\'t exists.');
2004 2004
 
2005 2005
         // make the call
2006
-        return (array)$this->doCall('account/update_profile_image.json', null, true, 'POST', $image);
2006
+        return (array) $this->doCall('account/update_profile_image.json', null, true, 'POST', $image);
2007 2007
     }
2008 2008
 
2009 2009
     /**
@@ -2020,13 +2020,13 @@  discard block
 block discarded – undo
2020 2020
         throw new TwitterException('Not implemented');
2021 2021
 
2022 2022
         // validate
2023
-        if (!file_exists($image)) throw new TwitterException('Image (' . $image . ') doesn\'t exists.');
2023
+        if (!file_exists($image)) throw new TwitterException('Image ('.$image.') doesn\'t exists.');
2024 2024
 
2025 2025
         // build parameters
2026 2026
         if ($tile) $parameters['tile'] = 'true';
2027 2027
 
2028 2028
         // make the call
2029
-        return (array)$this->doCall('account/update_profile_background_image.json', $parameters, true, 'POST', $image);
2029
+        return (array) $this->doCall('account/update_profile_background_image.json', $parameters, true, 'POST', $image);
2030 2030
     }
2031 2031
 
2032 2032
     /**
@@ -2042,13 +2042,13 @@  discard block
 block discarded – undo
2042 2042
     {
2043 2043
         // build parameters
2044 2044
         $parameters = null;
2045
-        if ($name != null) $parameters['name'] = (string)$name;
2046
-        if ($url != null) $parameters['url'] = (string)$url;
2047
-        if ($location != null) $parameters['location'] = (string)$location;
2048
-        if ($description != null) $parameters['description'] = (string)$description;
2045
+        if ($name != null) $parameters['name'] = (string) $name;
2046
+        if ($url != null) $parameters['url'] = (string) $url;
2047
+        if ($location != null) $parameters['location'] = (string) $location;
2048
+        if ($description != null) $parameters['description'] = (string) $description;
2049 2049
 
2050 2050
         // make the call
2051
-        return (array)$this->doCall('account/update_profile.json', $parameters, true, 'POST');
2051
+        return (array) $this->doCall('account/update_profile.json', $parameters, true, 'POST');
2052 2052
     }
2053 2053
 
2054 2054
 
@@ -2064,11 +2064,11 @@  discard block
 block discarded – undo
2064 2064
     {
2065 2065
         // build parameters
2066 2066
         $parameters = null;
2067
-        if ($id != null) $parameters['id'] = (string)$id;
2068
-        if ($page != null) $parameters['page'] = (int)$page;
2067
+        if ($id != null) $parameters['id'] = (string) $id;
2068
+        if ($page != null) $parameters['page'] = (int) $page;
2069 2069
 
2070 2070
         // make the call
2071
-        return (array)$this->doCall('favorites.json', $parameters, true);
2071
+        return (array) $this->doCall('favorites.json', $parameters, true);
2072 2072
     }
2073 2073
 
2074 2074
     /**
@@ -2080,7 +2080,7 @@  discard block
 block discarded – undo
2080 2080
     public function favoritesCreate($id)
2081 2081
     {
2082 2082
         // make the call
2083
-        return (array)$this->doCall('favorites/create/' . $id . '.json', null, true, 'POST');
2083
+        return (array) $this->doCall('favorites/create/'.$id.'.json', null, true, 'POST');
2084 2084
     }
2085 2085
 
2086 2086
     /**
@@ -2092,7 +2092,7 @@  discard block
 block discarded – undo
2092 2092
     public function favoritesDestroy($id)
2093 2093
     {
2094 2094
         // make the call
2095
-        return (array)$this->doCall('favorites/destroy/' . $id . '.json', null, true, 'POST');
2095
+        return (array) $this->doCall('favorites/destroy/'.$id.'.json', null, true, 'POST');
2096 2096
     }
2097 2097
 
2098 2098
 
@@ -2116,12 +2116,12 @@  discard block
 block discarded – undo
2116 2116
         if ($id == '' && $userId == '' && $screenName == '') throw new TwitterException('Specify an id or an userId or a screenName.');
2117 2117
 
2118 2118
         // build parameters
2119
-        if ($id != null) $parameters['id'] = (string)$id;
2120
-        if ($userId != null) $parameters['user_id'] = (string)$userId;
2121
-        if ($screenName != null) $parameters['screen_name'] = (string)$screenName;
2119
+        if ($id != null) $parameters['id'] = (string) $id;
2120
+        if ($userId != null) $parameters['user_id'] = (string) $userId;
2121
+        if ($screenName != null) $parameters['screen_name'] = (string) $screenName;
2122 2122
 
2123 2123
         // make the call
2124
-        return (array)$this->doCall('notifications/follow.json', $parameters, true, 'POST');
2124
+        return (array) $this->doCall('notifications/follow.json', $parameters, true, 'POST');
2125 2125
     }
2126 2126
 
2127 2127
     /**
@@ -2143,12 +2143,12 @@  discard block
 block discarded – undo
2143 2143
         if ($id == '' && $userId == '' && $screenName == '') throw new TwitterException('Specify an id or an userId or a screenName.');
2144 2144
 
2145 2145
         // build parameters
2146
-        if ($id != null) $parameters['id'] = (string)$id;
2147
-        if ($userId != null) $parameters['user_id'] = (string)$userId;
2148
-        if ($screenName != null) $parameters['screen_name'] = (string)$screenName;
2146
+        if ($id != null) $parameters['id'] = (string) $id;
2147
+        if ($userId != null) $parameters['user_id'] = (string) $userId;
2148
+        if ($screenName != null) $parameters['screen_name'] = (string) $screenName;
2149 2149
 
2150 2150
         // make the call
2151
-        return (array)$this->doCall('notifications/leave.json', $parameters, true, 'POST');
2151
+        return (array) $this->doCall('notifications/leave.json', $parameters, true, 'POST');
2152 2152
     }
2153 2153
 
2154 2154
 
@@ -2172,12 +2172,12 @@  discard block
 block discarded – undo
2172 2172
         if ($id == '' && $userId == '' && $screenName == '') throw new TwitterException('Specify an id or an userId or a screenName.');
2173 2173
 
2174 2174
         // build parameters
2175
-        if ($id != null) $parameters['id'] = (string)$id;
2176
-        if ($userId != null) $parameters['user_id'] = (string)$userId;
2177
-        if ($screenName != null) $parameters['screen_name'] = (string)$screenName;
2175
+        if ($id != null) $parameters['id'] = (string) $id;
2176
+        if ($userId != null) $parameters['user_id'] = (string) $userId;
2177
+        if ($screenName != null) $parameters['screen_name'] = (string) $screenName;
2178 2178
 
2179 2179
         // make the call
2180
-        return (array)$this->doCall('blocks/create.json', $parameters, true, 'POST');
2180
+        return (array) $this->doCall('blocks/create.json', $parameters, true, 'POST');
2181 2181
     }
2182 2182
 
2183 2183
     /**
@@ -2199,12 +2199,12 @@  discard block
 block discarded – undo
2199 2199
         if ($id == '' && $userId == '' && $screenName == '') throw new TwitterException('Specify an id or an userId or a screenName.');
2200 2200
 
2201 2201
         // build parameters
2202
-        if ($id != null) $parameters['id'] = (string)$id;
2203
-        if ($userId != null) $parameters['user_id'] = (string)$userId;
2204
-        if ($screenName != null) $parameters['screen_name'] = (string)$screenName;
2202
+        if ($id != null) $parameters['id'] = (string) $id;
2203
+        if ($userId != null) $parameters['user_id'] = (string) $userId;
2204
+        if ($screenName != null) $parameters['screen_name'] = (string) $screenName;
2205 2205
 
2206 2206
         // make the call
2207
-        return (array)$this->doCall('blocks/destroy.json', $parameters, true, 'POST');
2207
+        return (array) $this->doCall('blocks/destroy.json', $parameters, true, 'POST');
2208 2208
     }
2209 2209
 
2210 2210
     /**
@@ -2226,13 +2226,13 @@  discard block
 block discarded – undo
2226 2226
         if ($id == '' && $userId == '' && $screenName == '') throw new TwitterException('Specify an id or an userId or a screenName.');
2227 2227
 
2228 2228
         // build parameters
2229
-        if ($id != null) $parameters['id'] = (string)$id;
2230
-        if ($userId != null) $parameters['user_id'] = (string)$userId;
2231
-        if ($screenName != null) $parameters['screen_name'] = (string)$screenName;
2229
+        if ($id != null) $parameters['id'] = (string) $id;
2230
+        if ($userId != null) $parameters['user_id'] = (string) $userId;
2231
+        if ($screenName != null) $parameters['screen_name'] = (string) $screenName;
2232 2232
 
2233 2233
         try {
2234 2234
             // make the call
2235
-            return (array)$this->doCall('blocks/exists.json', $parameters, true);
2235
+            return (array) $this->doCall('blocks/exists.json', $parameters, true);
2236 2236
         } // catch exceptions
2237 2237
         catch (TwitterException $e) {
2238 2238
             if ($e->getMessage() === 'You are not blocking this user.') {
@@ -2251,10 +2251,10 @@  discard block
 block discarded – undo
2251 2251
     {
2252 2252
         // build parameters
2253 2253
         $parameters = null;
2254
-        if ($page != null) $parameters['page'] = (int)$page;
2254
+        if ($page != null) $parameters['page'] = (int) $page;
2255 2255
 
2256 2256
         // make the call
2257
-        return (array)$this->doCall('blocks/blocking.json', $parameters, true);
2257
+        return (array) $this->doCall('blocks/blocking.json', $parameters, true);
2258 2258
     }
2259 2259
 
2260 2260
     /**
@@ -2265,7 +2265,7 @@  discard block
 block discarded – undo
2265 2265
     public function blocksBlockingIds()
2266 2266
     {
2267 2267
         // make the call
2268
-        return (array)$this->doCall('blocks/blocking/ids.json', null, true);
2268
+        return (array) $this->doCall('blocks/blocking/ids.json', null, true);
2269 2269
     }
2270 2270
 
2271 2271
 
@@ -2289,12 +2289,12 @@  discard block
 block discarded – undo
2289 2289
         if ($id == '' && $userId == '' && $screenName == '') throw new TwitterException('Specify an id or an userId or a screenName.');
2290 2290
 
2291 2291
         // build parameters
2292
-        if ($id != null) $parameters['id'] = (string)$id;
2293
-        if ($userId != null) $parameters['user_id'] = (string)$userId;
2294
-        if ($screenName != null) $parameters['screen_name'] = (string)$screenName;
2292
+        if ($id != null) $parameters['id'] = (string) $id;
2293
+        if ($userId != null) $parameters['user_id'] = (string) $userId;
2294
+        if ($screenName != null) $parameters['screen_name'] = (string) $screenName;
2295 2295
 
2296 2296
         // make the call
2297
-        return (array)$this->doCall('report_spam.json', $parameters, true, 'POST');
2297
+        return (array) $this->doCall('report_spam.json', $parameters, true, 'POST');
2298 2298
     }
2299 2299
 
2300 2300
 
@@ -2307,7 +2307,7 @@  discard block
 block discarded – undo
2307 2307
     public function savedSearches()
2308 2308
     {
2309 2309
         // make the call
2310
-        return (array)$this->doCall('saved_searches.json', null, true);
2310
+        return (array) $this->doCall('saved_searches.json', null, true);
2311 2311
     }
2312 2312
 
2313 2313
     /**
@@ -2319,10 +2319,10 @@  discard block
 block discarded – undo
2319 2319
     public function savedSearchesShow($id)
2320 2320
     {
2321 2321
         // build parameters
2322
-        $parameters['id'] = (string)$id;
2322
+        $parameters['id'] = (string) $id;
2323 2323
 
2324 2324
         // make the call
2325
-        return (array)$this->doCall('saved_searches/show.json', $parameters, true);
2325
+        return (array) $this->doCall('saved_searches/show.json', $parameters, true);
2326 2326
     }
2327 2327
 
2328 2328
     /**
@@ -2334,10 +2334,10 @@  discard block
 block discarded – undo
2334 2334
     public function savedSearchesCreate($query)
2335 2335
     {
2336 2336
         // build parameters
2337
-        $parameters['query'] = (string)$query;
2337
+        $parameters['query'] = (string) $query;
2338 2338
 
2339 2339
         // make the call
2340
-        return (array)$this->doCall('saved_searches/create.json', $parameters, true, 'POST');
2340
+        return (array) $this->doCall('saved_searches/create.json', $parameters, true, 'POST');
2341 2341
     }
2342 2342
 
2343 2343
     /**
@@ -2349,7 +2349,7 @@  discard block
 block discarded – undo
2349 2349
      */
2350 2350
     public function savedSearchesDestroy($id)
2351 2351
     {
2352
-        return (array)$this->doCall('saved_searches/destroy/' . (string)$id . '.json', null, true, 'POST');
2352
+        return (array) $this->doCall('saved_searches/destroy/'.(string) $id.'.json', null, true, 'POST');
2353 2353
     }
2354 2354
 
2355 2355
 
@@ -2369,7 +2369,7 @@  discard block
 block discarded – undo
2369 2369
         $parameters = array();
2370 2370
 
2371 2371
         // set callback
2372
-        if ($callbackURL != null) $parameters['oauth_callback'] = (string)$callbackURL;
2372
+        if ($callbackURL != null) $parameters['oauth_callback'] = (string) $callbackURL;
2373 2373
 
2374 2374
         // make the call
2375 2375
         $response = $this->doOAuthCall('request_token', $parameters);
@@ -2397,8 +2397,8 @@  discard block
 block discarded – undo
2397 2397
     {
2398 2398
         // init var
2399 2399
         $parameters                   = array();
2400
-        $parameters['oauth_token']    = (string)$token;
2401
-        $parameters['oauth_verifier'] = (string)$verifier;
2400
+        $parameters['oauth_token']    = (string) $token;
2401
+        $parameters['oauth_verifier'] = (string) $verifier;
2402 2402
 
2403 2403
         // make the call
2404 2404
         $response = $this->doOAuthCall('access_token', $parameters);
@@ -2418,7 +2418,7 @@  discard block
 block discarded – undo
2418 2418
      */
2419 2419
     public function oAuthAuthorize()
2420 2420
     {
2421
-        header('Location: ' . self::SECURE_API_URL . '/oauth/authorize?oauth_token=' . $this->oAuthToken);
2421
+        header('Location: '.self::SECURE_API_URL.'/oauth/authorize?oauth_token='.$this->oAuthToken);
2422 2422
     }
2423 2423
 
2424 2424
     /**
@@ -2448,11 +2448,11 @@  discard block
 block discarded – undo
2448 2448
     {
2449 2449
         // build parameters
2450 2450
         $parameters = null;
2451
-        if ($lat != null) $parameters['lat_for_trends'] = (float)$lat;
2452
-        if ($long != null) $parameters['long_for_trends'] = (float)$long;
2451
+        if ($lat != null) $parameters['lat_for_trends'] = (float) $lat;
2452
+        if ($long != null) $parameters['long_for_trends'] = (float) $long;
2453 2453
 
2454 2454
         // make the call
2455
-        return (array)$this->doCall('trends/available.json', $parameters);
2455
+        return (array) $this->doCall('trends/available.json', $parameters);
2456 2456
     }
2457 2457
 
2458 2458
     /**
@@ -2467,7 +2467,7 @@  discard block
 block discarded – undo
2467 2467
     public function trendsLocation($woeid)
2468 2468
     {
2469 2469
         // make the call
2470
-        return (array)$this->doCall('trends/location/' . (string)$woeid . '.json');
2470
+        return (array) $this->doCall('trends/location/'.(string) $woeid.'.json');
2471 2471
     }
2472 2472
 
2473 2473
 
@@ -2488,14 +2488,14 @@  discard block
 block discarded – undo
2488 2488
     public function geoReverseGeoCode($lat, $long, $accuracy = null, $granularity = null, $maxResults = null)
2489 2489
     {
2490 2490
         // build parameters
2491
-        $parameters['lat']  = (float)$lat;
2492
-        $parameters['long'] = (float)$long;
2493
-        if ($accuracy != null) $parameters['accuracy'] = (string)$accuracy;
2494
-        if ($granularity != null) $parameters['granularity'] = (string)$granularity;
2495
-        if ($maxResults != null) $parameters['max_results'] = (int)$maxResults;
2491
+        $parameters['lat']  = (float) $lat;
2492
+        $parameters['long'] = (float) $long;
2493
+        if ($accuracy != null) $parameters['accuracy'] = (string) $accuracy;
2494
+        if ($granularity != null) $parameters['granularity'] = (string) $granularity;
2495
+        if ($maxResults != null) $parameters['max_results'] = (int) $maxResults;
2496 2496
 
2497 2497
         // make the call
2498
-        return (array)$this->doCall('geo/reverse_geocode.json', $parameters);
2498
+        return (array) $this->doCall('geo/reverse_geocode.json', $parameters);
2499 2499
     }
2500 2500
 
2501 2501
     /**
@@ -2509,10 +2509,10 @@  discard block
 block discarded – undo
2509 2509
     {
2510 2510
         // build parameters
2511 2511
         $parameters = null;
2512
-        if ($placeId != null) $parameters['place_id'] = (string)$placeId;
2512
+        if ($placeId != null) $parameters['place_id'] = (string) $placeId;
2513 2513
 
2514 2514
         // make the call
2515
-        return (array)$this->doCall('geo/id/' . (string)$id . '.json', $parameters);
2515
+        return (array) $this->doCall('geo/id/'.(string) $id.'.json', $parameters);
2516 2516
     }
2517 2517
 
2518 2518
 
Please login to merge, or discard this patch.
plugins/actions/twitter/plugins.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -71,12 +71,12 @@  discard block
 block discarded – undo
71 71
     private function sendTextToTwitter($textToSend, $mask, $elementUrl)
72 72
     {
73 73
         if (!defined('REFERENCES_TWITTER_PLUGIN_PATH')) {
74
-            define('REFERENCES_TWITTER_PLUGIN_PATH', REFERENCES_PLUGINS_PATH . 'actions' . DIRECTORY_SEPARATOR . 'twitter' . DIRECTORY_SEPARATOR);
74
+            define('REFERENCES_TWITTER_PLUGIN_PATH', REFERENCES_PLUGINS_PATH.'actions'.DIRECTORY_SEPARATOR.'twitter'.DIRECTORY_SEPARATOR);
75 75
         }
76
-        require_once REFERENCES_TWITTER_PLUGIN_PATH . 'config.php';
76
+        require_once REFERENCES_TWITTER_PLUGIN_PATH.'config.php';
77 77
         //require_once REFERENCES_TWITTER_PLUGIN_PATH.'twitter.php';
78
-        require_once REFERENCES_TWITTER_PLUGIN_PATH . 'Twitter.class.php';
79
-        require_once REFERENCES_TWITTER_PLUGIN_PATH . 'bitly.class.php';
78
+        require_once REFERENCES_TWITTER_PLUGIN_PATH.'Twitter.class.php';
79
+        require_once REFERENCES_TWITTER_PLUGIN_PATH.'bitly.class.php';
80 80
         if (REFERENCES_BITLY_LOGIN == '') {
81 81
             return '';
82 82
         }
@@ -112,9 +112,9 @@  discard block
 block discarded – undo
112 112
     public function fireNewReference($parameters)
113 113
     {
114 114
         if (!defined('REFERENCES_TWITTER_PLUGIN_PATH')) {
115
-            define('REFERENCES_TWITTER_PLUGIN_PATH', REFERENCES_PLUGINS_PATH . 'actions' . DIRECTORY_SEPARATOR . 'twitter' . DIRECTORY_SEPARATOR);
115
+            define('REFERENCES_TWITTER_PLUGIN_PATH', REFERENCES_PLUGINS_PATH.'actions'.DIRECTORY_SEPARATOR.'twitter'.DIRECTORY_SEPARATOR);
116 116
         }
117
-        require_once REFERENCES_TWITTER_PLUGIN_PATH . 'config.php';
117
+        require_once REFERENCES_TWITTER_PLUGIN_PATH.'config.php';
118 118
         $reference = $parameters['reference'];
119 119
         $this->sendTextToTwitter(utf8_encode($reference->getVar('article_title', 'n')), utf8_encode(REFERENCES_TWITTER_NEW_REFERENCE_INTRO), $reference->getUrl());
120 120
     }
@@ -128,9 +128,9 @@  discard block
 block discarded – undo
128 128
     public function fireNewCategory($parameters)
129 129
     {
130 130
         if (!defined('REFERENCES_TWITTER_PLUGIN_PATH')) {
131
-            define('REFERENCES_TWITTER_PLUGIN_PATH', REFERENCES_PLUGINS_PATH . 'actions' . DIRECTORY_SEPARATOR . 'twitter' . DIRECTORY_SEPARATOR);
131
+            define('REFERENCES_TWITTER_PLUGIN_PATH', REFERENCES_PLUGINS_PATH.'actions'.DIRECTORY_SEPARATOR.'twitter'.DIRECTORY_SEPARATOR);
132 132
         }
133
-        require_once REFERENCES_TWITTER_PLUGIN_PATH . 'config.php';
133
+        require_once REFERENCES_TWITTER_PLUGIN_PATH.'config.php';
134 134
         if (trim(REFERENCES_TWITTER_NEW_CATEGORY_INTRO) != '') {
135 135
             $category = $parameters['category'];
136 136
             $this->sendTextToTwitter(utf8_encode($category->getVar('category_title', 'n')), utf8_encode(REFERENCES_TWITTER_NEW_CATEGORY_INTRO), $category->getUrl());
Please login to merge, or discard this patch.