phpcs fix

This commit is contained in:
raffis 2019-10-10 09:38:51 +02:00
commit f4fdd50496
No known key found for this signature in database
GPG key ID: 5E0BF46A67AD81C4
2 changed files with 4 additions and 4 deletions

View file

@ -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');

View file

@ -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');
}