| @@ -32,7 +32,7 @@ | ||
| 32 | 32 | public function setValue($value) | 
| 33 | 33 |      { | 
| 34 | 34 | $value = trim($value); | 
| 35 | -        if (!is_file($value) || !is_readable($value)) { | |
| 35 | +        if ( ! is_file($value) || ! is_readable($value)) { | |
| 36 | 36 |              throw new OptionException(sprintf('"%s" is not a readable file', $value)); | 
| 37 | 37 | } | 
| 38 | 38 | |
| @@ -46,7 +46,7 @@ | ||
| 46 | 46 | */ | 
| 47 | 47 | public function setValue($value) | 
| 48 | 48 |      { | 
| 49 | -        if (!is_callable($this->callback)) { | |
| 49 | +        if ( ! is_callable($this->callback)) { | |
| 50 | 50 |              throw new OptionException('No callback defined'); | 
| 51 | 51 | } | 
| 52 | 52 | |
| @@ -67,7 +67,7 @@ | ||
| 67 | 67 |      { | 
| 68 | 68 | $value = trim($value); | 
| 69 | 69 | |
| 70 | -        if (!preg_match($this->regex, $value)) { | |
| 70 | +        if ( ! preg_match($this->regex, $value)) { | |
| 71 | 71 | throw new OptionException(sprintf($this->message, $value)); | 
| 72 | 72 | } | 
| 73 | 73 | |
| @@ -54,7 +54,7 @@ | ||
| 54 | 54 | */ | 
| 55 | 55 | public function getTransport() | 
| 56 | 56 |      { | 
| 57 | -        if (!$this->transport instanceof TransportInterface) { | |
| 57 | +        if ( ! $this->transport instanceof TransportInterface) { | |
| 58 | 58 | $this->transport = Curl::createFromDefaults(); | 
| 59 | 59 | } | 
| 60 | 60 | |
| @@ -221,7 +221,7 @@ discard block | ||
| 221 | 221 | curl_setopt($this->handler, $option->getOption(), $option->getValue()); | 
| 222 | 222 | } | 
| 223 | 223 | |
| 224 | -        if ($this->hasOption(CURLOPT_USERPWD) && !$this->hasOption(CURLOPT_HTTPAUTH, CURLAUTH_BASIC)) { | |
| 224 | +        if ($this->hasOption(CURLOPT_USERPWD) && ! $this->hasOption(CURLOPT_HTTPAUTH, CURLAUTH_BASIC)) { | |
| 225 | 225 | curl_setopt($this->handler, CURLOPT_HTTPAUTH, CURLAUTH_BASIC); | 
| 226 | 226 | } | 
| 227 | 227 | } | 
| @@ -247,7 +247,7 @@ discard block | ||
| 247 | 247 | */ | 
| 248 | 248 | public function responseInfo($option = null) | 
| 249 | 249 |      { | 
| 250 | -        if (!is_resource($this->handler)) { | |
| 250 | +        if ( ! is_resource($this->handler)) { | |
| 251 | 251 | return; | 
| 252 | 252 | } | 
| 253 | 253 | |
| @@ -295,7 +295,7 @@ discard block | ||
| 295 | 295 | } | 
| 296 | 296 | } | 
| 297 | 297 | |
| 298 | -        if (!in_array($option, static::getCurlConstants(), true)) { | |
| 298 | +        if ( ! in_array($option, static::getCurlConstants(), true)) { | |
| 299 | 299 |              throw new OptionException(sprintf('"%s" is not valid cURL option', $option)); | 
| 300 | 300 | } | 
| 301 | 301 | |
| @@ -316,10 +316,10 @@ discard block | ||
| 316 | 316 |      { | 
| 317 | 317 |          switch ($option) { | 
| 318 | 318 | case CURLOPT_HTTP_VERSION: | 
| 319 | -                $optionClass->setCallback(function ($value) { | |
| 319 | +                $optionClass->setCallback(function($value) { | |
| 320 | 320 | $value = number_format((float) $value, 1, '.', ''); | 
| 321 | 321 | |
| 322 | -                    if (!preg_match('/^1.([01])$/', $value)) { | |
| 322 | +                    if ( ! preg_match('/^1.([01])$/', $value)) { | |
| 323 | 323 |                          throw new OptionException(sprintf('"%s" is not a valid HTTP version', $value)); | 
| 324 | 324 | } | 
| 325 | 325 | |
| @@ -328,7 +328,7 @@ discard block | ||
| 328 | 328 | break; | 
| 329 | 329 | |
| 330 | 330 | case CURLOPT_COOKIE: | 
| 331 | -                $optionClass->setCallback(function ($value) { | |
| 331 | +                $optionClass->setCallback(function($value) { | |
| 332 | 332 |                      if (is_array($value)) { | 
| 333 | 333 | $value = http_build_query($value, '', '; '); | 
| 334 | 334 | } | 
| @@ -58,7 +58,7 @@ discard block | ||
| 58 | 58 | */ | 
| 59 | 59 | public function setOption($option, $value = '', $quiet = false) | 
| 60 | 60 |      { | 
| 61 | -        if (!$option instanceof OptionInterface) { | |
| 61 | +        if ( ! $option instanceof OptionInterface) { | |
| 62 | 62 |              try { | 
| 63 | 63 | $option = OptionFactory::build($option, $value); | 
| 64 | 64 |              } catch (OptionException $exception) { | 
| @@ -119,9 +119,9 @@ discard block | ||
| 119 | 119 | /** | 
| 120 | 120 | * @param OptionInterface $transportOption | 
| 121 | 121 | */ | 
| 122 | -            function ($transportOption) use ($option) { | |
| 122 | +            function($transportOption) use ($option) { | |
| 123 | 123 | /* @var OptionInterface $transportOption */ | 
| 124 | - return !($transportOption->getOption() === $option); | |
| 124 | + return ! ($transportOption->getOption() === $option); | |
| 125 | 125 | } | 
| 126 | 126 | ); | 
| 127 | 127 | } |