Showing 4,504 of 4,504 total issues
Function reload
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
reload: function() {
this.showMask();
if (this._reloadCall) {
this._reloadCall.abort();
}
Function applyGroupSelect
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
applyGroupSelect: function (element, user, checked) {
var $element = $(element);
var checkHandler = null;
if(user) { // Only if in a user row, and not the #newusergroups select
Function getFilteredFiles
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
getFilteredFiles: function(filter, options) {
options = options || {};
var self = this;
var deferred = $.Deferred();
var promise = deferred.promise();
Function autocompleteRenderItem
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
autocompleteRenderItem: function(ul, item) {
var text = item.label;
var showIcon = false;
var iconClass = "";
var typeInfo = t('core', 'User');
Function _create
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
_create: function() {
var self = this;
this.originalTitle = this.element.attr('title');
this.options.title = this.options.title || this.originalTitle;
Method setupFromToken
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function setupFromToken($token, $relativePath = null, $password = null) {
\OC_User::setIncognitoMode(true);
$linkItem = \OCP\Share::getShareByToken($token, !$password);
if ($linkItem === false || ($linkItem['item_type'] !== 'file' && $linkItem['item_type'] !== 'folder')) {
Method handleUpdateProperties
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function handleUpdateProperties($path, PropPatch $propPatch) {
$node = $this->server->tree->getNodeForPath($path);
if (!($node instanceof SystemTagNode)) {
return;
}
Method save
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function save() {
if (\is_array($this->tags)) {
foreach ($this->tags as $tag) {
try {
if (!$this->mapper->tagExists($tag)) {
Method post_deleteUser
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function post_deleteUser($arguments) {
// Find all objectid/tagId pairs.
$result = null;
try {
$stmt = \OCP\DB::prepare('SELECT `id` FROM `' . self::TAG_TABLE . '` '
Method getShareByToken
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getShareByToken($token) {
$provider = $this->factory->getProviderForType(\OCP\Share::SHARE_TYPE_LINK);
try {
$share = $provider->getShareByToken($token);
Method resizeAndStore
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function resizeAndStore() {
$image = $this->preview;
if (!($image instanceof IImage)) {
Util::writeLog(
'core',
Method checkTokenCredentials
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function checkTokenCredentials(IToken $dbToken, $token) {
// Check whether login credentials are still valid and the user was not disabled
// This check is performed each 5 minutes per default
// However, we try to read last_check_timeout from the appconfig table so the
// administrator could change this 5 minutes timeout
Similar blocks of code found in 2 locations. Consider refactoring. Open
for(var i in groups) {
var gid = groups[i]['gid'];
var $li = GroupList.getGroupLI(gid);
var userCount = GroupList.getUserCount($li);
GroupList.setUserCount($li, userCount - 1);
- 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 74.
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
for(var i in groups) {
var gid = groups[i]['gid'];
var $li = GroupList.getGroupLI(gid);
var userCount = GroupList.getUserCount($li);
GroupList.setUserCount($li, userCount + 1);
- 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 74.
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
<?php
namespace OC\Migrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\DBAL\Types\Type;
- 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 120.
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
<?php
namespace OC\Migrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\DBAL\Types\Type;
- 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 120.
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 render
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
render: function() {
var self = this;
this.$el.html(this.template());
this.$el.find('[title]').tooltip({placement: 'bottom'});
Function do_delete
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
do_delete:function(files, dir) {
var self = this;
if (files && files.substr) {
files=[files];
}
Function addShare
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
addShare: function(properties, options) {
var shareType = properties.shareType;
options = options || {};
properties = _.extend({}, properties);
Function initialize
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
initialize: function() {
this.navigation = new OCA.Files.Navigation($('#app-navigation'));
this.$showHiddenFiles = $('input#showhiddenfilesToggle');
var showHidden = $('#showHiddenFiles').val() === "1";
this.$showHiddenFiles.prop('checked', showHidden);