Completed
Push — master ( 27ce5d...276db7 )
by Rakesh
09:27
created
lib/Zend/Gdata/HttpAdapterStreamingProxy.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -101,7 +101,9 @@
 block discarded – undo
101 101
 
102 102
         // Add all headers to the request string
103 103
         foreach ($headers as $k => $v) {
104
-            if (is_string($k)) $v = "$k: $v";
104
+            if (is_string($k)) {
105
+                $v = "$k: $v";
106
+            }
105 107
             $request .= "$v\r\n";
106 108
         }
107 109
 
Please login to merge, or discard this patch.
lib/Zend/Gdata/HttpAdapterStreamingSocket.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -79,10 +79,14 @@
 block discarded – undo
79 79
 
80 80
         // Build request headers
81 81
         $path = $uri->getPath();
82
-        if ($uri->getQuery()) $path .= '?' . $uri->getQuery();
82
+        if ($uri->getQuery()) {
83
+            $path .= '?' . $uri->getQuery();
84
+        }
83 85
         $request = "{$method} {$path} HTTP/{$http_ver}\r\n";
84 86
         foreach ($headers as $k => $v) {
85
-            if (is_string($k)) $v = ucfirst($k) . ": $v";
87
+            if (is_string($k)) {
88
+                $v = ucfirst($k) . ": $v";
89
+            }
86 90
             $request .= "$v\r\n";
87 91
         }
88 92
 
Please login to merge, or discard this patch.
lib/Zend/Gdata/Gapps/Query.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -109,11 +109,9 @@
 block discarded – undo
