diff --git a/src/Adapter.php b/src/Adapter.php index 70d2330..8279e91 100644 --- a/src/Adapter.php +++ b/src/Adapter.php @@ -80,12 +80,10 @@ public function write($path, $contents, Config $config) $response = $this->normalizeResponse($response); - if (false === $response) { - return false; + if (false !== $response) { + $this->setContentType($path, $contents);; } - $this->setContentType($path, $contents); - return $response; } @@ -107,12 +105,10 @@ public function writeStream($path, $resource, Config $config) $response = $this->normalizeResponse($response); - if (false === $response) { - return false; + if (false !== $response) { + $this->setContentType($path, stream_get_contents($resource)); } - $this->setContentType($path, stream_get_contents($resource)); - return $response; } @@ -134,12 +130,10 @@ public function update($path, $contents, Config $config) $response = $this->normalizeResponse($response); - if (false === $response) { - return false; + if (false !== $response) { + $this->setContentType($path, $contents); } - $this->setContentType($path, $contents); - return $response; } @@ -161,12 +155,10 @@ public function updateStream($path, $resource, Config $config) $response = $this->normalizeResponse($response); - if (false === $response) { - return false; + if (false !== $response) { + $this->setContentType($path, stream_get_contents($resource)); } - $this->setContentType($path, stream_get_contents($resource)); - return $response; }