diff --git a/apps/dav/lib/caldav/caldavbackend.php b/apps/dav/lib/caldav/caldavbackend.php index 08a2a70c56d16c4d425124fc29eca8a5e18b5bb0..99338650793cc9cdaef03a9d6c4d825312be819d 100644 --- a/apps/dav/lib/caldav/caldavbackend.php +++ b/apps/dav/lib/caldav/caldavbackend.php @@ -217,7 +217,6 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription * * Read the PropPatch documentation for more info and examples. * - * @param string $path * @param \Sabre\DAV\PropPatch $propPatch * @return void */ @@ -375,7 +374,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription * If the backend supports this, it may allow for some speed-ups. * * @param mixed $calendarId - * @param array $uris + * @param string[] $uris * @return array */ function getMultipleCalendarObjects($calendarId, array $uris) { @@ -422,7 +421,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription * @param mixed $calendarId * @param string $objectUri * @param string $calendarData - * @return string|null + * @return string */ function createCalendarObject($calendarId, $objectUri, $calendarData) { $extraData = $this->getDenormalizedData($calendarData); @@ -464,7 +463,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription * @param mixed $calendarId * @param string $objectUri * @param string $calendarData - * @return string|null + * @return string */ function updateCalendarObject($calendarId, $objectUri, $calendarData) { $extraData = $this->getDenormalizedData($calendarData); diff --git a/apps/dav/lib/carddav/carddavbackend.php b/apps/dav/lib/carddav/carddavbackend.php index 348c166a5311e258910f11f0b9ad66fabe25987c..daa31725fa1db37c767dfb68bbece4a4b3bf73a0 100644 --- a/apps/dav/lib/carddav/carddavbackend.php +++ b/apps/dav/lib/carddav/carddavbackend.php @@ -343,7 +343,7 @@ class CardDavBackend implements BackendInterface, SyncSupport { * If the backend supports this, it may allow for some speed-ups. * * @param mixed $addressBookId - * @param array $uris + * @param string[] $uris * @return array */ function getMultipleCards($addressBookId, array $uris) { @@ -390,7 +390,7 @@ class CardDavBackend implements BackendInterface, SyncSupport { * @param mixed $addressBookId * @param string $cardUri * @param string $cardData - * @return string|null + * @return string */ function createCard($addressBookId, $cardUri, $cardData) { $etag = md5($cardData); @@ -435,7 +435,7 @@ class CardDavBackend implements BackendInterface, SyncSupport { * @param mixed $addressBookId * @param string $cardUri * @param string $cardData - * @return string|null + * @return string */ function updateCard($addressBookId, $cardUri, $cardData) { diff --git a/apps/dav/lib/connector/sabre/auth.php b/apps/dav/lib/connector/sabre/auth.php index 0394bfd67728fd14bab02d0808970988603cf917..f9a397990463f4f25b43762d4f9b4c004a0d19dc 100644 --- a/apps/dav/lib/connector/sabre/auth.php +++ b/apps/dav/lib/connector/sabre/auth.php @@ -150,7 +150,7 @@ class Auth extends AbstractBasic { /** * @param \Sabre\DAV\Server $server - * @param $realm + * @param string $realm * @return bool */ private function auth(\Sabre\DAV\Server $server, $realm) { diff --git a/apps/dav/lib/connector/sabre/fakelockerplugin.php b/apps/dav/lib/connector/sabre/fakelockerplugin.php index 493d3b0ade4179f283881f912f979a9d87b4b3e0..b9d1a30a041c6cb4f2baf2f8f9746fc1adaa6d71 100644 --- a/apps/dav/lib/connector/sabre/fakelockerplugin.php +++ b/apps/dav/lib/connector/sabre/fakelockerplugin.php @@ -59,7 +59,7 @@ class FakeLockerPlugin extends ServerPlugin { * Indicate that we support LOCK and UNLOCK * * @param string $path - * @return array + * @return string[] */ public function getHTTPMethods($path) { return [ @@ -71,7 +71,7 @@ class FakeLockerPlugin extends ServerPlugin { /** * Indicate that we support locking * - * @return array + * @return integer[] */ function getFeatures() { return [2]; diff --git a/apps/dav/lib/connector/sabre/file.php b/apps/dav/lib/connector/sabre/file.php index a0c35fb2bafcc71abd68ebca159842bc1e69ec64..ef7b9891dc924847ffa58ecf036be83242e76ae6 100644 --- a/apps/dav/lib/connector/sabre/file.php +++ b/apps/dav/lib/connector/sabre/file.php @@ -213,6 +213,9 @@ class File extends Node implements IFile { return '"' . $this->info->getEtag() . '"'; } + /** + * @param string $path + */ private function emitPreHooks($exists, $path = null) { if (is_null($path)) { $path = $this->path; @@ -238,6 +241,9 @@ class File extends Node implements IFile { return $run; } + /** + * @param string $path + */ private function emitPostHooks($exists, $path = null) { if (is_null($path)) { $path = $this->path; @@ -260,7 +266,7 @@ class File extends Node implements IFile { /** * Returns the data * - * @return string|resource + * @return resource * @throws Forbidden * @throws ServiceUnavailable */ @@ -314,7 +320,7 @@ class File extends Node implements IFile { * * If null is returned, we'll assume application/octet-stream * - * @return mixed + * @return string */ public function getContentType() { $mimeType = $this->info->getMimetype(); diff --git a/apps/dav/lib/connector/sabre/lockplugin.php b/apps/dav/lib/connector/sabre/lockplugin.php index 8032d2b3fbf3800b2839962cb88b3f053d81d012..d770b141eb9b8190300753066512e2b1da8d6d0a 100644 --- a/apps/dav/lib/connector/sabre/lockplugin.php +++ b/apps/dav/lib/connector/sabre/lockplugin.php @@ -27,7 +27,6 @@ use OCP\Lock\ILockingProvider; use OCP\Lock\LockedException; use Sabre\DAV\Exception\NotFound; use Sabre\DAV\ServerPlugin; -use Sabre\DAV\Tree; use Sabre\HTTP\RequestInterface; class LockPlugin extends ServerPlugin { diff --git a/apps/dav/lib/connector/sabre/node.php b/apps/dav/lib/connector/sabre/node.php index daf82ba6f0deaca1760835b42904a59d064de2ae..c4e0614077ffbe7bb78022a4d44420d792980cd3 100644 --- a/apps/dav/lib/connector/sabre/node.php +++ b/apps/dav/lib/connector/sabre/node.php @@ -178,7 +178,7 @@ abstract class Node implements \Sabre\DAV\INode { /** * Returns the size of the node, in bytes * - * @return int|float + * @return integer */ public function getSize() { return $this->info->getSize(); @@ -207,14 +207,14 @@ abstract class Node implements \Sabre\DAV\INode { } /** - * @return string + * @return integer */ public function getInternalFileId() { return $this->info->getId(); } /** - * @return string|null + * @return string */ public function getDavPermissions() { $p = ''; diff --git a/apps/dav/lib/connector/sabre/principal.php b/apps/dav/lib/connector/sabre/principal.php index 35215e1f63c75bf940df23d9a3f21e943a8da18e..7fb14c031f99ef1c3db1ca407b86429268014de3 100644 --- a/apps/dav/lib/connector/sabre/principal.php +++ b/apps/dav/lib/connector/sabre/principal.php @@ -168,7 +168,7 @@ class Principal implements \Sabre\DAVACL\PrincipalBackend\BackendInterface { * The principals should be passed as a list of uri's. * * @param string $principal - * @param array $members + * @param string[] $members * @throws \Sabre\DAV\Exception */ public function setGroupMemberSet($principal, array $members) { diff --git a/apps/dav/tests/unit/connector/sabre/file.php b/apps/dav/tests/unit/connector/sabre/file.php index 399634f8bee3e1157ba373745283b5da98a283e6..0a52299cec7ebd51f199bab378db2f06e33776bf 100644 --- a/apps/dav/tests/unit/connector/sabre/file.php +++ b/apps/dav/tests/unit/connector/sabre/file.php @@ -41,6 +41,9 @@ class File extends \Test\TestCase { parent::tearDown(); } + /** + * @param string $string + */ private function getStream($string) { $stream = fopen('php://temp', 'r+'); fwrite($stream, $string); @@ -239,7 +242,7 @@ class File extends \Test\TestCase { * @param string $path path to put the file into * @param string $viewRoot root to use for the view * - * @return result of the PUT operaiton which is usually the etag + * @return null|string of the PUT operaiton which is usually the etag */ private function doPut($path, $viewRoot = null) { $view = \OC\Files\Filesystem::getView(); diff --git a/apps/dav/tests/unit/connector/sabre/filesplugin.php b/apps/dav/tests/unit/connector/sabre/filesplugin.php index 2e3338fefa182c914919c38d53850eae4330f55a..b33c8340f726a41efc64c120f2cd2ba253f85403 100644 --- a/apps/dav/tests/unit/connector/sabre/filesplugin.php +++ b/apps/dav/tests/unit/connector/sabre/filesplugin.php @@ -55,6 +55,9 @@ class FilesPlugin extends \Test\TestCase { $this->plugin->initialize($this->server); } + /** + * @param string $class + */ private function createTestNode($class) { $node = $this->getMockBuilder($class) ->disableOriginalConstructor() diff --git a/apps/dav/tests/unit/connector/sabre/requesttest/auth.php b/apps/dav/tests/unit/connector/sabre/requesttest/auth.php index 41b554d11dbc5ab367a6720f9f2b204eb901a956..02b64ab070b9cfd784d24948ede9636b846f2849 100644 --- a/apps/dav/tests/unit/connector/sabre/requesttest/auth.php +++ b/apps/dav/tests/unit/connector/sabre/requesttest/auth.php @@ -41,7 +41,7 @@ class Auth implements BackendInterface { * * @param \Sabre\DAV\Server $server * @param string $realm - * @return bool + * @return boolean|null */ function authenticate(\Sabre\DAV\Server $server, $realm) { $userSession = \OC::$server->getUserSession(); @@ -61,7 +61,7 @@ class Auth implements BackendInterface { * * If nobody is currently logged in, this method should return null. * - * @return string|null + * @return string */ function getCurrentUser() { return $this->user;