Showing 3,236 of 4,502 total issues
Avoid too many return
statements within this method. Open
return new TimeFactory();
Avoid too many return
statements within this method. Open
return new DataResponse([
"code" => "INVALID_PARAMETER",
"message" => "the file already exists"
], 403);
Avoid too many return
statements within this method. Open
return $c->query('ServerContainer')->getEncryptionManager()->isEnabled();
Avoid too many return
statements within this method. Open
return new TokenController(
$c->query('AppName'),
$c->query('Request'),
$c->query('UserManager'),
$c->query('ServerContainer')->query('OC\Authentication\Token\IProvider'),
Avoid too many return
statements within this method. Open
return $c->query('ServerContainer')->getSecureRandom();
Avoid too many return
statements within this method. Open
return new DataResponse([
"code" => "INVALID_PARAMETER",
"message" => $e->getMessage()
], 400);
Avoid too many return
statements within this method. Open
return new TwoFactorChallengeController(
$c->query('AppName'),
$c->query('Request'),
$c->query('TwoFactorAuthManager'),
$c->query('UserSession'),
Avoid too many return
statements within this method. Open
return $c->query('ServerContainer')->getCache();
Function _onNotificationEvent
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
_onNotificationEvent: function(e) {
if (e.notification.app === 'files_sharing') {
if (this._inFileList) {
this._inFileList.reload();
}
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function _saveToOwnCloud
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
_saveToOwnCloud: function (remote, token, owner, ownerDisplayName, name, isProtected) {
var that = this;
var toggleLoading = function () {
var isLoading = !that.$saveToOcButton.find('#save-to-oc-button-loading').hasClass('hidden');
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function _shareStateActionHandler
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
_shareStateActionHandler: function(context, newState) {
var targetFileData = context.fileList.elementToFile(context.$file);
var isRemote = targetFileData.shareLocationType === 'remote';
const shareType = targetFileData.shareType;
function responseCallback(response, status) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function processMountStatusIndividual
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
processMountStatusIndividual: function (mountData, mountStatus) {
var mountPoint = mountData.mount_point;
if (mountStatus.status > 0) {
var trElement = FileList.findFileEl(OCA.External.StatusManager.Utils.jqSelEscape(mountPoint));
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function computerFileSize
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
computerFileSize: function (string) {
if (typeof string !== 'string') {
return null;
}
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function _updateProgressBar
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
_updateProgressBar: function() {
var progress = parseInt(this.$uploadprogressbar.attr('data-loaded'), 10);
var total = parseInt(this.$uploadprogressbar.attr('data-total'), 10);
if (progress !== this._lastProgress) {
this._lastProgress = progress;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function hide
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
hide: function ($row, callback) {
var self = this;
var $notification = $('#notification');
if (_.isFunction($row)) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function register
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
register: function(appName, bundle, pluralForm) {
var self = this;
if (_.isUndefined(this._bundles[appName])) {
this._bundles[appName] = bundle || {};
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function resetDone
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
resetDone : function(result){
var resetErrorMsg;
if (result && result.status === 'success'){
$.post(
OC.webroot + '/',
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function _formatRemoteShare
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
_formatRemoteShare: function(remoteAddress) {
var parts = this._REMOTE_OWNER_REGEXP.exec(remoteAddress);
if (!parts) {
// display as is, most likely to be a simple owner name
return escapeHTML(remoteAddress);
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function destroy
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function destroy($id) {
$userId = $this->userSession->getUser()->getUID();
$user = $this->userManager->get($id);
if ($userId === $id) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function changeMail
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function changeMail($token, $userId) {
$user = $this->userManager->get($userId);
$sessionUser = $this->userSession->getUser();
if ($user->getUID() !== $sessionUser->getUID()) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"