Showing 3,236 of 4,502 total issues
Preview
has 45 functions (exceeds 20 allowed). Consider refactoring. Open
class Preview {
//the thumbnail folder
public const THUMBNAILS_FOLDER = 'thumbnails';
public const MODE_FILL = 'fill';
OC_App
has 45 functions (exceeds 20 allowed). Consider refactoring. Open
class OC_App {
private static $adminForms = [];
private static $personalForms = [];
private static $appTypes = [];
private static $loadedApps = [];
Function getUsers
has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring. Open
protected function getUsers($search) {
$this->result['users'] = $this->result['exact']['users'] = $users = [];
if (\strlen(\trim($search)) === 0 && $this->userSearch->getSearchMinLength() > 0) {
$this->result['users'] = [];
- 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
Share
has 44 functions (exceeds 20 allowed). Consider refactoring. Open
class Share implements IShare {
/** @var string */
private $id;
/** @var string */
private $providerId;
Session
has 44 functions (exceeds 20 allowed). Consider refactoring. Open
class Session implements IUserSession, Emitter {
use EventEmitterTrait;
/** @var IUserManager | PublicEmitter $manager */
private $manager;
File en_GB.js
has 414 lines of code (exceeds 250 allowed). Consider refactoring. Open
OC.L10N.register(
"settings",
{
"Wrong current password" : "Wrong current password",
"The new password cannot be the same as the previous one" : "The new password cannot be the same as the previous one",
File ru_RU.js
has 414 lines of code (exceeds 250 allowed). Consider refactoring. Open
OC.L10N.register(
"settings",
{
"Wrong current password" : "Старый пароль неверен",
"The new password cannot be the same as the previous one" : "Новый пароль не совпадать с предыдущим",
File de_DE.js
has 414 lines of code (exceeds 250 allowed). Consider refactoring. Open
OC.L10N.register(
"settings",
{
"Wrong current password" : "Falsches aktuelles Passwort",
"The new password cannot be the same as the previous one" : "Das neue Passwort kann nicht das gleiche sein wie das alte",
File sq.js
has 414 lines of code (exceeds 250 allowed). Consider refactoring. Open
OC.L10N.register(
"settings",
{
"Wrong current password" : "Fjalëkalim i tanishëm i gabuar",
"The new password cannot be the same as the previous one" : "Fjalëkalimi i ri s’mund të jetë i njëjtë me atë të mëparshmin",
File pt_BR.js
has 414 lines of code (exceeds 250 allowed). Consider refactoring. Open
OC.L10N.register(
"settings",
{
"Wrong current password" : "Senha atual incorreta",
"The new password cannot be the same as the previous one" : "A nova senha não pode ser a mesma que a anterior",
File ug.js
has 414 lines of code (exceeds 250 allowed). Consider refactoring. Open
OC.L10N.register(
"settings",
{
"Wrong current password" : "نۆۋەتتىكى ئىم خاتا",
"The new password cannot be the same as the previous one" : "يېڭى ئىم ئالدىنقى ئىمغا ئوخشاش بولسا بولمايدۇ",
File de.js
has 414 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 tr.js
has 414 lines of code (exceeds 250 allowed). Consider refactoring. Open
OC.L10N.register(
"settings",
{
"Wrong current password" : "Şimdiki parola yanlış",
"The new password cannot be the same as the previous one" : "Yeni parola eskisiyle aynı olamaz",
Function index
has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring. Open
public function index($offset = 0, $limit = 10, $gid = '', $pattern = '', $backend = '') {
// FIXME: The JS sends the group '_everyone' instead of no GID for the "all users" group.
if ($gid === '_everyone') {
$gid = '';
}
- 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 getLocks
has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring. Open
public function getLocks($uri, $returnChildLocks) {
try {
$node = $this->tree->getNodeForPath($uri);
if ($node instanceof SharedFile || $node instanceof SharedFolder) {
- 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 listMounts
has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring. Open
public function listMounts($userId, array $mounts, InputInterface $input, OutputInterface $output) {
$outputType = $input->getOption('output');
$outputIsJson = ($outputType === self::OUTPUT_FORMAT_JSON) || ($outputType === self::OUTPUT_FORMAT_JSON_PRETTY);
$shortView = $input->getOption('short');
$importableView = $input->getOption('importable-format');
- 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 getInternalDriveFile
has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring. Open
private function getInternalDriveFile($path) {
// Remove leading and trailing slashes
$path = \trim($path, '/');
if ($path === '.') {
$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 position
has 147 lines of code (exceeds 25 allowed). Consider refactoring. Open
$.fn.position = function( options ) {
if ( !options || !options.of ) {
return _position.apply( this, arguments );
}
FailedStorage
has 43 functions (exceeds 20 allowed). Consider refactoring. Open
class FailedStorage extends Common {
/** @var \Exception */
protected $e;
/**
Function autocompleteHandler
has 145 lines of code (exceeds 25 allowed). Consider refactoring. Open
autocompleteHandler: function (search, response) {
var view = this;
var $loading = this.$el.find('.shareWithLoading');
var trimmedSearch = search.term.trim();
$loading.removeClass('hidden');