109 109
      {
110 110
          if ($domain !== null) {
111 111
              return Zend_Gdata_Gapps::APPS_BASE_FEED_URI . '/' . $domain;
112
-         }
113
-         else if ($this->_domain !== null) {
112
+         } else if ($this->_domain !== null) {
114 113
              return Zend_Gdata_Gapps::APPS_BASE_FEED_URI . '/' . $this->_domain;
115
-         }
116
-         else {
114
+         } else {
117 115
              require_once 'Zend/Gdata/App/InvalidArgumentException.php';
118 116
              throw new Zend_Gdata_App_InvalidArgumentException(
119 117
                  'Domain must be specified.');
Please login to merge, or discard this patch.
lib/Zend/Gdata/Gapps/Extension/Login.php 1 patch
Braces   +8 added lines, -16 removed lines patch added patch discarded remove patch
@@ -204,11 +204,9 @@  discard block
 block discarded – undo
204 204
         case 'admin':
205 205
             if ($attribute->nodeValue == "true") {
206 206
                 $this->_admin = true;
207
-            }
208
-            else if ($attribute->nodeValue == "false") {
207
+            } else if ($attribute->nodeValue == "false") {
209 208
                 $this->_admin = false;
210
-            }
211
-            else {
209
+            } else {
212 210
                 require_once('Zend/Gdata/App/InvalidArgumentException.php');
213 211
                 throw new Zend_Gdata_App_InvalidArgumentException("Expected 'true' or 'false' for apps:login#admin.");
214 212
             }
@@ -216,11 +214,9 @@  discard block
 block discarded – undo
216 214
         case 'agreedToTerms':
217 215
             if ($attribute->nodeValue == "true") {
218 216
                 $this->_agreedToTerms = true;
219
-            }
220
-            else if ($attribute->nodeValue == "false") {
217
+            } else if ($attribute->nodeValue == "false") {
221 218
                 $this->_agreedToTerms = false;
222
-            }
223
-            else {
219
+            } else {
224 220
                 require_once('Zend/Gdata/App/InvalidArgumentException.php');
225 221
                 throw new Zend_Gdata_App_InvalidArgumentException("Expected 'true' or 'false' for apps:login#agreedToTerms.");
226 222
             }
@@ -228,11 +224,9 @@  discard block
 block discarded – undo
228 224
         case 'suspended':
229 225
             if ($attribute->nodeValue == "true") {
230 226
                 $this->_suspended = true;
231
-            }
232
-            else if ($attribute->nodeValue == "false") {
227
+            } else if ($attribute->nodeValue == "false") {
233 228
                 $this->_suspended = false;
234
-            }
235
-            else {
229
+            } else {
236 230
                 require_once('Zend/Gdata/App/InvalidArgumentException.php');
237 231
                 throw new Zend_Gdata_App_InvalidArgumentException("Expected 'true' or 'false' for apps:login#suspended.");
238 232
             }
@@ -240,11 +234,9 @@  discard block
 block discarded – undo
240 234
         case 'changePasswordAtNextLogin':
241 235
             if ($attribute->nodeValue == "true") {
242 236
                 $this->_changePasswordAtNextLogin = true;
243
-            }
244
-            else if ($attribute->nodeValue == "false") {
237
+            } else if ($attribute->nodeValue == "false") {
245 238
                 $this->_changePasswordAtNextLogin = false;
246
-            }
247
-            else {
239
+            } else {
248 240
                 require_once('Zend/Gdata/App/InvalidArgumentException.php');
249 241
                 throw new Zend_Gdata_App_InvalidArgumentException("Expected 'true' or 'false' for apps:login#changePasswordAtNextLogin.");
250 242
             }
Please login to merge, or discard this patch.
lib/Zend/Gdata/Gapps/NicknameQuery.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -110,8 +110,7 @@
 block discarded – undo
110 110
     {
111 111
         if ($value !== null) {
112 112
             $this->_params['username'] = $value;
113
-        }
114
-        else {
113
+        } else {
115 114
             unset($this->_params['username']);
116 115
         }
117 116
     }
Please login to merge, or discard this patch.
lib/Zend/Gdata/Gapps/GroupQuery.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -106,8 +106,7 @@
 block discarded – undo
106 106
     {
107 107
         if ($value !== null) {
108 108
             $this->_params['member'] = $value;
109
-        }
110
-        else {
109
+        } else {
111 110
             unset($this->_params['member']);
112 111
         }
113 112
     }
Please login to merge, or discard this patch.
lib/Zend/Gdata/Gapps/EmailListQuery.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -110,8 +110,7 @@
 block discarded – undo
110 110
     {
111 111
         if ($value !== null) {
112 112
             $this->_params['recipient'] = $value;
113
-        }
114
-        else {
113
+        } else {
115 114
             unset($this->_params['recipient']);
116 115
         }
117 116
     }
Please login to merge, or discard this patch.
lib/Zend/Gdata/ClientLogin.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -121,8 +121,7 @@  discard block
 block discarded – undo
121 121
                 $client->setParameterPost('logintoken', (string) $loginToken);
122 122
                 $client->setParameterPost('logincaptcha',
123 123
                         (string) $loginCaptcha);
124
-            }
125
-            else {
124
+            } else {
126 125
                 require_once 'Zend/Gdata/App/AuthException.php';
127 126
                 throw new Zend_Gdata_App_AuthException(
128 127
                     'Please provide both a token ID and a user\'s response ' .
@@ -169,8 +168,7 @@  discard block
 block discarded – undo
169 168
                 require_once 'Zend/Gdata/App/CaptchaRequiredException.php';
170 169
                 throw new Zend_Gdata_App_CaptchaRequiredException(
171 170
                     $goog_resp['CaptchaToken'], $goog_resp['CaptchaUrl']);
172
-            }
173
-            else {
171
+            } else {
174 172
                 require_once 'Zend/Gdata/App/AuthException.php';
175 173
                 throw new Zend_Gdata_App_AuthException('Authentication with Google failed. Reason: ' .
176 174
                     (isset($goog_resp['Error']) ? $goog_resp['Error'] : 'Unspecified.'));
Please login to merge, or discard this patch.
lib/Zend/Gdata/App/Util.php 1 patch
Braces   +5 added lines, -4 removed lines patch added patch discarded remove patch
@@ -92,10 +92,11 @@
 block discarded – undo
92 92
             // will have a matching namespce. If that fails, we decrement the
93 93
             // version until we find a match.
94 94
             while (!$found && $foundKey >= 0) {
95
-                if (array_key_exists($foundKey, $collection))
96
-                    $found = true;
97
-                else
98
-                    $foundKey--;
95
+                if (array_key_exists($foundKey, $collection)) {
96
+                                    $found = true;
97
+                } else {
98
+                                    $foundKey--;
99
+                }
99 100
             }
100 101
         }
101 102
 
Please login to merge, or discard this patch.