Showing 3,235 of 4,503 total issues
Function decryptUsersFiles
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
protected function decryptUsersFiles($uid, ProgressBar $progress, $userCount) {
$this->setupUserFS($uid);
$directories = [];
$directories[] = '/' . $uid . '/files';
- 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 SyncBackend.php
has 364 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* @author Jörn Friedrich Dreyer <jfd@butonic.de>
* @author Thomas Müller <thomas.mueller@tmit.eu>
*
File nb_NO.js
has 363 lines of code (exceeds 250 allowed). Consider refactoring. Open
OC.L10N.register(
"settings",
{
"Wrong current password" : "Feil nåværende passord",
"The new password cannot be the same as the previous one" : "Det nye passordet kan ikke være det samme som det forrige",
File gl.js
has 363 lines of code (exceeds 250 allowed). Consider refactoring. Open
OC.L10N.register(
"core",
{
"Please select a file." : "Seleccione un ficheiro.",
"File is too big" : "O ficheiro é grande de máis",
File he.js
has 363 lines of code (exceeds 250 allowed). Consider refactoring. Open
OC.L10N.register(
"core",
{
"Please select a file." : "יש לבחור קובץ.",
"File is too big" : "הקובץ גדול מדי",
File zh_TW.js
has 363 lines of code (exceeds 250 allowed). Consider refactoring. Open
OC.L10N.register(
"core",
{
"Please select a file." : "請選擇一個檔案",
"File is too big" : "檔案太大",
File StoragesService.php
has 363 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* @author Jesús Macias <jmacias@solidgear.es>
* @author Lukas Reschke <lukas@statuscode.ch>
* @author Robin Appelman <icewind@owncloud.com>
File ar.js
has 362 lines of code (exceeds 250 allowed). Consider refactoring. Open
OC.L10N.register(
"core",
{
"Please select a file." : "يُرجى تحديد ملف.",
"File is too big" : "الملف كبير للغاية",
SharedStorage
has 36 functions (exceeds 20 allowed). Consider refactoring. Open
class SharedStorage extends \OC\Files\Storage\Wrapper\Jail implements ISharedStorage {
/** @var \OCP\Share\IShare */
private $superShare;
/** @var \OCP\Share\IShare[] */
DAV
has 36 functions (exceeds 20 allowed). Consider refactoring. Open
class DAV extends Common {
/** @var string */
protected $password;
/** @var string */
protected $user;
Method __construct
has 116 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __construct() {
parent::__construct('federatedfilesharing');
$container = $this->getContainer();
$server = $container->getServer();
Method log
has 115 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function log($level, $message, array $context = []) {
$minLevel = \min($this->config->getValue('loglevel', Util::WARN), Util::FATAL);
$logConditions = $this->config->getValue('log.conditions', []);
if (empty($logConditions)) {
$logConditions[] = $this->config->getValue('log.condition', []);
File cs_CZ.js
has 358 lines of code (exceeds 250 allowed). Consider refactoring. Open
OC.L10N.register(
"settings",
{
"Wrong current password" : "Chybné heslo",
"The new password cannot be the same as the previous one" : "Nové heslo nemůže být stejné jako to předchozí",
File RepairMismatchFileCachePath.php
has 358 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* @author Vincent Petry <pvince81@owncloud.com>
*
* @copyright Copyright (c) 2018, ownCloud GmbH
Function downloadShare
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
public function downloadShare($token, $files = null, $path = '', $downloadStartSecret = '') {
\OC_User::setIncognitoMode(true);
$share = $this->shareManager->getShareByToken($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 moveInto
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
public function moveInto($targetName, $fullSourcePath, INode $sourceNode) {
if (!$sourceNode instanceof Node) {
if ($sourceNode instanceof ITrashBinNode) {
if (!$this->fileView->isCreatable($this->getPath())) {
throw new SabreForbidden('Destination directory is not writable');
- 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 setupFS
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
public static function setupFS($user = '', $fullInit = true) {
//setting up the filesystem twice can only lead to trouble
if (self::$fsSetup) {
return 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 showLoginForm
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
public function showLoginForm($user, $redirect_url, $remember_login) {
// check if there is apache auth backend available and try to obtain session,
// if apache backend not registered or failed to login, proceed with show login form
if ($this->handleApacheAuth()) {
// apache auth was completed server-side and there is active session,
- 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 pl.js
has 357 lines of code (exceeds 250 allowed). Consider refactoring. Open
OC.L10N.register(
"core",
{
"Please select a file." : "Proszę wybrać plik",
"File is too big" : "Plik jest za duży",
File cs_CZ.js
has 357 lines of code (exceeds 250 allowed). Consider refactoring. Open
OC.L10N.register(
"core",
{
"Please select a file." : "Prosím vyberte soubor.",
"File is too big" : "Soubor je příliš velký",