Skip to content
This repository has been archived by the owner on Mar 1, 2023. It is now read-only.

Commit

Permalink
Merge pull request #230 from narrowspark/analysis-zdjjv7
Browse files Browse the repository at this point in the history
Applied fixes from StyleCI
  • Loading branch information
prisis committed May 14, 2016
2 parents ff6525e + 4a360c6 commit 50466e0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/Viserio/Cookie/AbstractCookie.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php
namespace Viserio\Cookie;

use DateTimeInterface;
use DateTime;
use DateTimeInterface;
use Viserio\Contracts\Cookie\Cookie as CookieContract;
use Viserio\Contracts\Support\Stringable;

Expand Down
8 changes: 4 additions & 4 deletions src/Viserio/Filesystem/FilesystemAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public function read($path)

$content = $this->driver->read($path);

return !$content ? : $content['contents'];
return !$content ?: $content['contents'];
}

/**
Expand Down Expand Up @@ -126,7 +126,7 @@ public function copy($originFile, $targetFile, $override = false)
}

// Stream context created to allow files overwrite when using FTP stream wrapper - disabled by default
if (@fopen($target, 'w', null, stream_context_create(array('ftp' => array('overwrite' => true)))) === false) {
if (@fopen($target, 'w', null, stream_context_create(['ftp' => ['overwrite' => true]])) === false) {
throw new ViserioIOException(sprintf('Failed to copy "%s" to "%s" because target file could not be opened for writing.', $orginal, $target), 0, null, $orginal);
}

Expand Down Expand Up @@ -166,7 +166,7 @@ public function getMimetype($path)

$mimetype = $this->driver->getMimetype($path);

return !$mimetype ? : $mimetype['mimetype'];
return !$mimetype ?: $mimetype['mimetype'];
}

/**
Expand All @@ -180,7 +180,7 @@ public function getTimestamp($path)

$getTimestamp = $this->driver->getTimestamp($path);

return !$getTimestamp ? : $getTimestamp['timestamp'];
return !$getTimestamp ?: $getTimestamp['timestamp'];
}

/**
Expand Down
7 changes: 4 additions & 3 deletions src/Viserio/Filesystem/Tests/FilesystemAdapterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -271,11 +271,12 @@ public function testGetTimestampToThrowFileNotFoundException()
$this->adapter->getTimestamp('/DontExist');
}

private function delTree($dir) {
$files = array_diff(scandir($dir), array('.','..'));
private function delTree($dir)
{
$files = array_diff(scandir($dir), ['.', '..']);

foreach ($files as $file) {
(is_dir("$dir/$file")) ? $this->delTree("$dir/$file") : unlink("$dir/$file");
(is_dir("$dir/$file")) ? $this->delTree("$dir/$file") : unlink("$dir/$file");
}

return rmdir($dir);
Expand Down

0 comments on commit 50466e0

Please sign in to comment.