Showing 3,235 of 4,503 total issues
OC_Image
has 34 functions (exceeds 20 allowed). Consider refactoring. Open
class OC_Image implements \OCP\IImage {
/** @var false|resource */
protected $resource = false; // tmp resource.
/** @var int */
protected $imageType = IMAGETYPE_PNG; // Default to png if file type isn't evident.
File public.js
has 344 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.
File mk.js
has 344 lines of code (exceeds 250 allowed). Consider refactoring. Open
OC.L10N.register(
"core",
{
"Please select a file." : "Изберете датотека.",
"File is too big" : "Датотеката е пре голема",
File oc-backbone-webdav.js
has 344 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.
Function updateShare
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
public function updateShare(\OCP\Share\IShare $share, $skipExpirationValidation = false) {
$expirationDateUpdated = false;
$this->canShare($share);
- 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 mergeResponses
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
public static function mergeResponses($responses) {
// Sort into shipped and third-party
$shipped = [
'succeeded' => [],
'failed' => [],
- 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 upsert
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
public function upsert($table, $input, $compare) {
$this->conn->beginTransaction();
$done = false;
if (empty($compare)) {
- 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 setLanguageFromRequest
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
public function setLanguageFromRequest($app = null) {
$header = $this->request->getHeader('ACCEPT_LANGUAGE');
if ($header) {
$available = $this->findAvailableLanguages($app);
- 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 nl.js
has 343 lines of code (exceeds 250 allowed). Consider refactoring. Open
OC.L10N.register(
"settings",
{
"No user supplied" : "Geen gebruiker opgegeven",
"Authentication error" : "Authenticatie fout",
File hu_HU.js
has 343 lines of code (exceeds 250 allowed). Consider refactoring. Open
OC.L10N.register(
"core",
{
"Please select a file." : "Kérjük, válasszon ki egy fájlt.",
"File is too big" : "A fájl túl nagy",
Function initialize
has 105 lines of code (exceeds 25 allowed). Consider refactoring. Open
initialize: function() {
var self = this;
this.fileAppLoaded = function() {
Method getRemote
has 105 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function getRemote($search) {
$this->result['remotes'] = $this->result['exact']['remotes'] = $users = [];
if (\strlen(\trim($search)) === 0 && $this->userSearch->getSearchMinLength() > 0) {
$this->result['remotes'] = [];
Method index
has 105 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function index($dir = '', $view = '', $fileid = null, $details = null) {
$fileNotFound = false;
if ($fileid !== null) {
try {
return $this->showFile($fileid, $details);
Method loadField
has 105 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function loadField($table, $xml) {
$options = ['notnull' => false];
$primary = null;
foreach ($xml->children() as $child) {
/**
File pl.js
has 341 lines of code (exceeds 250 allowed). Consider refactoring. Open
OC.L10N.register(
"settings",
{
"Wrong current password" : "Podano złe hasło",
"The new password cannot be the same as the previous one" : "Nowe hasło nie może być takie samo jak poprzednie",
Root
has 33 functions (exceeds 20 allowed). Consider refactoring. Open
class Root extends Folder implements IRootFolder {
/**
* @var \OC\Files\Mount\Manager $mountManager
*/
private $mountManager;
Node
has 33 functions (exceeds 20 allowed). Consider refactoring. Open
abstract class Node implements FilesNode {
/** @var IStorage */
protected $storage;
/** @var string $path relativ to the storage root */
Cache
has 33 functions (exceeds 20 allowed). Consider refactoring. Open
class Cache implements ICache {
use MoveFromCacheTrait {
MoveFromCacheTrait::moveFromCache as moveFromCacheFallback;
}
Db
has 33 functions (exceeds 20 allowed). Consider refactoring. Open
class Db implements IDb {
/**
* @var IDBConnection
*/
protected $connection;
Method updateShare
has 104 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function updateShare(\OCP\Share\IShare $share, $skipExpirationValidation = false) {
$expirationDateUpdated = false;
$this->canShare($share);