Showing 4,504 of 4,504 total issues
Function editUser
has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring. Open
public function editUser($parameters) {
/** @var string $targetUserId */
$targetUserId = $parameters['userid'];
// Check if user is logged in
- 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 init
has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring. Open
public static function init() {
// calculate the root directories
OC::$SERVERROOT = \str_replace("\\", '/', \substr(__DIR__, 0, -4));
// register autoloader
- 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 process
has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring. Open
public function process(bool $all = false, int $chunkSize = 1000, \Closure $progress = null): int {
$root = \OC::$server->getLazyRootFolder();
$count = 0;
$qb = $this->connection->getQueryBuilder();
- 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 getShippedApps
has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring. Open
protected static function getShippedApps() {
$shippedApps = [];
foreach (\OC::$APPSROOTS as $app_dir) {
if ($dir = \opendir($app_dir['path'])) {
$nodes = \scandir($app_dir['path']);
- 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 loadApps
has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring. Open
public static function loadApps($types = null) {
if (\is_array($types) && !\array_diff($types, self::$loadedTypes)) {
return true;
}
if (\OC::$server->getSystemConfig()->getValue('maintenance', 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 execute
has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring. Open
protected function execute(InputInterface $input, OutputInterface $output): int {
$username = $input->getArgument('user');
$emailLink = $input->getOption('send-email');
$displayLink = $input->getOption('output-link');
- 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
File de_CH.js
has 385 lines of code (exceeds 250 allowed). Consider refactoring. Open
OC.L10N.register(
"settings",
{
"Wrong current password" : "Das aktuelle Passwort ist falsch.",
"The new password cannot be the same as the previous one" : "Das neue Passwort kann nicht identisch zum alten Passwort sein.",
File Manager.php
has 385 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* @author Björn Schießle <bjoern@schiessle.org>
* @author Joas Schilling <coding@schilljs.com>
* @author Jörn Friedrich Dreyer <jfd@butonic.de>
File Setup.php
has 382 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* @author Administrator <Administrator@WINDOWS-2012>
* @author Arthur Schiwon <blizzz@arthur-schiwon.de>
* @author Bart Visscher <bartv@thisnet.nl>
OC
has 39 functions (exceeds 20 allowed). Consider refactoring. Open
var OC = {
PERMISSION_CREATE: 4,
PERMISSION_READ: 1,
PERMISSION_UPDATE: 2,
PERMISSION_DELETE: 8,
Encoding
has 39 functions (exceeds 20 allowed). Consider refactoring. Open
class Encoding extends Wrapper {
/**
* @var CappedMemoryCache
*/
private $namesCache;
Availability
has 39 functions (exceeds 20 allowed). Consider refactoring. Open
class Availability extends Wrapper {
public const RECHECK_TTL_SEC = 600; // 10 minutes
public static function shouldRecheck($availability) {
if (!$availability['available']) {
File de.js
has 381 lines of code (exceeds 250 allowed). Consider refactoring. Open
OC.L10N.register(
"core",
{
"Please select a file." : "Bitte wähle eine Datei aus.",
"File is too big" : "Datei ist zu groß",
File pt_BR.js
has 381 lines of code (exceeds 250 allowed). Consider refactoring. Open
OC.L10N.register(
"core",
{
"Please select a file." : "Por favor selecione um arquivo.",
"File is too big" : "O arquivo é muito grande",
File en_GB.js
has 381 lines of code (exceeds 250 allowed). Consider refactoring. Open
OC.L10N.register(
"core",
{
"Please select a file." : "Please select a file.",
"File is too big" : "File is too big",
File sq.js
has 381 lines of code (exceeds 250 allowed). Consider refactoring. Open
OC.L10N.register(
"core",
{
"Please select a file." : "Ju lutemi, përzgjidhni një kartelë.",
"File is too big" : "Kartela është shumë e madhe",
File sharedfilelist.js
has 380 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
* Copyright (c) 2014 Vincent Petry <pvince81@owncloud.com>
*
* This file is licensed under the Affero General Public License version 3
* or later.
File ko.js
has 380 lines of code (exceeds 250 allowed). Consider refactoring. Open
OC.L10N.register(
"core",
{
"Please select a file." : "파일을 선택하십시오.",
"File is too big" : "파일이 너무 큼",
File de_DE.js
has 380 lines of code (exceeds 250 allowed). Consider refactoring. Open
OC.L10N.register(
"core",
{
"Please select a file." : "Bitte wählen Sie eine Datei aus.",
"File is too big" : "Datei ist zu groß.",
File sv.js
has 380 lines of code (exceeds 250 allowed). Consider refactoring. Open
OC.L10N.register(
"core",
{
"Please select a file." : "Vänligen välj en fil.",
"File is too big" : "Filen är för stor",