Просмотр исходного кода

[#402] Flow fix

- Reformatted conditional to make it easier to read/understand.
Matthew Weier O'Phinney 11 лет назад
Родитель
Сommit
42c3a3252f
1 измененных файлов с 7 добавлено и 3 удалено
  1. 7 3
      library/Zend/Http/Client.php

+ 7 - 3
library/Zend/Http/Client.php

@@ -386,13 +386,17 @@ class Zend_Http_Client
     public function setMethod($method = self::GET)
     {
         if (! preg_match('/^[^\x00-\x1f\x7f-\xff\(\)<>@,;:\\\\"\/\[\]\?={}\s]+$/', $method)) {
-            /** @see Zend_Http_Client_Exception */
             require_once 'Zend/Http/Client/Exception.php';
             throw new Zend_Http_Client_Exception("'{$method}' is not a valid HTTP request method.");
         }
 
-        if (($method == self::POST || $method == self::PUT || $method == self::DELETE || $method == self::PATCH
-             || $method == self::OPTIONS) && $this->enctype === null) {
+        if (($method == self::POST
+                || $method == self::PUT
+                || $method == self::DELETE
+                || $method == self::PATCH
+                || $method == self::OPTIONS)
+            && $this->enctype === null
+        ) {
             $this->setEncType(self::ENC_URLENCODED);
         }