Showing 4,504 of 4,504 total issues
prototype
has 23 functions (exceeds 20 allowed). Consider refactoring. Open
OC.Uploader.prototype = _.extend({
/**
* @type Array<OC.FileUpload>
*/
_uploads: {},
Manager
has 23 functions (exceeds 20 allowed). Consider refactoring. Open
class Manager {
public const STORAGE = '\OCA\Files_Sharing\External\Storage';
/**
* @var string
Node
has 23 functions (exceeds 20 allowed). Consider refactoring. Open
abstract class Node implements \Sabre\DAV\INode {
/**
* @var \OC\Files\View
*/
protected $fileView;
OC
has 23 functions (exceeds 20 allowed). Consider refactoring. Open
class OC {
/**
* Associative array for autoloading. classname => filename
*/
public static $CLASSPATH = [];
FailedCache
has 23 functions (exceeds 20 allowed). Consider refactoring. Open
class FailedCache implements ICache {
/** @var bool whether to show the failed storage in the ui */
private $visible;
/**
StoragesService
has 23 functions (exceeds 20 allowed). Consider refactoring. Open
abstract class StoragesService implements IStoragesService {
/** @var IStoragesBackendService */
protected $backendService;
/**
Identical blocks of code found in 2 locations. Consider refactoring. Open
td.append($('<span></span>').attr({
"class": "modified",
"title": formatted,
"style": 'color:rgb('+modifiedColor+','+modifiedColor+','+modifiedColor+')'
}).text(text)
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 85.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Identical blocks of code found in 2 locations. Consider refactoring. Open
td.append($('<span></span>').attr({
"class": "modified",
"title": formatted,
"style": 'color:rgb(' + modifiedColor + ',' + modifiedColor + ',' + modifiedColor + ')'
}).text(text)
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 85.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
self.addAndFetchFileInfo(targetPath, '', {scrollTo:true}).then(function(status, data) {
deferred.resolve(status, data);
}, function() {
OC.Notification.show(t('files', 'Could not create folder "{dir}"',
{dir: name}), {type: 'error'}
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 85.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
self.addAndFetchFileInfo(targetPath, '', {scrollTo: true}).then(function(status, data) {
deferred.resolve(status, data);
}, function() {
OC.Notification.show(t('files', 'Could not create file "{file}"',
{file: name}), {type: 'error'}
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 85.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Function _registerPendingShareActions
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
_registerPendingShareActions: function(fileActions) {
var self = this;
// register pending share actions
fileActions.registerAction({
Function initialize
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
initialize: function($el) {
OC.Plugins.register('OCA.Search', OC.Settings.Apps.Search);
OC.Settings.Apps.loadCategories();
OC.Util.History.addOnPopStateHandler(_.bind(this._onPopState, this));
Function _onSubmitComment
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
_onSubmitComment: function(e) {
var self = this;
var $form = $(e.target);
var commentId = $form.closest('.comment').data('id');
var currentUser = OC.getCurrentUser();
Function _setOption
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
_setOption: function(key, value) {
var self = this;
switch (key) {
case 'title':
if (this.$title) {
Function showPassword
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
showPassword: function(c) {
// Setup callback object
var callback = {'fn':null,'args':{}}
callback.fn = c;
Method index
has 62 lines of code (exceeds 25 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 = '';
}
Method retainVersions
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
private static function retainVersions($filename, $owner, $ownerPath, $timestamp, $sourceStorage = null, $forceCopy = false) {
if (\OCP\App::isEnabled('files_versions') && !empty($ownerPath)) {
$copyKeysResult = false;
// Temporary
Method getLocalMethods
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function getLocalMethods() {
return [
'OC_L10N::get' => '8.2.0',
'OCP\Activity\IManager::publishActivity' => '8.2.0',
Function showCredentialsDialog
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
showCredentialsDialog: function (mountPoint, mountData) {
var template = Handlebars.compile(OCA.External.StatusManager.credentialsDialogTemplate);
var dialog = $(template({
credentials_text: t('files_external', 'Please enter the credentials for the {mount} mount', {
'mount': mountPoint
Method createCalendarObjectsTable
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function createCalendarObjectsTable(Schema $schema) {
if (!$schema->hasTable("{$this->prefix}calendarobjects")) {
$table = $schema->createTable("{$this->prefix}calendarobjects");
$table->addColumn('id', 'integer', [
'notnull' => true,