Merge pull request #22472 from owncloud/scrutinizer-patch-1

Scrutinizer Auto-Fixes
This commit is contained in:
Thomas Müller 2016-02-19 12:36:11 +01:00
commit ba941ea50e
8 changed files with 21 additions and 14 deletions

View File

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

View File

@ -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

View File

@ -114,6 +114,7 @@ class OC_Group_Dummy extends OC_Group_Backend {
if(isset($this->groups[$gid])) {
if(($index=array_search($uid, $this->groups[$gid]))!==false) {
unset($this->groups[$gid][$index]);
return true;
}else{
return false;
}

View File

@ -150,6 +150,10 @@ class Manager extends PublicEmitter implements IGroupManager {
return $this->getGroupObject($gid);
}
/**
* @param string $gid
* @return \OCP\IGroup
*/
protected function getGroupObject($gid) {
$backends = array();
foreach ($this->backends as $backend) {

View File

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

View File

@ -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,7 +921,7 @@ class Preview {
* @param int $askedWidth
* @param int $askedHeight
* @param int $previewWidth
* @param null $previewHeight
* @param int $previewHeight
*
* @return int[]
*/
@ -971,7 +971,7 @@ class Preview {
* @param int $askedWidth
* @param int $askedHeight
* @param int $previewWidth
* @param null $previewHeight
* @param int $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 int $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)) {

View File

@ -35,6 +35,7 @@ interface IControllerMethodReflector {
/**
* @param object $object an object or classname
* @param string $method the method which we want to inspect
* @return void
* @since 8.0.0
*/
public function reflect($object, $method);

View File

@ -58,7 +58,7 @@ abstract class PagedProvider extends Provider {
* Search for $query
* @param string $query
* @param int $page pages start at page 1
* @param int $size, 0 = SIZE_ALL
* @param int $size 0 = SIZE_ALL
* @return array An array of OCP\Search\Result's
* @since 8.0.0
*/