Showing 3,235 of 4,503 total issues
Function add
has 103 lines of code (exceeds 25 allowed). Consider refactoring. Open
add: function (user) {
if (this.currentGid && this.currentGid !== '_everyone' && user.groups[this.currentGid] === undefined) {
return;
}
Method fopen
has 103 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function fopen($path, $mode) {
// check if the file is stored in the array cache, this means that we
// copy a file over to the versions folder, in this case we don't want to
// decrypt it
if ($this->arrayCache->hasKey('encryption_copy_version_' . $path)) {
File systemtagsinputfield.js
has 338 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
* Copyright (c) 2015
*
* This file is licensed under the Affero General Public License version 3
* or later.
File nl.js
has 338 lines of code (exceeds 250 allowed). Consider refactoring. Open
OC.L10N.register(
"core",
{
"Please select a file." : "Selecteer een bestand.",
"File is too big" : "Bestand te groot",
File nb_NO.js
has 338 lines of code (exceeds 250 allowed). Consider refactoring. Open
OC.L10N.register(
"core",
{
"Please select a file." : "Vennligst velg en fil.",
"File is too big" : "Filen er for stor",
Function getAssignableAndRemovableGroups
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
public function getAssignableAndRemovableGroups() {
$assignableGroups = [];
$removableGroups = [];
$currentUser = $this->userSession->getUser();
- 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 getDenormalizedData
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
public function getDenormalizedData($calendarData) {
$vObject = Reader::read($calendarData);
$componentType = null;
$component = null;
$firstOccurrence = 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 execute
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
protected function execute(InputInterface $input, OutputInterface $output): int {
$user = $input->getOption('user');
$path = $input->getArgument('path');
if ($path === '-') {
$json = \file_get_contents('php://stdin');
- 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
Method changeUserPassword
has 102 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function changeUserPassword($args) {
// Check if we are an user
\OC_JSON::callCheck();
\OC_JSON::checkLoggedIn();
Method rename
has 101 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function rename($path1, $path2) {
return $this->emittingCall(function () use (&$path1, &$path2) {
$absolutePath1 = Filesystem::normalizePath($this->getAbsolutePath($path1));
$absolutePath2 = Filesystem::normalizePath($this->getAbsolutePath($path2));
$result = false;
Method changeSchema
has 101 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function changeSchema(Schema $schema, array $options) {
$prefix = $options['tablePrefix'];
if (!$schema->hasTable("{$prefix}external_mounts")) {
$table = $schema->createTable("{$prefix}external_mounts");
$table->addColumn('mount_id', 'bigint', [
File id.js
has 334 lines of code (exceeds 250 allowed). Consider refactoring. Open
OC.L10N.register(
"core",
{
"Please select a file." : "Silakan pilih sebuah berkas.",
"File is too big" : "Berkas terlalu besar",
AbstractNode
has 32 functions (exceeds 20 allowed). Consider refactoring. Open
abstract class AbstractNode implements \OCP\Files\Node {
/**
* @inheritdoc
*/
public function getMimePart() {
FileInfo
has 32 functions (exceeds 20 allowed). Consider refactoring. Open
class FileInfo implements \OCP\Files\FileInfo, \ArrayAccess {
/**
* @var array $data
*/
private $data;
Encryption
has 32 functions (exceeds 20 allowed). Consider refactoring. Open
class Encryption extends Wrapper {
use LocalTempFileTrait;
/** @var string */
private $mountPoint;
OC_User
has 32 functions (exceeds 20 allowed). Consider refactoring. Open
class OC_User {
/**
* @return \OC\User\Session
*/
public static function getUserSession() {
Notification
has 32 functions (exceeds 20 allowed). Consider refactoring. Open
class Notification implements INotification {
/** @var string */
protected $app;
/** @var string */
User
has 32 functions (exceeds 20 allowed). Consider refactoring. Open
class User implements IUser {
use EventEmitterTrait;
/** @var Account */
private $account;
File DIContainer.php
has 333 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* @author Bernhard Posselt <dev@bernhard-posselt.com>
* @author Christoph Wurst <christoph@owncloud.com>
* @author Joas Schilling <coding@schilljs.com>
File share.js
has 332 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
* Copyright (c) 2014
*
* This file is licensed under the Affero General Public License version 3
* or later.