Showing 3,235 of 4,504 total issues
Function davSync
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function davSync(method, model, options) {
var params = {type: getTypeForMethod(method, model)};
var isCollection = (model instanceof Backbone.Collection);
// Ensure that we have a URL.
Method setDisplayName
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function setDisplayName($username, $displayName) {
$resp = $this->validateString($displayName, 64);
if ($resp) {
return $resp;
}
Method getFailedIntegrityCheckFiles
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getFailedIntegrityCheckFiles(): DataDisplayResponse {
if (!$this->checker->isCodeCheckEnforced()) {
return new DataDisplayResponse('Integrity checker has been disabled. Integrity cannot be verified.');
}
Method resendToken
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function resendToken($userId) {
$user = $this->userManager->get($userId);
if ($user === null) {
$this->log->error('User: ' . $userId . ' does not exist', ['app' => 'settings']);
Method httpPost
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function httpPost(RequestInterface $request, ResponseInterface $response) {
$path = $request->getPath();
// Only handling xml
$contentType = $request->getHeader('Content-Type');
Method getACL
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getACL() {
$acl = [
[
'privilege' => '{DAV:}read',
'principal' => $this->getOwner(),
Method createTag
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function createTag($tagName, $userVisible, $userAssignable, $userEditable = null) {
$userVisible = (int)$userVisible;
$userAssignable = (int)$userAssignable;
/**
Method initMountPoints
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function initMountPoints($user = '', $fullInit = true) {
if ($user == '') {
$user = \OC_User::getUser();
}
if ($user === null || $user === false || $user === '') {
Method queryPreviewsToDelete
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function queryPreviewsToDelete(int $startFileId = 0, int $chunkSize = 1000): array {
$dbPlatform = $this->connection->getDatabasePlatform();
$isOracle = ($dbPlatform instanceof OraclePlatform);
$isOldMysql = ($dbPlatform instanceof MySqlPlatform && !($dbPlatform instanceof MySQL80Platform || $dbPlatform instanceof MariaDb1027Platform));
Method getSystemInfo
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getSystemInfo($allowAllDatabases = false) {
$databases = $this->getSupportedDatabases($allowAllDatabases);
$dataDir = $this->config->getSystemValue('datadirectory', \OC::$SERVERROOT.'/data');
Function launchFullConnectivityCheckOneByOne
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
launchFullConnectivityCheckOneByOne: function () {
var self = this;
this.getMountPointList(function (list) {
// check if we have a list first
if (list === undefined && !self.emptyWarningShown) {
Function _onChangeServerClicked
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_onChangeServerClicked: function (event) {
event.preventDefault();
this.$saveToOcServerMenu.css('display', 'none');
OC.dialogs.prompt('', t('files_sharing', 'Add to another cloud'),
Function _renderInlineAction
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_renderInlineAction: function(actionSpec, isDefault, context) {
var renderFunc = actionSpec.render || _.bind(this._defaultRenderAction, this);
var $actionEl = renderFunc(actionSpec, isDefault, context);
if (!$actionEl || !$actionEl.length) {
return;
Function createDirectory
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
createDirectory: function(name) {
var self = this;
var deferred = $.Deferred();
var promise = deferred.promise();
Function toHsl
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
String.prototype.toHsl = function() {
var hash = this.toLowerCase().replace(/[^0-9a-f]+/g, '');
// Already a md5 hash?
Method search
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function search($search = '', $itemType = null, $page = 1, $perPage = 200) {
if ($perPage <= 0) {
return [ 'statuscode' => Http::STATUS_BAD_REQUEST,
'message' => 'Invalid perPage argument'];
}
Method format
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function format(INotification $notification, L10N $l) {
$params = $notification->getSubjectParameters();
if ($params[0] !== $params[1] && $params[1] !== null) {
$params[0] = $this->getUserString($params[0]);
$params[1] = $this->getUserString($params[1]);
Method updateProperties
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function updateProperties($path, INode $node, $changedProperties) {
$existingProperties = $this->getProperties($path, $node, []);
// TODO: use "insert or update" strategy ?
$this->connection->beginTransaction();
Method handleGetProperties
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function handleGetProperties(
PropFind $propFind,
\Sabre\DAV\INode $node
) {
if (!($node instanceof File) && !($node instanceof Directory)) {
Method getAllInvalidShareStorages
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function getAllInvalidShareStorages($storageType, $scopeUid) {
$query = $this->connection->getQueryBuilder();
if ($this->connection->getDatabasePlatform() instanceof MySqlPlatform) {
$concatFunction = $query->createFunction("CONCAT('$storageType', s.uid_owner)");