Showing 4,504 of 4,504 total issues
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 _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 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 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 _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 setEnabled
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function setEnabled($id, $enabled) {
$userId = $this->userSession->getUser()->getUID();
$user = $this->userManager->get($id);
'@phan-var \OC\Group\Manager $this->groupManager';
- 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"
Further reading
Function changePersonalPassword
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static function changePersonalPassword($args) {
// Check if we are an user
\OC_JSON::callCheck();
\OC_JSON::checkLoggedIn();
- 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 getParents
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function getParents($itemSource, $shareWith = null, $owner = null) {
$result = [];
$parent = $this->getParentId($itemSource);
while ($parent) {
$shares = \OCP\Share::getItemSharedWithUser('folder', $parent, $shareWith, $owner);
- 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 updateInitiatorInfo
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function updateInitiatorInfo() {
while (true) {
$shares = $this->getMissingInitiator(1000);
if (empty($shares)) {
- 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 testUrl
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function testUrl(IClientService $clientService, string $remote, bool $checkVersion = false, bool $throwConnectException = false): bool {
try {
$client = $clientService->newClient();
$response = \json_decode($client->get(
$remote,
- 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 notifyRecipients
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function notifyRecipients($itemSource, $itemType, $shareType, $recipient) {
$recipientList = [];
$sender = $this->userSession->getUser();
if ($shareType === Share::SHARE_TYPE_USER) {
$recipientList[] = $this->userManager->get($recipient);
- 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 getFreeSpace
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function getFreeSpace(IUser $user) {
$free = 0;
$quota = \OC_Util::getUserQuota($user);
if ($quota === FileInfo::SPACE_UNLIMITED) {
$free = Filesystem::free_space('/');
- 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 addGroup
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function addGroup($parameters) {
// Validate name
$groupId = $this->request->getParam('groupid', '');
if (($groupId === '') || $groupId === null || ($groupId === false)) {
\OCP\Util::writeLog('provisioning_api', 'Group name not supplied', \OCP\Util::ERROR);
- 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 getSubscriptionsForUser
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function getSubscriptionsForUser($principalUri) {
$fields = \array_values($this->subscriptionPropertyMap);
$fields[] = 'id';
$fields[] = 'uri';
$fields[] = 'source';
- 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 getChildren
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function getChildren() {
// Within a PROPFIND request we return no listing in case the share is a file drop folder
if ($this->isFileDropFolder()
&& ($this->isPropfind() || $this->isGet())
) {
- 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 getACL
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function getACL() {
$acl = [
[
'privilege' => '{DAV:}read',
'principal' => $this->getOwner(),
- 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 checkPropFind
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function checkPropFind($request) {
$path = $request->getPath();
$node = $this->server->tree->getNodeForPath($path);
if ($node instanceof Node) {
- 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 getGroupMembership
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function getGroupMembership($principal, $needGroups = false) {
list($prefix, $name) = \Sabre\Uri\split($principal);
if ($prefix === $this->principalPrefix) {
$user = $this->userManager->get($name);
- 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"