Showing 3,235 of 4,503 total issues
File hu_HU.js
has 317 lines of code (exceeds 250 allowed). Consider refactoring. Open
OC.L10N.register(
"settings",
{
"Wrong current password" : "A jelenlegi jelszót helytelenül adtad meg",
"The new password cannot be the same as the previous one" : "Az új jelszó nem lehet ugyanaz, mint az előző",
File nn_NO.js
has 317 lines of code (exceeds 250 allowed). Consider refactoring. Open
OC.L10N.register(
"core",
{
"Please select a file." : "Ver venleg og vel ei fil.",
"File is too big" : "Fila er for stor",
Method getPanel
has 90 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getPanel() {
$l = $this->lfactory->get('settings');
$activeLangCode = $this->config->getAppValue(
'core',
'shareapi_public_notification_lang',
Method parse
has 90 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function parse($file) {
if (!\is_file($file)) {
throw new AppNotFoundException(
\sprintf('%s does not exist', $file)
);
File multiselect.js
has 316 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* @param 'createCallback' A function to be called when a new entry is created.
* Two arguments are supplied to this function:
* The select element used and the value of the option. If the function
* returns false addition will be cancelled. If it returns
File tags.js
has 316 lines of code (exceeds 250 allowed). Consider refactoring. Open
OC.Tags= {
edit:function(type, cb) {
if(!type && !this.type) {
throw {
name: 'MissingParameter',
Function message
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
message:function(content, title, dialogType, buttons, callback, modal, cssClass) {
return $.when(this._getMessageTemplate()).then(function($tmpl) {
var dialogName = 'oc-dialog-' + OCdialogs.dialogsCounter + '-content';
var dialogId = '#' + dialogName;
var $dlg = $tmpl.octemplate({
- 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 changeUserPassword
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
public static function changeUserPassword($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 formatShare
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
protected function formatShare(IShare $share, $received = false) {
$sharedBy = $this->userManager->get($share->getSharedBy());
$shareFileOwner = $this->userManager->get($share->getShareOwner());
$result = [
- 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 getVersions
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
public static function getVersions($uid, $filename) {
$versions = [];
if ($filename === null || $filename === '') {
return $versions;
}
- 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 rename
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
public function rename($path1, $path2) {
$file = $this->getDriveFile($path1);
if ($file) {
$newFile = $this->getDriveFile($path2);
$toUpdate = new DriveFile();
- 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 rename
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
public function rename($path1, $path2) {
$renameOk = false;
$copyKeysOk = true; // assume keys are copied, in case we deal with versions
$isVersion = $this->isVersion($path2) || $this->isVersion($path1);
- 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 generateHashes
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
private function generateHashes(
\RecursiveIteratorIterator $iterator,
$path
) {
$hashes = [];
- 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 getDefaultPageUrl
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
public static function getDefaultPageUrl() {
$urlGenerator = \OC::$server->getURLGenerator();
// Deny the redirect if the URL contains a @
// This prevents unvalidated redirects like ?redirect_url=:user@domain.com
if (isset($_REQUEST['redirect_url']) && \strpos($_REQUEST['redirect_url'], '@') === false) {
- 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 getSharedWith
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
public function getSharedWith($userId, $shareType, $node = null, $limit = 50, $offset = 0) {
$provider = $this->factory->getProviderForType($shareType);
$shares = $provider->getSharedWith($userId, $shareType, $node, $limit, $offset);
- 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 lock
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
public function lock($storageId, $internalPath, $fileId, array $lockInfo) {
if ($fileId <= 0) {
throw new \InvalidArgumentException('Invalid file id');
}
if (!isset($lockInfo['token'])) {
- 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 _chunkedUpload
has 89 lines of code (exceeds 25 allowed). Consider refactoring. Open
_chunkedUpload: function (options, testOnly) {
options.uploadedBytes = options.uploadedBytes || 0;
var that = this,
file = options.files[0],
fs = file.size,
File uk.js
has 315 lines of code (exceeds 250 allowed). Consider refactoring. Open
OC.L10N.register(
"core",
{
"Please select a file." : "Будь ласка, оберіть файл.",
"File is too big" : "Файл занадто великий",
File da.js
has 315 lines of code (exceeds 250 allowed). Consider refactoring. Open
OC.L10N.register(
"core",
{
"Please select a file." : "Vælg fil",
"File is too big" : "Filen er for stor",
Method registerListeners
has 89 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function registerListeners() {
$this->eventDispatcher->addListener(
'files.resolvePrivateLink',
function (GenericEvent $event) {
$uid = $event->getArgument('uid');