Showing 4,504 of 4,504 total issues
Similar blocks of code found in 6 locations. Consider refactoring. Open
OC.L10N.register(
"lib",
{
"Unknown filetype" : "Nepoznat tip fajla",
"Invalid image" : "Neispravna slika",
- 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 103.
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 6 locations. Consider refactoring. Open
OC.L10N.register(
"files_external",
{
"Step 1 failed. Exception: %s" : "Schritt 1 ist fehlgeschlagen. Ausnahme: %s",
"Step 2 failed. Exception: %s" : "Schritt 2 ist fehlgeschlagen. Ausnahme: %s",
- 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 103.
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 6 locations. Consider refactoring. Open
OC.L10N.register(
"federatedfilesharing",
{
"Federated sharing" : "Федерирано споделување",
"Loading..." : "Вчитување",
- 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 103.
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
File sl.js
has 307 lines of code (exceeds 250 allowed). Consider refactoring. Open
OC.L10N.register(
"settings",
{
"No user supplied" : "Ni navedenega uporabnika",
"Authentication error" : "Napaka overjanja",
Method getCalendarsForUser
has 84 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getCalendarsForUser($principalUri) {
$principalUriOriginal = $principalUri;
$principalUri = $this->convertPrincipal($principalUri, true);
$fields = \array_values($this->propertyMap);
$fields[] = 'id';
Method initPaths
has 84 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function initPaths() {
if (\defined('PHPUNIT_CONFIG_DIR')) {
self::$configDir = OC::$SERVERROOT . '/' . PHPUNIT_CONFIG_DIR . '/';
} elseif (\defined('PHPUNIT_RUN') and PHPUNIT_RUN and \is_dir(OC::$SERVERROOT . '/tests/config/')) {
self::$configDir = OC::$SERVERROOT . '/tests/config/';
Method execute
has 84 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function execute(InputInterface $input, OutputInterface $output): int {
$appId = $input->getArgument('app-id');
$checkList = new EmptyCheck();
foreach ($input->getOption('checker') as $checker) {
Method buildCoreRoles
has 84 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function buildCoreRoles(AddRolesEvent $event) {
$event->addRole(
[
'id' => 'core.viewer',
'displayName' => $this->l10n->t('Download / View'),
Similar blocks of code found in 2 locations. Consider refactoring. Open
$('#legal_privacy_policy').change(function () {
OC.msg.startSaving('#legal_privacy_policy');
var post = {
privacyPolicy : $("#legal_privacy_policy").val()
};
- 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 102.
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
$('#legal_imprint').change(function () {
OC.msg.startSaving('#legal_imprint');
var post = {
imprintUrl : $("#legal_imprint").val()
};
- 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 102.
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
File Local.php
has 306 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* @author Bart Visscher <bartv@thisnet.nl>
* @author Boris Rybalkin <ribalkin@gmail.com>
* @author Brice Maron <brice@bmaron.net>
Storage
has 28 functions (exceeds 20 allowed). Consider refactoring. Open
class Storage {
public const DEFAULTENABLED=true;
public const DEFAULTMAXSIZE=50; // unit: percentage; 50% of available disk space/quota
public const VERSIONS_ROOT = 'files_versions/';
File sv.js
has 305 lines of code (exceeds 250 allowed). Consider refactoring. Open
OC.L10N.register(
"settings",
{
"No user supplied" : "Ingen användare angiven",
"Authentication error" : "Fel vid autentisering",
Function fail
has 83 lines of code (exceeds 25 allowed). Consider refactoring. Open
fail: function(e, data) {
var upload = self.getUpload(data);
if (upload && upload.data && upload.data.stalled) {
self.log('retry', e, upload);
// jQuery Widget Factory uses "namespace-widgetname" since version 1.10.0:
Function checkSetup
has 83 lines of code (exceeds 25 allowed). Consider refactoring. Open
checkSetup: function() {
var deferred = $.Deferred();
var afterCall = function(data, statusText, xhr) {
var messages = [];
if (xhr.status === 200 && data) {
Method getLocks
has 83 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getLocks($uri, $returnChildLocks) {
try {
$node = $this->tree->getNodeForPath($uri);
if ($node instanceof SharedFile || $node instanceof SharedFolder) {
Method unshareFromSelf
has 83 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function unshareFromSelf($itemType, $itemOrigin, $originIsSource = false) {
$originType = ($originIsSource) ? 'source' : 'target';
$uid = \OCP\User::getUser();
if ($itemType === 'file' || $itemType === 'folder') {
Function singleSelect
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
$.fn.singleSelect = function () {
return this.each(function (i, select) {
var input = $('<input/>'),
placement = $(select).attr('data-tooltip-placement'),
inputTooltip = $(select).attr('data-inputtitle');
Method scanFiles
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function scanFiles($user, $path, $verbose, OutputInterface $output, $backgroundScan = false, $shouldRepair = false) {
$connection = $this->reconnectToDatabase($output);
$scanner = new \OC\Files\Utils\Scanner($user, $connection, \OC::$server->getLogger());
if ($shouldRepair) {
$scanner->listen('\OC\Files\Utils\Scanner', 'beforeScanStorage', function ($storage) use ($output, $connection) {
Method setupDatabase
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function setupDatabase($username) {
$e_host = \addslashes($this->dbHost);
$e_dbname = \addslashes($this->dbName);
//check if the database user has admin right
if ($this->dbConnectionString !== null) {