]> source.dussan.org Git - nextcloud-server.git/commitdiff
Scrutinizer Auto-Fixes
authorScrutinizer Auto-Fixer <auto-fixer@scrutinizer-ci.com>
Tue, 8 Dec 2015 15:01:20 +0000 (15:01 +0000)
committerThomas Müller <thomas.mueller@tmit.eu>
Thu, 10 Dec 2015 15:43:37 +0000 (16:43 +0100)
This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com

14 files changed:
apps/dav/lib/systemtag/systemtagsbyidcollection.php
apps/dav/lib/systemtag/systemtagsobjecttypecollection.php
apps/dav/tests/unit/systemtag/systemtagmappingnode.php
apps/dav/tests/unit/systemtag/systemtagsbyidcollection.php
apps/dav/tests/unit/systemtag/systemtagsobjectmappingcollection.php
apps/files/tests/backgroundjob/ScanFilesTest.php
apps/files_external/lib/personalmount.php
apps/files_external/service/storagesservice.php
apps/files_external/service/userglobalstoragesservice.php
apps/files_external/tests/service/globalstoragesservicetest.php
build/integration/features/bootstrap/CapabilitiesContext.php
lib/private/appframework/middleware/security/securitymiddleware.php
lib/private/share/mailnotifications.php
tests/lib/share/MailNotificationsTest.php

index e7b7b6d0acc387a7bc3a5c8f272b7ab288c5782b..79b0aa8fbbd648e03d71cbbcd7649932344bc77f 100644 (file)
@@ -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]);
index e544073613f3b099d75890a313f941ba1b9ca6d5..543a684c5bbe85f648a4c7a0384eb9ed6a5299c4 100644 (file)
@@ -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');
        }
index 849f7c2fa54f68bf77d3ca172f5b6c3e4c0a261b..aef62a1acb2e79ab2e66bc9fee8429d2f0d35359 100644 (file)
@@ -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 {
 
index 104ce366034046f642c2bf01e701953a284d8106..fa9e42d04f964e4fa71acdc220d9b66f7f050cbc 100644 (file)
@@ -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 {
 
index 6e15bb78e7c02bd513639ac3a74311afc74dfbcc..a9b34f5ae1992f3e1203de61ec8e8b56c82ace58 100644 (file)
@@ -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 {
 
index 907cad64f9e7a9126074f3fb80c3b09f4c13c2a8..087696f0cfc9bbf4d87ea028ee5f4eee078acf9f 100644 (file)
@@ -24,7 +24,6 @@ use Test\TestCase;
 use OCP\IConfig;
 use OCP\IUserManager;
 use OCA\Files\BackgroundJob\ScanFiles;
-use OCP\ILogger;
 
 /**
  * Class ScanFilesTest
index f81dee5be1e7180822b687262af60001b5f860b9..34ae516ea5e65380a11a51d173853484d0349846 100644 (file)
@@ -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
index 9be6498435c39be78501b79eeaf49017272caba8..97f79c133243817edc849ce517dd73c6beabb27e 100644 (file)
@@ -185,6 +185,9 @@ abstract class StoragesService {
         */
        abstract public function getVisibilityType();
 
+       /**
+        * @return integer
+        */
        protected function getType() {
                return DBConfigService::MOUNT_TYPE_ADMIN;
        }
index cb49f0f6726f992ce8d8cd0ed4e2e1c68fe5cd82..e58815f8a79dfb84f621dd9c4fc4f5cbbce1b45b 100644 (file)
@@ -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');
        }
index 7c77616563cd17de76a61c8c15e5c543702442c2..e620b05a51ed620850ec2876fb921cb0c41a48e2 100644 (file)
@@ -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;
index 4e200bdf421826d5fe444130b4240781772d51f2..1b0015dce733f7b8a2e8a8867384a1ffa435494b 100644 (file)
@@ -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';
 
index d0b7202a3602a3449c5448ef169e2a8952d68638..725ce689b48e63802979c34e569a2cccbe0404d5 100644 (file)
@@ -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;
index 4d282158ba4168c4f125998c43f34da3a7446f38..f071c7f3a3c4fe365f77a00dc408d9069da68b3c 100644 (file)
@@ -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
         */
index 8684886e798cb21cd19c12555ceaa9ef2a473e5a..66bec8653fb603badf5d560dfe09505da9318983 100644 (file)
@@ -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();