Showing 4,504 of 4,504 total issues
Method checkAppForUser
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function checkAppForUser($enabled, $appName, $user) {
if ($user !== null) {
$userAppAttributes = $user->getExtendedAttributes();
/**
* Guests will only have access to some whitelisted apps
Method needUpgrade
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function needUpgrade(\OCP\IConfig $config) {
if ($config->getSystemValue('installed', false)) {
$installedVersion = $config->getSystemValue('version', '0.0.0');
$currentVersion = \implode('.', \OCP\Util::getVersion());
$versionDiff = \version_compare($currentVersion, $installedVersion);
Method l
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function l($type, $data = null, $options = []) {
// Use the language of the instance
$locale = $this->getLanguageCode();
if ($locale === 'sr@latin') {
$locale = 'sr_latn';
Method delete
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function delete($id) {
return $this->emittingCall(function () use (&$id) {
if (!\is_string($id)) {
throw new \InvalidArgumentException('Parameter must be string');
}
Method execute
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function execute(InputInterface $input, OutputInterface $output): int {
if (Filesystem::isPrimaryObjectStorageEnabled() === true) {
$output->writeln('<info>We detected that the instance is running on a S3 primary object storage, user directories count might not be accurate</info>');
}
Method execute
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function execute(InputInterface $input, OutputInterface $output): int {
if ($this->encryptionManager->isEnabled() === false) {
throw new \Exception('Server side encryption is not enabled');
}
$yes = $input->getOption('yes');
Method execute
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function execute(InputInterface $input, OutputInterface $output): int {
$user = $this->getUser($input);
$userId = $user->getUID();
$oldHome = $user->getHome();
Method execute
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function execute(InputInterface $input, OutputInterface $output): int {
$path = $input->getOption('path');
$privateKeyPath = $input->getOption('privateKey');
$keyBundlePath = $input->getOption('certificate');
if ($path === null || $privateKeyPath === null || $keyBundlePath === null) {
Method getAvatar
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getAvatar($userId, $size) {
if ($size > 2048) {
$size = 2048;
} elseif ($size <= 0) {
$size = 64;
Function writeParameterInput
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
writeParameterInput: function($td, parameter, placeholder, classes) {
var hasFlag = function(flag) {
return (placeholder.flags & flag) === flag;
};
classes = $.isArray(classes) ? classes : [];
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);