Merge pull request #20649 from owncloud/scrutinizer-patch-1
Scrutinizer Auto-Fixes
This commit is contained in:
commit
a32b861f18
11 changed files with 30 additions and 20 deletions
|
@ -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);
|
||||
|
|
|
@ -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) {
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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 = '';
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue