Showing 4,504 of 4,504 total issues
Method validateUserPass
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function validateUserPass($username, $password) {
try {
$share = $this->shareManager->getShareByToken($username);
} catch (ShareNotFound $e) {
\OC::$server->getLogger()->error("PublicAuth: share for found $username");
Method logException
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function logException(\Throwable $ex) {
if ($ex->getPrevious() instanceof FileContentNotAllowedException) {
//Don't log because its already been logged may be by different
//app or so.
return null;
Method handlePut
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function handlePut(RequestInterface $request, ResponseInterface $response) {
if ($request->getHeader('OC-Autorename') !== '1') {
return;
}
Method createDirectory
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function createDirectory($name) {
# the check here is necessary, because createDirectory does not use the methods in files/view.php
if (Filesystem::isForbiddenFileOrDir($name)) {
throw new SabreForbidden();
}
Method create
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function create(
$mountPoint,
$backend,
$authMechanism,
$backendOptions,
Method execute
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function execute(InputInterface $input, OutputInterface $output): int {
$users = $input->getArgument('user_id');
if (!empty($users)) {
foreach ($users as $user) {
if ($this->userManager->userExists($user)) {
Method configure
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function configure() {
$this
->setName('files:transfer-ownership')
->setDescription('All files and folders are moved to another user - shares are moved as well.')
->addArgument(
Method execute
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function execute(InputInterface $input, OutputInterface $output): int {
$uid = $input->getArgument('uid');
$userFolder = $this->rootFolder->getUserFolder($uid); // might throw a NoUserException
try {
Method findOneQuery
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function findOneQuery($sql, array $params=[], $limit=null, $offset=null) {
if ($sql instanceof IQueryBuilder) {
$stmt = $sql->execute();
} else {
$stmt = $this->execute($sql, $params, $limit, $offset);
Method fopen
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function fopen($mode) {
$preHooks = [];
$postHooks = [];
$requiredPermissions = \OCP\Constants::PERMISSION_READ;
switch ($mode) {
Method insert
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function insert($file, array $data) {
// normalize file
$file = $this->normalize($file);
if (isset($this->partial[$file])) { //add any saved partial data
Method normalizePath
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function normalizePath($path, $stripTrailingSlash = true, $isAbsolutePath = false, $keepUnicode = false) {
if (self::$normalizedPathCache === null) {
self::$normalizedPathCache = new CappedMemoryCache();
}
Method verifyAppSignature
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function verifyAppSignature($appId, $path = '', $force = false) {
try {
if ($path === '') {
$path = $this->appLocator->getAppPath($appId);
}
Method __construct
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function __construct($storage, $isAvailable = true) {
if ($storage instanceof \OC\Files\Storage\Storage) {
$this->storageId = $storage->getId();
} else {
$this->storageId = $storage;
Method tagAs
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function tagAs($objid, $tag) {
if (\is_string($tag) && !\is_numeric($tag)) {
$tag = \trim($tag);
if ($tag === '') {
\OCP\Util::writeLog('core', __METHOD__.', Cannot add an empty tag', \OCP\Util::DEBUG);
Method oldDatabaseTables
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function oldDatabaseTables() {
return [
'calendar_calendars',
'calendar_objects',
'calendar_share_calendar',
Method changeSchema
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function changeSchema(Schema $schema, array $options) {
$prefix = $options['tablePrefix'];
if ($schema->hasTable("{$prefix}jobs")) {
$jobsTable = $schema->getTable("{$prefix}jobs");
Method processOCS
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function processOCS(array $routes) {
$ocsRoutes = isset($routes['ocs']) ? $routes['ocs'] : [];
foreach ($ocsRoutes as $ocsRoute) {
$name = $ocsRoute['name'];
$postFix = '';
Method executeController
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function executeController($controller, $methodName) {
$arguments = [];
// valid types that will be casted
$types = ['int', 'integer', 'bool', 'boolean', 'float'];
Method updateApp
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function updateApp($appId) {
\OC::$server->getAppManager()->clearAppsCache();
$appPath = self::getAppPath($appId);
if ($appPath === false) {
return false;