From 0d0151a3e1fff5d98f2c764a90e7ebf4f98ae729 Mon Sep 17 00:00:00 2001 From: Scrutinizer Auto-Fixer Date: Wed, 17 Feb 2016 13:21:07 +0000 Subject: [PATCH] Scrutinizer Auto-Fixes This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com --- lib/private/api.php | 5 +++-- lib/private/files/stream/encryption.php | 2 +- lib/private/group/dummy.php | 2 +- lib/private/group/manager.php | 3 +++ lib/private/memcache/factory.php | 2 +- lib/private/preview.php | 22 +++++++++---------- .../utility/icontrollermethodreflector.php | 1 + lib/public/search/pagedprovider.php | 1 + 8 files changed, 22 insertions(+), 16 deletions(-) diff --git a/lib/private/api.php b/lib/private/api.php index 6c6be233c9d..734bb30d334 100644 --- a/lib/private/api.php +++ b/lib/private/api.php @@ -188,7 +188,7 @@ class OC_API { /** * merge the returned result objects into one response * @param array $responses - * @return array|\OC_OCS_Result + * @return OC_OCS_Result */ public static function mergeResponses($responses) { // Sort into shipped and third-party @@ -329,7 +329,7 @@ class OC_API { /** * http basic auth - * @return string|false (username, or false on failure) + * @return string (username, or false on failure) */ private static function loginUser() { if(self::$isLoggedIn === true) { @@ -442,6 +442,7 @@ class OC_API { /** * Based on the requested format the response content type is set + * @param string $format */ public static function setContentType($format = null) { $format = is_null($format) ? self::requestedFormat() : $format; diff --git a/lib/private/files/stream/encryption.php b/lib/private/files/stream/encryption.php index 63949035b5a..37a1d75519d 100644 --- a/lib/private/files/stream/encryption.php +++ b/lib/private/files/stream/encryption.php @@ -183,7 +183,7 @@ class Encryption extends Wrapper { * * @param resource $source * @param string $mode - * @param array $context + * @param resource $context * @param string $protocol * @param string $class * @return resource diff --git a/lib/private/group/dummy.php b/lib/private/group/dummy.php index c0d206a34e1..3e4dfeba5e3 100644 --- a/lib/private/group/dummy.php +++ b/lib/private/group/dummy.php @@ -106,7 +106,7 @@ class OC_Group_Dummy extends OC_Group_Backend { * Removes a user from a group * @param string $uid Name of the user to remove from group * @param string $gid Name of the group from which remove the user - * @return bool + * @return null|false * * removes the user from a group. */ diff --git a/lib/private/group/manager.php b/lib/private/group/manager.php index 98e5551bcc5..1f4092ed606 100644 --- a/lib/private/group/manager.php +++ b/lib/private/group/manager.php @@ -150,6 +150,9 @@ class Manager extends PublicEmitter implements IGroupManager { return $this->getGroupObject($gid); } + /** + * @param string $gid + */ protected function getGroupObject($gid) { $backends = array(); foreach ($this->backends as $backend) { diff --git a/lib/private/memcache/factory.php b/lib/private/memcache/factory.php index 21149d8b6bf..204ded7d5ab 100644 --- a/lib/private/memcache/factory.php +++ b/lib/private/memcache/factory.php @@ -172,7 +172,7 @@ class Factory implements ICacheFactory { /** * @see \OC\Memcache\Factory::createLocal() * @param string $prefix - * @return \OC\Memcache\Cache|null + * @return Cache */ public function createLowLatency($prefix = '') { return $this->createLocal($prefix); diff --git a/lib/private/preview.php b/lib/private/preview.php index df6eeceddcb..4039109a570 100644 --- a/lib/private/preview.php +++ b/lib/private/preview.php @@ -202,7 +202,7 @@ class Preview { /** * returns the max width set in ownCloud's config * - * @return string + * @return integer */ public function getConfigMaxX() { return $this->configMaxWidth; @@ -211,7 +211,7 @@ class Preview { /** * returns the max height set in ownCloud's config * - * @return string + * @return integer */ public function getConfigMaxY() { return $this->configMaxHeight; @@ -546,7 +546,7 @@ class Preview { /** * Determines the size of the preview we should be looking for in the cache * - * @return int[] + * @return integer[] */ private function simulatePreviewDimensions() { $askedWidth = $this->getMaxX(); @@ -570,7 +570,7 @@ class Preview { * * @param int $originalWidth * @param int $originalHeight - * @return \int[] + * @return integer[] */ private function applyAspectRatio($askedWidth, $askedHeight, $originalWidth = 0, $originalHeight = 0) { if(!$originalWidth){ @@ -602,7 +602,7 @@ class Preview { * @param int $askedHeight * @param int $previewWidth * @param int $previewHeight - * @return \int[] + * @return integer[] */ private function applyCover($askedWidth, $askedHeight, $previewWidth, $previewHeight) { $originalRatio = $previewWidth / $previewHeight; @@ -628,7 +628,7 @@ class Preview { * @param int $askedWidth * @param int $askedHeight * - * @return \int[] + * @return integer[] */ private function fixSize($askedWidth, $askedHeight) { if ($this->scalingUp) { @@ -921,9 +921,9 @@ class Preview { * @param int $askedWidth * @param int $askedHeight * @param int $previewWidth - * @param null $previewHeight + * @param integer $previewHeight * - * @return int[] + * @return double[] */ private function scale($image, $askedWidth, $askedHeight, $previewWidth, $previewHeight) { $scalingUp = $this->getScalingUp(); @@ -971,7 +971,7 @@ class Preview { * @param int $askedWidth * @param int $askedHeight * @param int $previewWidth - * @param null $previewHeight + * @param double $previewHeight */ private function crop($image, $askedWidth, $askedHeight, $previewWidth, $previewHeight = null) { $cropX = floor(abs($askedWidth - $previewWidth) * 0.5); @@ -990,7 +990,7 @@ class Preview { * @param int $askedWidth * @param int $askedHeight * @param int $previewWidth - * @param null $previewHeight + * @param double $previewHeight */ private function cropAndFill($image, $askedWidth, $askedHeight, $previewWidth, $previewHeight) { if ($previewWidth > $askedWidth) { @@ -1218,7 +1218,7 @@ class Preview { * @param int $maxDim * @param string $dimName * - * @return mixed + * @return integer */ private function limitMaxDim($dim, $maxDim, $dimName) { if (!is_null($maxDim)) { diff --git a/lib/public/appframework/utility/icontrollermethodreflector.php b/lib/public/appframework/utility/icontrollermethodreflector.php index b2f91fdb170..b2261e68859 100644 --- a/lib/public/appframework/utility/icontrollermethodreflector.php +++ b/lib/public/appframework/utility/icontrollermethodreflector.php @@ -36,6 +36,7 @@ interface IControllerMethodReflector { * @param object $object an object or classname * @param string $method the method which we want to inspect * @since 8.0.0 + * @return void */ public function reflect($object, $method); diff --git a/lib/public/search/pagedprovider.php b/lib/public/search/pagedprovider.php index 93289a1bde4..2695d2d6125 100644 --- a/lib/public/search/pagedprovider.php +++ b/lib/public/search/pagedprovider.php @@ -59,6 +59,7 @@ abstract class PagedProvider extends Provider { * @param string $query * @param int $page pages start at page 1 * @param int $size, 0 = SIZE_ALL + * @param integer $size * @return array An array of OCP\Search\Result's * @since 8.0.0 */ -- 2.39.5