Merge pull request #20988 from owncloud/scrutinizer-patch-1
Scrutinizer Auto-Fixes
This commit is contained in:
commit
857030d139
10 changed files with 17 additions and 9 deletions
|
@ -33,7 +33,6 @@ use Icewind\SMB\Exception\Exception;
|
|||
use Icewind\SMB\Exception\NotFoundException;
|
||||
use Icewind\SMB\NativeServer;
|
||||
use Icewind\SMB\Server;
|
||||
use Icewind\Streams\CallbackWrapper;
|
||||
use Icewind\Streams\IteratorDirectory;
|
||||
use OC\Files\Filesystem;
|
||||
|
||||
|
|
|
@ -130,6 +130,9 @@ class AmazonS3Migration extends \Test\TestCase {
|
|||
return $storages;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $id
|
||||
*/
|
||||
public function deleteStorage($id) {
|
||||
$stmt = \OC::$server->getDatabaseConnection()->prepare(
|
||||
'DELETE FROM `*PREFIX*storages` WHERE `id` = ?'
|
||||
|
|
|
@ -48,6 +48,9 @@ abstract class StoragesControllerTest extends \Test\TestCase {
|
|||
\OC_Mount_Config::$skipTest = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \OCA\Files_External\Lib\Backend\Backend
|
||||
*/
|
||||
protected function getBackendMock($class = '\OCA\Files_External\Lib\Backend\SMB', $storageClass = '\OC\Files\Storage\SMB') {
|
||||
$backend = $this->getMockBuilder('\OCA\Files_External\Lib\Backend\Backend')
|
||||
->disableOriginalConstructor()
|
||||
|
@ -59,6 +62,9 @@ abstract class StoragesControllerTest extends \Test\TestCase {
|
|||
return $backend;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \OCA\Files_External\Lib\Auth\AuthMechanism
|
||||
*/
|
||||
protected function getAuthMechMock($scheme = 'null', $class = '\OCA\Files_External\Lib\Auth\NullMechanism') {
|
||||
$authMech = $this->getMockBuilder('\OCA\Files_External\Lib\Auth\AuthMechanism')
|
||||
->disableOriginalConstructor()
|
||||
|
|
|
@ -35,6 +35,11 @@ class BackendServiceTest extends \Test\TestCase {
|
|||
$this->l10n = $this->getMock('\OCP\IL10N');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $class
|
||||
*
|
||||
* @return \OCA\Files_External\Lib\Backend\Backend
|
||||
*/
|
||||
protected function getBackendMock($class) {
|
||||
$backend = $this->getMockBuilder('\OCA\Files_External\Lib\Backend\Backend')
|
||||
->disableOriginalConstructor()
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
|
||||
namespace OCA\Files_Sharing\AppInfo;
|
||||
|
||||
use OCA\Files_Sharing\Helper;
|
||||
use OCA\Files_Sharing\MountProvider;
|
||||
use OCP\AppFramework\App;
|
||||
use OC\AppFramework\Utility\SimpleContainer;
|
||||
|
|
|
@ -98,7 +98,7 @@ class Shared_Cache extends Cache {
|
|||
/**
|
||||
* get the stored metadata of a file or folder
|
||||
*
|
||||
* @param string|int $file
|
||||
* @param string $file
|
||||
* @return array|false
|
||||
*/
|
||||
public function get($file) {
|
||||
|
|
|
@ -45,7 +45,6 @@ class ExternalSharesController extends Controller {
|
|||
/**
|
||||
* @param string $appName
|
||||
* @param IRequest $request
|
||||
* @param bool $incomingShareEnabled
|
||||
* @param \OCA\Files_Sharing\External\Manager $externalManager
|
||||
* @param IClientService $clientService
|
||||
*/
|
||||
|
@ -84,7 +83,7 @@ class ExternalSharesController extends Controller {
|
|||
* @NoAdminRequired
|
||||
* @NoOutgoingFederatedSharingRequired
|
||||
*
|
||||
* @param $id
|
||||
* @param integer $id
|
||||
* @return JSONResponse
|
||||
*/
|
||||
public function destroy($id) {
|
||||
|
|
|
@ -124,7 +124,7 @@ class ShareController extends Controller {
|
|||
* @UseSession
|
||||
*
|
||||
* Authenticates against password-protected shares
|
||||
* @param $token
|
||||
* @param string $token
|
||||
* @param string $password
|
||||
* @return RedirectResponse|TemplateResponse
|
||||
*/
|
||||
|
|
|
@ -27,7 +27,6 @@ namespace OCA\Files_Sharing\Middleware;
|
|||
use OCP\App\IAppManager;
|
||||
use OCP\AppFramework\Http\NotFoundResponse;
|
||||
use OCP\AppFramework\Middleware;
|
||||
use OCP\AppFramework\Http\TemplateResponse;
|
||||
use OCP\Files\NotFoundException;
|
||||
use OCP\IConfig;
|
||||
use OCP\AppFramework\Utility\IControllerMethodReflector;
|
||||
|
|
|
@ -32,8 +32,6 @@ namespace OC\Files\Storage;
|
|||
|
||||
use OC\Files\Filesystem;
|
||||
use OCA\Files_Sharing\ISharedStorage;
|
||||
use OCA\Files_Sharing\Propagator;
|
||||
use OCA\Files_Sharing\SharedMount;
|
||||
use OCP\Lock\ILockingProvider;
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue