diff --git a/src/Adapter.php b/src/Adapter.php index c8529f2..407d092 100644 --- a/src/Adapter.php +++ b/src/Adapter.php @@ -81,12 +81,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; } @@ -108,12 +106,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; } @@ -135,12 +131,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; } @@ -162,12 +156,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; }