@@ -98,8 +98,12 @@ |
||
| 98 | 98 | $element = parent::getDOM($doc, $majorVersion, $minorVersion); |
| 99 | 99 | $element->setAttribute('row', $this->_row); |
| 100 | 100 | $element->setAttribute('col', $this->_col); |
| 101 | - if ($this->_inputValue) $element->setAttribute('inputValue', $this->_inputValue); |
|
| 102 | - if ($this->_numericValue) $element->setAttribute('numericValue', $this->_numericValue); |
|
| 101 | + if ($this->_inputValue) { |
|
| 102 | + $element->setAttribute('inputValue', $this->_inputValue); |
|
| 103 | + } |
|
| 104 | + if ($this->_numericValue) { |
|
| 105 | + $element->setAttribute('numericValue', $this->_numericValue); |
|
| 106 | + } |
|
| 103 | 107 | return $element; |
| 104 | 108 | } |
| 105 | 109 | |
@@ -85,11 +85,9 @@ |
||
| 85 | 85 | case 'value': |
| 86 | 86 | if ($attribute->nodeValue == "true") { |
| 87 | 87 | $this->_value = true; |
| 88 | - } |
|
| 89 | - else if ($attribute->nodeValue == "false") { |
|
| 88 | + } else if ($attribute->nodeValue == "false") { |
|
| 90 | 89 | $this->_value = false; |
| 91 | - } |
|
| 92 | - else { |
|
| 90 | + } else { |
|
| 93 | 91 | require_once 'Zend/Gdata/App/InvalidArgumentException.php'; |
| 94 | 92 | throw new Zend_Gdata_App_InvalidArgumentException("Expected 'true' or 'false' for gCal:selected#value."); |
| 95 | 93 | } |
@@ -85,11 +85,9 @@ |
||
| 85 | 85 | case 'value': |
| 86 | 86 | if ($attribute->nodeValue == "true") { |
| 87 | 87 | $this->_value = true; |
| 88 | - } |
|
| 89 | - else if ($attribute->nodeValue == "false") { |
|
| 88 | + } else if ($attribute->nodeValue == "false") { |
|
| 90 | 89 | $this->_value = false; |
| 91 | - } |
|
| 92 | - else { |
|
| 90 | + } else { |
|
| 93 | 91 | throw new Zend_Gdata_App_InvalidArgumentException("Expected 'true' or 'false' for gCal:selected#value."); |
| 94 | 92 | } |
| 95 | 93 | break; |
@@ -106,11 +106,9 @@ |
||
| 106 | 106 | case 'specialized': |
| 107 | 107 | if ($attribute->nodeValue == "true") { |
| 108 | 108 | $this->_specialized = true; |
| 109 | - } |
|
| 110 | - else if ($attribute->nodeValue == "false") { |
|
| 109 | + } else if ($attribute->nodeValue == "false") { |
|
| 111 | 110 | $this->_specialized = false; |
| 112 | - } |
|
| 113 | - else { |
|
| 111 | + } else { |
|
| 114 | 112 | throw new Zend_Gdata_App_InvalidArgumentException("Expected 'true' or 'false' for gCal:selected#value."); |
| 115 | 113 | } |
| 116 | 114 | break; |
@@ -180,8 +180,7 @@ |
||
| 180 | 180 | { |
| 181 | 181 | if ($this->_valueString != null) { |
| 182 | 182 | return $this->_valueString; |
| 183 | - } |
|
| 184 | - else { |
|
| 183 | + } else { |
|
| 185 | 184 | return parent::__toString(); |
| 186 | 185 | } |
| 187 | 186 | } |
@@ -103,14 +103,15 @@ |
||
| 103 | 103 | public function __toString() |
| 104 | 104 | { |
| 105 | 105 | $s = ''; |
| 106 | - if ($this->_absoluteTime) |
|
| 107 | - $s = " at " . $this->_absoluteTime; |
|
| 108 | - else if ($this->_days) |
|
| 109 | - $s = " in " . $this->_days . " days"; |
|
| 110 | - else if ($this->_hours) |
|
| 111 | - $s = " in " . $this->_hours . " hours"; |
|
| 112 | - else if ($this->_minutes) |
|
| 113 | - $s = " in " . $this->_minutes . " minutes"; |
|
| 106 | + if ($this->_absoluteTime) { |
|
| 107 | + $s = " at " . $this->_absoluteTime; |
|
| 108 | + } else if ($this->_days) { |
|
| 109 | + $s = " in " . $this->_days . " days"; |
|
| 110 | + } else if ($this->_hours) { |
|
| 111 | + $s = " in " . $this->_hours . " hours"; |
|
| 112 | + } else if ($this->_minutes) { |
|
| 113 | + $s = " in " . $this->_minutes . " minutes"; |
|
| 114 | + } |
|
| 114 | 115 | return $this->_method . $s; |
| 115 | 116 | } |
| 116 | 117 | |
@@ -114,9 +114,9 @@ |
||
| 114 | 114 | |
| 115 | 115 | public function __toString() |
| 116 | 116 | { |
| 117 | - if ($this->_valueString) |
|
| 118 | - return $this->_valueString; |
|
| 119 | - else { |
|
| 117 | + if ($this->_valueString) { |
|
| 118 | + return $this->_valueString; |
|
| 119 | + } else { |
|
| 120 | 120 | return 'Starts: ' . $this->getStartTime() . ' ' . |
| 121 | 121 | 'Ends: ' . $this->getEndTime(); |
| 122 | 122 | } |
@@ -109,11 +109,9 @@ |
||
| 109 | 109 | case 'readOnly': |
| 110 | 110 | if ($attribute->nodeValue == "true") { |
| 111 | 111 | $this->_readOnly = true; |
| 112 | - } |
|
| 113 | - else if ($attribute->nodeValue == "false") { |
|
| 112 | + } else if ($attribute->nodeValue == "false") { |
|
| 114 | 113 | $this->_readOnly = false; |
| 115 | - } |
|
| 116 | - else { |
|
| 114 | + } else { |
|
| 117 | 115 | throw new Zend_Gdata_App_InvalidArgumentException("Expected 'true' or 'false' for gCal:selected#value."); |
| 118 | 116 | } |
| 119 | 117 | break; |
@@ -314,8 +314,7 @@ |
||
| 314 | 314 | $this->setHeaders(self::CONTENT_LENGTH, |
| 315 | 315 | $this->raw_post_data->getTotalSize()); |
| 316 | 316 | return $this->raw_post_data; |
| 317 | - } |
|
| 318 | - else { |
|
| 317 | + } else { |
|
| 319 | 318 | return parent::_prepareBody(); |
| 320 | 319 | } |
| 321 | 320 | } |