diff --git a/src/Native/NativeShare.php b/src/Native/NativeShare.php index 93b9cf4..2dfe075 100644 --- a/src/Native/NativeShare.php +++ b/src/Native/NativeShare.php @@ -274,10 +274,10 @@ class NativeShare extends AbstractShare { * @throws \Icewind\SMB\Exception\NotFoundException * @throws \Icewind\SMB\Exception\InvalidTypeException */ - public function write($source, $truncate=true) { + public function write($source, $truncate = true) { $url = $this->buildUrl($source); - if($truncate === true) { + if ($truncate === true) { $handle = $this->getState()->create($url); } else { $handle = $this->getState()->open($url, 'c'); diff --git a/src/Wrapped/Share.php b/src/Wrapped/Share.php index dec9c31..283aede 100644 --- a/src/Wrapped/Share.php +++ b/src/Wrapped/Share.php @@ -333,8 +333,8 @@ class Share extends AbstractShare { * @throws \Icewind\SMB\Exception\NotFoundException * @throws \Icewind\SMB\Exception\InvalidTypeException */ - public function write($target, $truncate=true) { - if($truncate === false) { + public function write($target, $truncate = true) { + if ($truncate === false) { throw new DependencyException('truncate required by smbclient, use php-libsmbclient instead'); }