Showing 3,235 of 4,504 total issues
Function verifyCode
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
OCA.External.Settings.OAuth2.verifyCode = function (backendUrl, data) {
var $tr = data['tr'];
var configured = $tr.find('[data-parameter="configured"]');
var token = $tr.find('.configuration [data-parameter="token"]');
var statusSpan = $tr.find('.status span');
Function success
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
success: function (data) {
if (typeof data === 'string') {
data = JSON.parse(data);
} else if (data && data.length) {
// fetch response from iframe
Function initSelection
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
initSelection: function(element, callback) {
var storageConfig = element.closest('tr').data('storageConfig');
$.when(
$.ajax(OC.generateUrl('apps/files_external/applicable/users'), {
type: 'POST',
Function remove
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
remove: function(name, options){
options = options || {};
var fileEl = this.findFileEl(name);
var fileId = fileEl.data('id');
var index = fileEl.index();
Function _setCurrentDir
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_setCurrentDir: function(targetDir, changeUrl, fileId) {
targetDir = targetDir.replace(/\\/g, '/');
if (!this._isValidPath(targetDir)) {
OC.Notification.show(t('files', 'Invalid path'), {type: 'error'});
targetDir = '/';
Function updateShare
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
updateShare: function(shareId, properties, options) {
var self = this;
// Extend attributes for update share if provided for update.
// note: required only for compatibility with attributes v1
Function getDirShareInfo
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
getDirShareInfo: function(dir) {
// Dir can't be empty
if (typeof dir !== 'string' || dir.length === 0) {
return Promise.reject('getDirShareInfo(). param must be typeof string and can not be empty!');
}
Function getFolderContents
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
getFolderContents: function(path, options) {
if (!path) {
path = '';
}
options = options || {};
Function loadIcons
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
loadIcons:function(itemType, fileList, callback) {
var path = fileList.dirInfo.path;
if (path === '/') {
path = '';
}
Function _sendEmailPrivateLink
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_sendEmailPrivateLink: function(mail) {
var deferred = $.Deferred();
var $formSentIndicator = this.$el.find('.emailPrivateLinkForm--sent-indicator');
if(mail.toSelf === true) {
this._addAddress(OC.getCurrentUser().email);
Method getSharesFromItem
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function getSharesFromItem($target) {
$result = [];
$owner = Filesystem::getOwner($target);
Filesystem::initMountPoints($owner);
$info = Filesystem::getFileInfo($target);
Method expireTrash
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function expireTrash(string $uid) {
$trashBinSize = Trashbin::getTrashbinSize($uid);
$availableSpace = $this->quota->calculateFreeSpace($trashBinSize, $uid);
// delete all files older then $retention_obligation
Method registerHooks
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function registerHooks() {
$container = $this->getContainer();
$hooksManager = new Hooks($container->query('TrustedServers'));
Util::connectHook(
Method convertToOcmFileNotification
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function convertToOcmFileNotification($remoteId, $token, $action, $data = []) {
$notification = new FileNotification();
$map = [
'accept' => FileNotification::NOTIFICATION_TYPE_SHARE_ACCEPTED,
'decline' => FileNotification::NOTIFICATION_TYPE_SHARE_DECLINED,
Method getSubscriptionsForUser
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getSubscriptionsForUser($principalUri) {
$fields = \array_values($this->subscriptionPropertyMap);
$fields[] = 'id';
$fields[] = 'uri';
$fields[] = 'source';
Method createAddressbookChangesTable
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function createAddressbookChangesTable(Schema $schema) {
if (!$schema->hasTable("{$this->prefix}addressbookchanges")) {
$table = $schema->createTable("{$this->prefix}addressbookchanges");
$table->addColumn('id', 'integer', [
'autoincrement' => true,
Method createCalendarChangesTable
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function createCalendarChangesTable(Schema $schema) {
if (!$schema->hasTable("{$this->prefix}calendarchanges")) {
$table = $schema->createTable("{$this->prefix}calendarchanges");
$table->addColumn('id', 'integer', [
'autoincrement' => true,
Method stream_read
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function stream_read($count) {
$node = null;
$lastNode = null;
do {
if ($this->currentStream === null) {
Method update
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function update(
$id,
$backendOptions,
$testOnly = true
) {
Method updateProperties
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function updateProperties($addressBookId, $cardUri, $vCardSerialized) {
$cardId = $this->getCardId($addressBookId, $cardUri);
$vCard = $this->readCard($vCardSerialized);
$this->purgeProperties($addressBookId, $cardId);