From 17a6a407524fe51ca6935eaca57f8ebe4cb7e094 Mon Sep 17 00:00:00 2001 From: Scrutinizer Auto-Fixer Date: Tue, 26 Apr 2016 16:08:49 +0200 Subject: [PATCH] Scrutinizer Auto-Fixes (#212) This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com --- src/Viserio/Cache/CacheManager.php | 16 +++++++--------- src/Viserio/Config/Repository.php | 2 +- .../Connect/Adapters/MemcachedConnector.php | 2 +- src/Viserio/Contracts/Cookie/Cookie.php | 2 +- src/Viserio/Contracts/Filesystem/Filesystem.php | 2 ++ src/Viserio/Contracts/Filesystem/Loader.php | 2 +- src/Viserio/Cookie/AbstractCookie.php | 2 +- src/Viserio/Cookie/CookieJar.php | 1 - src/Viserio/Encryption/Encrypter.php | 9 +++++---- src/Viserio/Filesystem/Adapters/ZipConnector.php | 2 +- src/Viserio/Filesystem/FilesystemAdapter.php | 4 ---- src/Viserio/Filesystem/Tests/FilesystemTest.php | 2 +- .../Traits/FilesystemExtensionTrait.php | 2 -- src/Viserio/Parsers/Tests/TaggableParserTest.php | 2 +- src/Viserio/Pipeline/Pipeline.php | 2 +- .../Tests/Fixture/PipelineInvokePipe.php | 2 -- 16 files changed, 23 insertions(+), 31 deletions(-) diff --git a/src/Viserio/Cache/CacheManager.php b/src/Viserio/Cache/CacheManager.php index 98d69e32b..03c1e0218 100644 --- a/src/Viserio/Cache/CacheManager.php +++ b/src/Viserio/Cache/CacheManager.php @@ -15,7 +15,6 @@ use Memcache; use Memcached; use MongoDB\Driver\Manager as MongoDBManager; -use Narrowspark\Arr\StaticArr as Arr; use Predis\Client as PredisClient; use Psr\Cache\CacheItemPoolInterface; use Viserio\Contracts\Config\Manager as ConfigContract; @@ -82,7 +81,7 @@ public function setDefaultDriver($name) /** * Create an instance of the Flysystem cache driver. * - * @return \Psr\Cache\CacheItemPoolInterface|null + * @return FilesystemCachePool|null */ protected function createFilesystemDriver(array $options) { @@ -102,9 +101,8 @@ protected function createFilesystemDriver(array $options) /** * Create an instance of the Memcached cache driver. * - * @param array $config * - * @return \Psr\Cache\CacheItemPoolInterface|null + * @return MemcachedCachePool|null */ protected function createMemcachedDriver(array $options) { @@ -124,7 +122,7 @@ protected function createMemcachedDriver(array $options) * * @param array $options * - * @return \Psr\Cache\CacheItemPoolInterface|null + * @return MemcacheCachePool|null */ protected function createMemcacheDriver(array $options) { @@ -144,7 +142,7 @@ protected function createMemcacheDriver(array $options) * * @param array $options * - * @return \Psr\Cache\CacheItemPoolInterface|null + * @return MongoDBCachePool|null */ public function createMongodbDriver(array $options) { @@ -164,7 +162,7 @@ public function createMongodbDriver(array $options) * * @param array $options * - * @return \Psr\Cache\CacheItemPoolInterface|null + * @return PredisCachePool|null */ public function createPredisDriver(array $options) { @@ -184,7 +182,7 @@ public function createPredisDriver(array $options) * * @param array $options * - * @return \Psr\Cache\CacheItemPoolInterface|null + * @return FilesystemCachePool|null */ protected function createLocalDriver(array $options) { @@ -204,7 +202,7 @@ protected function createLocalDriver(array $options) * * @param array $options * - * @return \Psr\Cache\CacheItemPoolInterface|null + * @return Psr6SessionHandler|null */ protected function createSessionDriver(array $options) { diff --git a/src/Viserio/Config/Repository.php b/src/Viserio/Config/Repository.php index 8a4a5d773..a4e120cf7 100644 --- a/src/Viserio/Config/Repository.php +++ b/src/Viserio/Config/Repository.php @@ -56,7 +56,7 @@ public function setSeparator($separator) /** * Get Separator. * - * @return string|null + * @return string */ public function getSeparator() { diff --git a/src/Viserio/Connect/Adapters/MemcachedConnector.php b/src/Viserio/Connect/Adapters/MemcachedConnector.php index 63336a574..8e56f7baa 100644 --- a/src/Viserio/Connect/Adapters/MemcachedConnector.php +++ b/src/Viserio/Connect/Adapters/MemcachedConnector.php @@ -79,7 +79,7 @@ protected function addMemcachedServers($memcached, array $servers) /** * Set custom memcached options. * - * @param object $memcached + * @param Memcached $memcached * @param array $config * * @throws \RuntimeException diff --git a/src/Viserio/Contracts/Cookie/Cookie.php b/src/Viserio/Contracts/Cookie/Cookie.php index 46de18dd1..e95d8271a 100644 --- a/src/Viserio/Contracts/Cookie/Cookie.php +++ b/src/Viserio/Contracts/Cookie/Cookie.php @@ -79,7 +79,7 @@ public function withExpires(DateTime $expires); /** * Returns the expiration time * - * @return int|\DateTime + * @return integer */ public function getExpiresTime(); diff --git a/src/Viserio/Contracts/Filesystem/Filesystem.php b/src/Viserio/Contracts/Filesystem/Filesystem.php index 1cc61ae56..1dcf3fb08 100644 --- a/src/Viserio/Contracts/Filesystem/Filesystem.php +++ b/src/Viserio/Contracts/Filesystem/Filesystem.php @@ -75,6 +75,7 @@ public function getVisibility($path); * * @param string $path * @param string $visibility + * @return boolean|null */ public function setVisibility($path, $visibility); @@ -91,6 +92,7 @@ public function setVisibility($path, $visibility); * * @throws \Viserio\Contracts\Filesystem\Exception\FileNotFoundException When originFile doesn't exist * @throws \Viserio\Contracts\Filesystem\Exception\IOException When copy fails + * @return null|boolean */ public function copy($originFile, $targetFile, $override = false); diff --git a/src/Viserio/Contracts/Filesystem/Loader.php b/src/Viserio/Contracts/Filesystem/Loader.php index bfe790fae..21f4f0039 100644 --- a/src/Viserio/Contracts/Filesystem/Loader.php +++ b/src/Viserio/Contracts/Filesystem/Loader.php @@ -18,7 +18,7 @@ public function load($file, $tag = null); * * @param string $file * - * @return bool|array + * @return boolean|string */ public function exists($file); } diff --git a/src/Viserio/Cookie/AbstractCookie.php b/src/Viserio/Cookie/AbstractCookie.php index dbdebc0f9..90d33d1b3 100644 --- a/src/Viserio/Cookie/AbstractCookie.php +++ b/src/Viserio/Cookie/AbstractCookie.php @@ -354,7 +354,7 @@ abstract public function __toString(); /** * Normalizes the expiration value * - * @param int|\DateTime|null $expiration + * @param integer|null $expiration * * @return \DateTime|null */ diff --git a/src/Viserio/Cookie/CookieJar.php b/src/Viserio/Cookie/CookieJar.php index 2c0ddee65..c49747810 100644 --- a/src/Viserio/Cookie/CookieJar.php +++ b/src/Viserio/Cookie/CookieJar.php @@ -3,7 +3,6 @@ use Narrowspark\Arr\StaticArr as Arr; use Psr\Http\Message\ResponseInterface; -use Psr\Http\Message\ServerRequestInterface; use Viserio\Contracts\Cookie\QueueingFactory as JarContract; class CookieJar implements JarContract diff --git a/src/Viserio/Encryption/Encrypter.php b/src/Viserio/Encryption/Encrypter.php index 2946b1119..f464ae9f5 100644 --- a/src/Viserio/Encryption/Encrypter.php +++ b/src/Viserio/Encryption/Encrypter.php @@ -5,8 +5,8 @@ use RandomLib\Generator as RandomLib; use RuntimeException; use Viserio\Contracts\Encryption\DecryptException; -use Viserio\Contracts\Encryption\Encrypter as EncrypterContract; use Viserio\Contracts\Encryption\EncryptException; +use Viserio\Contracts\Encryption\Encrypter as EncrypterContract; use Viserio\Contracts\Hashing\Generator as HashContract; use Viserio\Encryption\Adapter\OpenSsl; @@ -113,7 +113,7 @@ public function setKey($key) * 'mac' => 'Message Authentication Code' * ] * - * @param mixed $data Data to encrypt. + * @param string $data Data to encrypt. * * @return string Serialized array containing the encrypted data * along with some meta data. @@ -160,9 +160,9 @@ public function decrypt($data) /** * Compare two encrypted values. * - * @param mixed $e1 - * @param mixed $e2 * @param bool $loose + * @param string $encrypted1 + * @param string $encrypted2 * * @return bool */ @@ -198,6 +198,7 @@ public function getGenerator() * @param string $cipher * @param string mode * @param string $key + * @param string $mode * * @throws \RuntimeException */ diff --git a/src/Viserio/Filesystem/Adapters/ZipConnector.php b/src/Viserio/Filesystem/Adapters/ZipConnector.php index 37d750421..c1ca4fe1c 100644 --- a/src/Viserio/Filesystem/Adapters/ZipConnector.php +++ b/src/Viserio/Filesystem/Adapters/ZipConnector.php @@ -13,7 +13,7 @@ class ZipConnector implements ConnectorContract * * @param string[] $config * - * @return object + * @return ZipArchiveAdapter */ public function connect(array $config) { diff --git a/src/Viserio/Filesystem/FilesystemAdapter.php b/src/Viserio/Filesystem/FilesystemAdapter.php index 0180abd43..96b724824 100644 --- a/src/Viserio/Filesystem/FilesystemAdapter.php +++ b/src/Viserio/Filesystem/FilesystemAdapter.php @@ -3,10 +3,7 @@ use InvalidArgumentException; use League\Flysystem\AdapterInterface; -use League\Flysystem\AwsS3v3\AwsS3Adapter; -use League\Flysystem\Config as FlyConfig; use League\Flysystem\FileNotFoundException as FlyFileNotFoundException; -use RuntimeException; use Viserio\Contracts\Filesystem\Directorysystem as DirectorysystemContract; use Viserio\Contracts\Filesystem\FileNotFoundException; use Viserio\Contracts\Filesystem\Filesystem as FilesystemContract; @@ -175,7 +172,6 @@ public function allFiles($directory) * Get all of the directories within a given directory. * * @param string|null $directory - * @param bool $recursive * * @return array */ diff --git a/src/Viserio/Filesystem/Tests/FilesystemTest.php b/src/Viserio/Filesystem/Tests/FilesystemTest.php index 1b7430c71..47fb62700 100644 --- a/src/Viserio/Filesystem/Tests/FilesystemTest.php +++ b/src/Viserio/Filesystem/Tests/FilesystemTest.php @@ -1,10 +1,10 @@