@@ -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 { |
@@ -258,9 +258,9 @@ |
||
258 | 258 | |
259 | 259 | // Set the mime type of the data. |
260 | 260 | if ($mimeType === null) { |
261 | - $filenameParts = explode('.', $fileLocation); |
|
262 | - $fileExtension = end($filenameParts); |
|
263 | - $mimeType = self::lookupMimeType($fileExtension); |
|
261 | + $filenameParts = explode('.', $fileLocation); |
|
262 | + $fileExtension = end($filenameParts); |
|
263 | + $mimeType = self::lookupMimeType($fileExtension); |
|
264 | 264 | } |
265 | 265 | |
266 | 266 | // Set the mime type for the upload request. |
@@ -65,14 +65,14 @@ |
||
65 | 65 | protected function takeAttributeFromDOM($attribute) |
66 | 66 | { |
67 | 67 | switch ($attribute->localName) { |
68 | - case 'name': |
|
69 | - $this->_name = $attribute->nodeValue; |
|
70 | - break; |
|
71 | - case 'value': |
|
72 | - $this->_value = $attribute->nodeValue; |
|
73 | - break; |
|
74 | - default: |
|
75 | - parent::takeAttributeFromDOM($attribute); |
|
68 | + case 'name': |
|
69 | + $this->_name = $attribute->nodeValue; |
|
70 | + break; |
|
71 | + case 'value': |
|
72 | + $this->_value = $attribute->nodeValue; |
|
73 | + break; |
|
74 | + default: |
|
75 | + parent::takeAttributeFromDOM($attribute); |
|
76 | 76 | } |
77 | 77 | } |
78 | 78 |
@@ -103,19 +103,19 @@ discard block |
||
103 | 103 | protected function takeAttributeFromDOM($attribute) |
104 | 104 | { |
105 | 105 | switch ($attribute->localName) { |
106 | - case 'specialized': |
|
107 | - if ($attribute->nodeValue == "true") { |
|
108 | - $this->_specialized = true; |
|
109 | - } |
|
110 | - else if ($attribute->nodeValue == "false") { |
|
111 | - $this->_specialized = false; |
|
112 | - } |
|
113 | - else { |
|
114 | - throw new Zend_Gdata_App_InvalidArgumentException("Expected 'true' or 'false' for gCal:selected#value."); |
|
115 | - } |
|
116 | - break; |
|
117 | - default: |
|
118 | - parent::takeAttributeFromDOM($attribute); |
|
106 | + case 'specialized': |
|
107 | + if ($attribute->nodeValue == "true") { |
|
108 | + $this->_specialized = true; |
|
109 | + } |
|
110 | + else if ($attribute->nodeValue == "false") { |
|
111 | + $this->_specialized = false; |
|
112 | + } |
|
113 | + else { |
|
114 | + throw new Zend_Gdata_App_InvalidArgumentException("Expected 'true' or 'false' for gCal:selected#value."); |
|
115 | + } |
|
116 | + break; |
|
117 | + default: |
|
118 | + parent::takeAttributeFromDOM($attribute); |
|
119 | 119 | } |
120 | 120 | } |
121 | 121 | |
@@ -129,19 +129,19 @@ discard block |
||
129 | 129 | { |
130 | 130 | $absoluteNodeName = $child->namespaceURI . ':' . $child->localName; |
131 | 131 | switch ($absoluteNodeName) { |
132 | - case $this->lookupNamespace('gd') . ':' . 'entryLink': |
|
133 | - $entryLink = new Zend_Gdata_Extension_EntryLink(); |
|
134 | - $entryLink->transferFromDOM($child); |
|
135 | - $this->_entryLink = $entryLink; |
|
136 | - break; |
|
137 | - case $this->lookupNamespace('gd') . ':' . 'originalEvent': |
|
138 | - $originalEvent = new Zend_Gdata_Extension_OriginalEvent(); |
|
139 | - $originalEvent->transferFromDOM($child); |
|
140 | - $this->_originalEvent = $originalEvent; |
|
141 | - break; |
|
142 | - default: |
|
143 | - parent::takeChildFromDOM($child); |
|
144 | - break; |
|
132 | + case $this->lookupNamespace('gd') . ':' . 'entryLink': |
|
133 | + $entryLink = new Zend_Gdata_Extension_EntryLink(); |
|
134 | + $entryLink->transferFromDOM($child); |
|
135 | + $this->_entryLink = $entryLink; |
|
136 | + break; |
|
137 | + case $this->lookupNamespace('gd') . ':' . 'originalEvent': |
|
138 | + $originalEvent = new Zend_Gdata_Extension_OriginalEvent(); |
|
139 | + $originalEvent->transferFromDOM($child); |
|
140 | + $this->_originalEvent = $originalEvent; |
|
141 | + break; |
|
142 | + default: |
|
143 | + parent::takeChildFromDOM($child); |
|
144 | + break; |
|
145 | 145 | } |
146 | 146 | } |
147 | 147 |
@@ -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; |
@@ -126,17 +126,17 @@ discard block |
||
126 | 126 | protected function takeAttributeFromDOM($attribute) |
127 | 127 | { |
128 | 128 | switch ($attribute->localName) { |
129 | - case 'email': |
|
130 | - $this->_email = $attribute->nodeValue; |
|
131 | - break; |
|
132 | - case 'rel': |
|
133 | - $this->_rel = $attribute->nodeValue; |
|
134 | - break; |
|
135 | - case 'valueString': |
|
136 | - $this->_valueString = $attribute->nodeValue; |
|
137 | - break; |
|
138 | - default: |
|
139 | - parent::takeAttributeFromDOM($attribute); |
|
129 | + case 'email': |
|
130 | + $this->_email = $attribute->nodeValue; |
|
131 | + break; |
|
132 | + case 'rel': |
|
133 | + $this->_rel = $attribute->nodeValue; |
|
134 | + break; |
|
135 | + case 'valueString': |
|
136 | + $this->_valueString = $attribute->nodeValue; |
|
137 | + break; |
|
138 | + default: |
|
139 | + parent::takeAttributeFromDOM($attribute); |
|
140 | 140 | } |
141 | 141 | } |
142 | 142 | |
@@ -150,24 +150,24 @@ discard block |
||
150 | 150 | { |
151 | 151 | $absoluteNodeName = $child->namespaceURI . ':' . $child->localName; |
152 | 152 | switch ($absoluteNodeName) { |
153 | - case $this->lookupNamespace('gd') . ':' . 'attendeeStatus': |
|
154 | - $attendeeStatus = new Zend_Gdata_Extension_AttendeeStatus(); |
|
155 | - $attendeeStatus->transferFromDOM($child); |
|
156 | - $this->_attendeeStatus = $attendeeStatus; |
|
157 | - break; |
|
158 | - case $this->lookupNamespace('gd') . ':' . 'attendeeType': |
|
159 | - $attendeeType = new Zend_Gdata_Extension_AttendeeType(); |
|
160 | - $attendeeType->transferFromDOM($child); |
|
161 | - $this->_attendeeType = $attendeeType; |
|
162 | - break; |
|
163 | - case $this->lookupNamespace('gd') . ':' . 'entryLink': |
|
164 | - $entryLink = new Zend_Gdata_Extension_EntryLink(); |
|
165 | - $entryLink->transferFromDOM($child); |
|
166 | - $this->_entryLink = $entryLink; |
|
167 | - break; |
|
168 | - default: |
|
169 | - parent::takeChildFromDOM($child); |
|
170 | - break; |
|
153 | + case $this->lookupNamespace('gd') . ':' . 'attendeeStatus': |
|
154 | + $attendeeStatus = new Zend_Gdata_Extension_AttendeeStatus(); |
|
155 | + $attendeeStatus->transferFromDOM($child); |
|
156 | + $this->_attendeeStatus = $attendeeStatus; |
|
157 | + break; |
|
158 | + case $this->lookupNamespace('gd') . ':' . 'attendeeType': |
|
159 | + $attendeeType = new Zend_Gdata_Extension_AttendeeType(); |
|
160 | + $attendeeType->transferFromDOM($child); |
|
161 | + $this->_attendeeType = $attendeeType; |
|
162 | + break; |
|
163 | + case $this->lookupNamespace('gd') . ':' . 'entryLink': |
|
164 | + $entryLink = new Zend_Gdata_Extension_EntryLink(); |
|
165 | + $entryLink->transferFromDOM($child); |
|
166 | + $this->_entryLink = $entryLink; |
|
167 | + break; |
|
168 | + default: |
|
169 | + parent::takeChildFromDOM($child); |
|
170 | + break; |
|
171 | 171 | } |
172 | 172 | } |
173 | 173 |
@@ -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 | } |
@@ -84,11 +84,11 @@ |
||
84 | 84 | protected function takeAttributeFromDOM($attribute) |
85 | 85 | { |
86 | 86 | switch ($attribute->localName) { |
87 | - case 'rel': |
|
88 | - $this->_rel = $attribute->nodeValue; |
|
89 | - break; |
|
90 | - default: |
|
91 | - parent::takeAttributeFromDOM($attribute); |
|
87 | + case 'rel': |
|
88 | + $this->_rel = $attribute->nodeValue; |
|
89 | + break; |
|
90 | + default: |
|
91 | + parent::takeAttributeFromDOM($attribute); |
|
92 | 92 | } |
93 | 93 | } |
94 | 94 |
@@ -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 |
@@ -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 |
@@ -89,9 +89,9 @@ |
||
89 | 89 | $reminder->transferFromDOM($child); |
90 | 90 | $this->_reminders[] = $reminder; |
91 | 91 | break; |
92 | - default: |
|
93 | - parent::takeChildFromDOM($child); |
|
94 | - break; |
|
92 | + default: |
|
93 | + parent::takeChildFromDOM($child); |
|
94 | + break; |
|
95 | 95 | } |
96 | 96 | } |
97 | 97 |
@@ -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 |
@@ -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 | } |
@@ -91,37 +91,37 @@ |
||
91 | 91 | $feed->transferFromDOM($child); |
92 | 92 | $this->_feed = $feed; |
93 | 93 | break; |
94 | - default: |
|
95 | - parent::takeChildFromDOM($child); |
|
96 | - break; |
|
94 | + default: |
|
95 | + parent::takeChildFromDOM($child); |
|
96 | + break; |
|
97 | 97 | } |
98 | 98 | } |
99 | 99 | |
100 | 100 | protected function takeAttributeFromDOM($attribute) |
101 | 101 | { |
102 | 102 | switch ($attribute->localName) { |
103 | - case 'countHint': |
|
104 | - $this->_countHint = $attribute->nodeValue; |
|
105 | - break; |
|
106 | - case 'href': |
|
107 | - $this->_href = $attribute->nodeValue; |
|
108 | - break; |
|
109 | - case 'readOnly': |
|
110 | - if ($attribute->nodeValue == "true") { |
|
111 | - $this->_readOnly = true; |
|
112 | - } |
|
113 | - else if ($attribute->nodeValue == "false") { |
|
114 | - $this->_readOnly = false; |
|
115 | - } |
|
116 | - else { |
|
117 | - throw new Zend_Gdata_App_InvalidArgumentException("Expected 'true' or 'false' for gCal:selected#value."); |
|
118 | - } |
|
119 | - break; |
|
120 | - case 'rel': |
|
121 | - $this->_rel = $attribute->nodeValue; |
|
122 | - break; |
|
123 | - default: |
|
124 | - parent::takeAttributeFromDOM($attribute); |
|
103 | + case 'countHint': |
|
104 | + $this->_countHint = $attribute->nodeValue; |
|
105 | + break; |
|
106 | + case 'href': |
|
107 | + $this->_href = $attribute->nodeValue; |
|
108 | + break; |
|
109 | + case 'readOnly': |
|
110 | + if ($attribute->nodeValue == "true") { |
|
111 | + $this->_readOnly = true; |
|
112 | + } |
|
113 | + else if ($attribute->nodeValue == "false") { |
|
114 | + $this->_readOnly = false; |
|
115 | + } |
|
116 | + else { |
|
117 | + throw new Zend_Gdata_App_InvalidArgumentException("Expected 'true' or 'false' for gCal:selected#value."); |
|
118 | + } |
|
119 | + break; |
|
120 | + case 'rel': |
|
121 | + $this->_rel = $attribute->nodeValue; |
|
122 | + break; |
|
123 | + default: |
|
124 | + parent::takeAttributeFromDOM($attribute); |
|
125 | 125 | } |
126 | 126 | } |
127 | 127 |
@@ -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; |