@@ -332,7 +332,7 @@ discard block |
||
332 | 332 | public function setReturnEmpty($value) |
333 | 333 | { |
334 | 334 | if (is_bool($value)) { |
335 | - $this->_params['return-empty'] = ($value?'true':'false'); |
|
335 | + $this->_params['return-empty'] = ($value ? 'true' : 'false'); |
|
336 | 336 | } else if ($value != null) { |
337 | 337 | $this->_params['return-empty'] = $value; |
338 | 338 | } else { |
@@ -366,35 +366,35 @@ discard block |
||
366 | 366 | $uri = $this->_defaultFeedUri; |
367 | 367 | |
368 | 368 | if ($this->_spreadsheetKey != null) { |
369 | - $uri .= '/'.$this->_spreadsheetKey; |
|
369 | + $uri .= '/' . $this->_spreadsheetKey; |
|
370 | 370 | } else { |
371 | 371 | require_once 'Zend/Gdata/App/Exception.php'; |
372 | 372 | throw new Zend_Gdata_App_Exception('A spreadsheet key must be provided for cell queries.'); |
373 | 373 | } |
374 | 374 | |
375 | 375 | if ($this->_worksheetId != null) { |
376 | - $uri .= '/'.$this->_worksheetId; |
|
376 | + $uri .= '/' . $this->_worksheetId; |
|
377 | 377 | } else { |
378 | 378 | require_once 'Zend/Gdata/App/Exception.php'; |
379 | 379 | throw new Zend_Gdata_App_Exception('A worksheet id must be provided for cell queries.'); |
380 | 380 | } |
381 | 381 | |
382 | 382 | if ($this->_visibility != null) { |
383 | - $uri .= '/'.$this->_visibility; |
|
383 | + $uri .= '/' . $this->_visibility; |
|
384 | 384 | } else { |
385 | 385 | require_once 'Zend/Gdata/App/Exception.php'; |
386 | 386 | throw new Zend_Gdata_App_Exception('A visibility must be provided for cell queries.'); |
387 | 387 | } |
388 | 388 | |
389 | 389 | if ($this->_projection != null) { |
390 | - $uri .= '/'.$this->_projection; |
|
390 | + $uri .= '/' . $this->_projection; |
|
391 | 391 | } else { |
392 | 392 | require_once 'Zend/Gdata/App/Exception.php'; |
393 | 393 | throw new Zend_Gdata_App_Exception('A projection must be provided for cell queries.'); |
394 | 394 | } |
395 | 395 | |
396 | 396 | if ($this->_cellId != null) { |
397 | - $uri .= '/'.$this->_cellId; |
|
397 | + $uri .= '/' . $this->_cellId; |
|
398 | 398 | } |
399 | 399 | } else { |
400 | 400 | $uri = $this->_url; |
@@ -222,14 +222,14 @@ discard block |
||
222 | 222 | $uri = ''; |
223 | 223 | |
224 | 224 | if ($this->_visibility != null) { |
225 | - $uri .= '/'.$this->_visibility; |
|
225 | + $uri .= '/' . $this->_visibility; |
|
226 | 226 | } else { |
227 | 227 | require_once 'Zend/Gdata/App/Exception.php'; |
228 | 228 | throw new Zend_Gdata_App_Exception('A visibility must be provided for document queries.'); |
229 | 229 | } |
230 | 230 | |
231 | 231 | if ($this->_projection != null) { |
232 | - $uri .= '/'.$this->_projection; |
|
232 | + $uri .= '/' . $this->_projection; |
|
233 | 233 | } else { |
234 | 234 | require_once 'Zend/Gdata/App/Exception.php'; |
235 | 235 | throw new Zend_Gdata_App_Exception('A projection must be provided for document queries.'); |
@@ -248,7 +248,7 @@ discard block |
||
248 | 248 | $uri = $this->_defaultFeedUri; |
249 | 249 | |
250 | 250 | if ($this->_documentType != null) { |
251 | - $uri .= '/'.$this->_documentType; |
|
251 | + $uri .= '/' . $this->_documentType; |
|
252 | 252 | } else { |
253 | 253 | require_once 'Zend/Gdata/App/Exception.php'; |
254 | 254 | throw new Zend_Gdata_App_Exception('A document type must be provided for document queries.'); |
@@ -257,18 +257,18 @@ discard block |
||
257 | 257 | if ($this->_documentType == 'spreadsheets') { |
258 | 258 | $uri .= $this->appendVisibilityProjection(); |
259 | 259 | if ($this->_spreadsheetKey != null) { |
260 | - $uri .= '/'.$this->_spreadsheetKey; |
|
260 | + $uri .= '/' . $this->_spreadsheetKey; |
|
261 | 261 | } |
262 | 262 | } else if ($this->_documentType == 'worksheets') { |
263 | 263 | if ($this->_spreadsheetKey != null) { |
264 | - $uri .= '/'.$this->_spreadsheetKey; |
|
264 | + $uri .= '/' . $this->_spreadsheetKey; |
|
265 | 265 | } else { |
266 | 266 | require_once 'Zend/Gdata/App/Exception.php'; |
267 | 267 | throw new Zend_Gdata_App_Exception('A spreadsheet key must be provided for worksheet document queries.'); |
268 | 268 | } |
269 | 269 | $uri .= $this->appendVisibilityProjection(); |
270 | 270 | if ($this->_worksheetId != null) { |
271 | - $uri .= '/'.$this->_worksheetId; |
|
271 | + $uri .= '/' . $this->_worksheetId; |
|
272 | 272 | } |
273 | 273 | } |
274 | 274 |
@@ -258,35 +258,35 @@ |
||
258 | 258 | $uri = $this->_defaultFeedUri; |
259 | 259 | |
260 | 260 | if ($this->_spreadsheetKey != null) { |
261 | - $uri .= '/'.$this->_spreadsheetKey; |
|
261 | + $uri .= '/' . $this->_spreadsheetKey; |
|
262 | 262 | } else { |
263 | 263 | require_once 'Zend/Gdata/App/Exception.php'; |
264 | 264 | throw new Zend_Gdata_App_Exception('A spreadsheet key must be provided for list queries.'); |
265 | 265 | } |
266 | 266 | |
267 | 267 | if ($this->_worksheetId != null) { |
268 | - $uri .= '/'.$this->_worksheetId; |
|
268 | + $uri .= '/' . $this->_worksheetId; |
|
269 | 269 | } else { |
270 | 270 | require_once 'Zend/Gdata/App/Exception.php'; |
271 | 271 | throw new Zend_Gdata_App_Exception('A worksheet id must be provided for list queries.'); |
272 | 272 | } |
273 | 273 | |
274 | 274 | if ($this->_visibility != null) { |
275 | - $uri .= '/'.$this->_visibility; |
|
275 | + $uri .= '/' . $this->_visibility; |
|
276 | 276 | } else { |
277 | 277 | require_once 'Zend/Gdata/App/Exception.php'; |
278 | 278 | throw new Zend_Gdata_App_Exception('A visibility must be provided for list queries.'); |
279 | 279 | } |
280 | 280 | |
281 | 281 | if ($this->_projection != null) { |
282 | - $uri .= '/'.$this->_projection; |
|
282 | + $uri .= '/' . $this->_projection; |
|
283 | 283 | } else { |
284 | 284 | require_once 'Zend/Gdata/App/Exception.php'; |
285 | 285 | throw new Zend_Gdata_App_Exception('A projection must be provided for list queries.'); |
286 | 286 | } |
287 | 287 | |
288 | 288 | if ($this->_rowId != null) { |
289 | - $uri .= '/'.$this->_rowId; |
|
289 | + $uri .= '/' . $this->_rowId; |
|
290 | 290 | } |
291 | 291 | |
292 | 292 | $uri .= $this->getQueryString(); |
@@ -395,7 +395,7 @@ discard block |
||
395 | 395 | { |
396 | 396 | if ($value !== null) { |
397 | 397 | if (is_bool($value)) { |
398 | - $this->_params['singleevents'] = ($value?'true':'false'); |
|
398 | + $this->_params['singleevents'] = ($value ? 'true' : 'false'); |
|
399 | 399 | } elseif ($value == 'true' | $value == 'false') { |
400 | 400 | $this->_params['singleevents'] = $value; |
401 | 401 | } else { |
@@ -444,7 +444,7 @@ discard block |
||
444 | 444 | { |
445 | 445 | if ($value !== null) { |
446 | 446 | if (is_bool($value)) { |
447 | - $this->_params['futureevents'] = ($value?'true':'false'); |
|
447 | + $this->_params['futureevents'] = ($value ? 'true' : 'false'); |
|
448 | 448 | } elseif ($value == 'true' | $value == 'false') { |
449 | 449 | $this->_params['futureevents'] = $value; |
450 | 450 | } else { |
@@ -118,7 +118,7 @@ |
||
118 | 118 | return $this->_valueString; |
119 | 119 | else { |
120 | 120 | return 'Starts: ' . $this->getStartTime() . ' ' . |
121 | - 'Ends: ' . $this->getEndTime(); |
|
121 | + 'Ends: ' . $this->getEndTime(); |
|
122 | 122 | } |
123 | 123 | } |
124 | 124 |
@@ -640,7 +640,7 @@ |
||
640 | 640 | require_once 'Zend/Gdata/App/Exception.php'; |
641 | 641 | throw new Zend_Gdata_App_Exception('Slash not found in atom:id'); |
642 | 642 | } else { |
643 | - return substr($fullId, strrpos($fullId,'/') + 1); |
|
643 | + return substr($fullId, strrpos($fullId, '/') + 1); |
|
644 | 644 | } |
645 | 645 | } |
646 | 646 |
@@ -310,7 +310,7 @@ |
||
310 | 310 | */ |
311 | 311 | protected function _prepareBody() |
312 | 312 | { |
313 | - if($this->_streamingRequest) { |
|
313 | + if ($this->_streamingRequest) { |
|
314 | 314 | $this->setHeaders(self::CONTENT_LENGTH, |
315 | 315 | $this->raw_post_data->getTotalSize()); |
316 | 316 | return $this->raw_post_data; |
@@ -66,9 +66,9 @@ |
||
66 | 66 | public function read($bytesRequested) |
67 | 67 | { |
68 | 68 | $len = strlen($this->_sourceString); |
69 | - if($this->_bytesRead == $len) { |
|
69 | + if ($this->_bytesRead == $len) { |
|
70 | 70 | return FALSE; |
71 | - } else if($bytesRequested > $len - $this->_bytesRead) { |
|
71 | + } else if ($bytesRequested > $len - $this->_bytesRead) { |
|
72 | 72 | $bytesRequested = $len - $this->_bytesRead; |
73 | 73 | } |
74 | 74 |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | } |
99 | 99 | |
100 | 100 | $this->_fileHandle = fopen($filePath, 'rb', TRUE); |
101 | - $this->_boundaryString = '=_' . md5(microtime(1) . rand(1,20)); |
|
101 | + $this->_boundaryString = '=_' . md5(microtime(1) . rand(1, 20)); |
|
102 | 102 | $entry = $this->wrapEntry($xmlString, $fileContentType); |
103 | 103 | $closingBoundary = new Zend_Gdata_MimeBodyString("\r\n--{$this->_boundaryString}--\r\n"); |
104 | 104 | $file = new Zend_Gdata_MimeFile($this->_fileHandle); |
@@ -135,17 +135,17 @@ discard block |
||
135 | 135 | */ |
136 | 136 | public function read($bytesRequested) |
137 | 137 | { |
138 | - if($this->_currentPart >= count($this->_parts)) { |
|
138 | + if ($this->_currentPart >= count($this->_parts)) { |
|
139 | 139 | return FALSE; |
140 | 140 | } |
141 | 141 | |
142 | 142 | $activePart = $this->_parts[$this->_currentPart]; |
143 | 143 | $buffer = $activePart->read($bytesRequested); |
144 | 144 | |
145 | - while(strlen($buffer) < $bytesRequested) { |
|
145 | + while (strlen($buffer) < $bytesRequested) { |
|
146 | 146 | $this->_currentPart += 1; |
147 | 147 | $nextBuffer = $this->read($bytesRequested - strlen($buffer)); |
148 | - if($nextBuffer === FALSE) { |
|
148 | + if ($nextBuffer === FALSE) { |
|
149 | 149 | break; |
150 | 150 | } |
151 | 151 | $buffer .= $nextBuffer; |