Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScrutinizer Auto-Fixer <auto-fixer@scrutinizer-ci.com>2015-12-08 18:01:20 +0300
committerThomas Müller <thomas.mueller@tmit.eu>2015-12-10 18:43:37 +0300
commitffc49a24f02639afce362384fc3d6e4a0799d1d7 (patch)
treeb89786860bf4289211a31c3b76dca7bff3b5523f
parent7094ed05adfa435a53d7d6ce0c3b6d32760f5111 (diff)
Scrutinizer Auto-Fixes
This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com
-rw-r--r--apps/dav/lib/systemtag/systemtagsbyidcollection.php12
-rw-r--r--apps/dav/lib/systemtag/systemtagsobjecttypecollection.php15
-rw-r--r--apps/dav/tests/unit/systemtag/systemtagmappingnode.php4
-rw-r--r--apps/dav/tests/unit/systemtag/systemtagsbyidcollection.php1
-rw-r--r--apps/dav/tests/unit/systemtag/systemtagsobjectmappingcollection.php1
-rw-r--r--apps/files/tests/backgroundjob/ScanFilesTest.php1
-rw-r--r--apps/files_external/lib/personalmount.php2
-rw-r--r--apps/files_external/service/storagesservice.php3
-rw-r--r--apps/files_external/service/userglobalstoragesservice.php3
-rw-r--r--apps/files_external/tests/service/globalstoragesservicetest.php1
-rw-r--r--build/integration/features/bootstrap/CapabilitiesContext.php2
-rw-r--r--lib/private/appframework/middleware/security/securitymiddleware.php1
-rw-r--r--lib/private/share/mailnotifications.php6
-rw-r--r--tests/lib/share/MailNotificationsTest.php4
14 files changed, 40 insertions, 16 deletions
diff --git a/apps/dav/lib/systemtag/systemtagsbyidcollection.php b/apps/dav/lib/systemtag/systemtagsbyidcollection.php
index e7b7b6d0acc..79b0aa8fbbd 100644
--- a/apps/dav/lib/systemtag/systemtagsbyidcollection.php
+++ b/apps/dav/lib/systemtag/systemtagsbyidcollection.php
@@ -46,14 +46,23 @@ class SystemTagsByIdCollection implements ICollection {
$this->tagManager = $tagManager;
}
+ /**
+ * @param string $name
+ */
function createFile($name, $data = null) {
throw new Forbidden('Cannot create tags by id');
}
+ /**
+ * @param string $name
+ */
function createDirectory($name) {
throw new Forbidden('Permission denied to create collections');
}
+ /**
+ * @param string $name
+ */
function getChild($name) {
try {
$tags = $this->tagManager->getTagsByIds([$name]);
@@ -72,6 +81,9 @@ class SystemTagsByIdCollection implements ICollection {
}, $tags);
}
+ /**
+ * @param string $name
+ */
function childExists($name) {
try {
$this->tagManager->getTagsByIds([$name]);
diff --git a/apps/dav/lib/systemtag/systemtagsobjecttypecollection.php b/apps/dav/lib/systemtag/systemtagsobjecttypecollection.php
index e544073613f..543a684c5bb 100644
--- a/apps/dav/lib/systemtag/systemtagsobjecttypecollection.php
+++ b/apps/dav/lib/systemtag/systemtagsobjecttypecollection.php
@@ -61,14 +61,23 @@ class SystemTagsObjectTypeCollection implements ICollection {
$this->objectType = $objectType;
}
+ /**
+ * @param string $name
+ */
function createFile($name, $data = null) {
throw new Forbidden('Permission denied to create nodes');
}
+ /**
+ * @param string $name
+ */
function createDirectory($name) {
throw new Forbidden('Permission denied to create collections');
}
+ /**
+ * @param string $objectId
+ */
function getChild($objectId) {
return new SystemTagsObjectMappingCollection(
$objectId,
@@ -83,6 +92,9 @@ class SystemTagsObjectTypeCollection implements ICollection {
throw new MethodNotAllowed();
}
+ /**
+ * @param string $name
+ */
function childExists($name) {
return true;
}
@@ -95,6 +107,9 @@ class SystemTagsObjectTypeCollection implements ICollection {
return $this->objectType;
}
+ /**
+ * @param string $name
+ */
function setName($name) {
throw new Forbidden('Permission denied to rename this collection');
}
diff --git a/apps/dav/tests/unit/systemtag/systemtagmappingnode.php b/apps/dav/tests/unit/systemtag/systemtagmappingnode.php
index 849f7c2fa54..aef62a1acb2 100644
--- a/apps/dav/tests/unit/systemtag/systemtagmappingnode.php
+++ b/apps/dav/tests/unit/systemtag/systemtagmappingnode.php
@@ -9,12 +9,8 @@
namespace OCA\DAV\Tests\Unit\SystemTag;
use Sabre\DAV\Exception\NotFound;
-use Sabre\DAV\Exception\MethodNotAllowed;
-use Sabre\DAV\Exception\Conflict;
-
use OC\SystemTag\SystemTag;
use OCP\SystemTag\TagNotFoundException;
-use OCP\SystemTag\TagAlreadyExistsException;
class SystemTagMappingNode extends SystemTagNode {
diff --git a/apps/dav/tests/unit/systemtag/systemtagsbyidcollection.php b/apps/dav/tests/unit/systemtag/systemtagsbyidcollection.php
index 104ce366034..fa9e42d04f9 100644
--- a/apps/dav/tests/unit/systemtag/systemtagsbyidcollection.php
+++ b/apps/dav/tests/unit/systemtag/systemtagsbyidcollection.php
@@ -11,7 +11,6 @@ namespace OCA\DAV\Tests\Unit\SystemTag;
use OC\SystemTag\SystemTag;
use OCP\SystemTag\TagNotFoundException;
-use OCP\SystemTag\TagAlreadyExistsException;
class SystemTagsByIdCollection extends \Test\TestCase {
diff --git a/apps/dav/tests/unit/systemtag/systemtagsobjectmappingcollection.php b/apps/dav/tests/unit/systemtag/systemtagsobjectmappingcollection.php
index 6e15bb78e7c..a9b34f5ae19 100644
--- a/apps/dav/tests/unit/systemtag/systemtagsobjectmappingcollection.php
+++ b/apps/dav/tests/unit/systemtag/systemtagsobjectmappingcollection.php
@@ -11,7 +11,6 @@ namespace OCA\DAV\Tests\Unit\SystemTag;
use OC\SystemTag\SystemTag;
use OCP\SystemTag\TagNotFoundException;
-use OCP\SystemTag\TagAlreadyExistsException;
class SystemTagsObjectMappingCollection extends \Test\TestCase {
diff --git a/apps/files/tests/backgroundjob/ScanFilesTest.php b/apps/files/tests/backgroundjob/ScanFilesTest.php
index 907cad64f9e..087696f0cfc 100644
--- a/apps/files/tests/backgroundjob/ScanFilesTest.php
+++ b/apps/files/tests/backgroundjob/ScanFilesTest.php
@@ -24,7 +24,6 @@ use Test\TestCase;
use OCP\IConfig;
use OCP\IUserManager;
use OCA\Files\BackgroundJob\ScanFiles;
-use OCP\ILogger;
/**
* Class ScanFilesTest
diff --git a/apps/files_external/lib/personalmount.php b/apps/files_external/lib/personalmount.php
index f81dee5be1e..34ae516ea5e 100644
--- a/apps/files_external/lib/personalmount.php
+++ b/apps/files_external/lib/personalmount.php
@@ -40,7 +40,7 @@ class PersonalMount extends MountPoint implements MoveableMount {
/**
* @param UserStoragesService $storagesService
* @param int $storageId
- * @param string|\OC\Files\Storage\Storage $storage
+ * @param \OCP\Files\Storage $storage
* @param string $mountpoint
* @param array $arguments (optional) configuration for the storage backend
* @param \OCP\Files\Storage\IStorageFactory $loader
diff --git a/apps/files_external/service/storagesservice.php b/apps/files_external/service/storagesservice.php
index 9be6498435c..97f79c13324 100644
--- a/apps/files_external/service/storagesservice.php
+++ b/apps/files_external/service/storagesservice.php
@@ -185,6 +185,9 @@ abstract class StoragesService {
*/
abstract public function getVisibilityType();
+ /**
+ * @return integer
+ */
protected function getType() {
return DBConfigService::MOUNT_TYPE_ADMIN;
}
diff --git a/apps/files_external/service/userglobalstoragesservice.php b/apps/files_external/service/userglobalstoragesservice.php
index cb49f0f6726..e58815f8a79 100644
--- a/apps/files_external/service/userglobalstoragesservice.php
+++ b/apps/files_external/service/userglobalstoragesservice.php
@@ -89,6 +89,9 @@ class UserGlobalStoragesService extends GlobalStoragesService {
throw new \DomainException('UserGlobalStoragesService writing disallowed');
}
+ /**
+ * @param integer $id
+ */
public function removeStorage($id) {
throw new \DomainException('UserGlobalStoragesService writing disallowed');
}
diff --git a/apps/files_external/tests/service/globalstoragesservicetest.php b/apps/files_external/tests/service/globalstoragesservicetest.php
index 7c77616563c..e620b05a51e 100644
--- a/apps/files_external/tests/service/globalstoragesservicetest.php
+++ b/apps/files_external/tests/service/globalstoragesservicetest.php
@@ -23,7 +23,6 @@ namespace OCA\Files_external\Tests\Service;
use \OC\Files\Filesystem;
-use OCA\Files_External\Service\DBConfigService;
use \OCA\Files_external\Service\GlobalStoragesService;
use \OCA\Files_external\NotFoundException;
use \OCA\Files_external\Lib\StorageConfig;
diff --git a/build/integration/features/bootstrap/CapabilitiesContext.php b/build/integration/features/bootstrap/CapabilitiesContext.php
index 4e200bdf421..1b0015dce73 100644
--- a/build/integration/features/bootstrap/CapabilitiesContext.php
+++ b/build/integration/features/bootstrap/CapabilitiesContext.php
@@ -2,8 +2,6 @@
use Behat\Behat\Context\Context;
use Behat\Behat\Context\SnippetAcceptingContext;
-use GuzzleHttp\Client;
-use GuzzleHttp\Message\ResponseInterface;
require __DIR__ . '/../../vendor/autoload.php';
diff --git a/lib/private/appframework/middleware/security/securitymiddleware.php b/lib/private/appframework/middleware/security/securitymiddleware.php
index d0b7202a360..725ce689b48 100644
--- a/lib/private/appframework/middleware/security/securitymiddleware.php
+++ b/lib/private/appframework/middleware/security/securitymiddleware.php
@@ -27,7 +27,6 @@
namespace OC\AppFramework\Middleware\Security;
-use OC\AppFramework\Http;
use OC\Appframework\Middleware\Security\Exceptions\AppNotEnabledException;
use OC\Appframework\Middleware\Security\Exceptions\CrossSiteRequestForgeryException;
use OC\Appframework\Middleware\Security\Exceptions\NotAdminException;
diff --git a/lib/private/share/mailnotifications.php b/lib/private/share/mailnotifications.php
index 4d282158ba4..f071c7f3a3c 100644
--- a/lib/private/share/mailnotifications.php
+++ b/lib/private/share/mailnotifications.php
@@ -170,7 +170,7 @@ class MailNotifications {
* @param string $filename the shared file
* @param string $link the public link
* @param int $expiration expiration date (timestamp)
- * @return array $result of failed recipients
+ * @return string[] $result of failed recipients
*/
public function sendLinkShareMail($recipient, $filename, $link, $expiration) {
$subject = (string)$this->l->t('%s shared »%s« with you', [$this->senderDisplayName, $filename]);
@@ -232,8 +232,8 @@ class MailNotifications {
}
/**
- * @param $itemSource
- * @param $itemType
+ * @param string $itemSource
+ * @param string $itemType
* @param IUser $recipient
* @return array
*/
diff --git a/tests/lib/share/MailNotificationsTest.php b/tests/lib/share/MailNotificationsTest.php
index 8684886e798..66bec8653fb 100644
--- a/tests/lib/share/MailNotificationsTest.php
+++ b/tests/lib/share/MailNotificationsTest.php
@@ -20,7 +20,6 @@
*/
use OC\Share\MailNotifications;
-use OCP\IConfig;
use OCP\IL10N;
use OCP\IUser;
use OCP\Mail\IMailer;
@@ -234,6 +233,9 @@ class MailNotificationsTest extends \Test\TestCase {
}
+ /**
+ * @param string $subject
+ */
protected function setupMailerMock($subject, $to, $exceptionOnSend = true) {
$message = $this->getMockBuilder('\OC\Mail\Message')
->disableOriginalConstructor()->getMock();