Showing 221 of 356 total issues
File de_DE.js
has 419 lines of code (exceeds 250 allowed). Consider refactoring. Open
tinymce.addI18n('de_DE',{
"Redo": "Wiederholen",
"Undo": "R\u00fcckg\u00e4ngig machen",
"Cut": "Ausschneiden",
"Copy": "Kopieren",
File pl_PL.js
has 419 lines of code (exceeds 250 allowed). Consider refactoring. Open
tinymce.addI18n('pl_PL',{
"Redo": "Powt\u00f3rz",
"Undo": "Cofnij",
"Cut": "Wytnij",
"Copy": "Kopiuj",
File sk_SK.js
has 418 lines of code (exceeds 250 allowed). Consider refactoring. Open
tinymce.addI18n('sk_SK',{
"Redo": "Znova",
"Undo": "Sp\u00e4\u0165",
"Cut": "Vystrihn\u00fa\u0165",
"Copy": "Kop\u00edrova\u0165",
File QueryBuilderVisitor.php
has 401 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* @author Nicolas CARPi <nico-git@deltablot.email>
* @author Marcel Bolten <github@marcelbolten.de>
File sl_SI.js
has 400 lines of code (exceeds 250 allowed). Consider refactoring. Open
tinymce.addI18n('sl_SI',{
"Redo": "Ponovno uveljavi",
"Undo": "Razveljavi",
"Cut": "Izre\u017ei",
"Copy": "Kopiraj",
Function getCan
has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring. Open
public function getCan(array $can): bool
{
// if base permission is public, we can
if ($can['base'] === BasePermissions::Full->value) {
return true;
- 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 generateInput
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring. Open
generateInput(name: string, properties: ExtraFieldProperties): Element {
// we don't know yet which kind of element it will be
let element: HTMLInputElement|HTMLSelectElement;
// generate a unique id for the element so we can associate the label properly
const uniqid = this.getRandomId();
- 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
Method create
has 130 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function create(): bool
{
$schema = Update::getRequiredSchema();
$sql = "INSERT INTO `config` (`conf_name`, `conf_value`) VALUES
Function exports
has 127 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = (env) => {
return {
entry: {
main: [
'./src/scss/main.scss',
Function generateInput
has 124 lines of code (exceeds 25 allowed). Consider refactoring. Open
generateInput(name: string, properties: ExtraFieldProperties): Element {
// we don't know yet which kind of element it will be
let element: HTMLInputElement|HTMLSelectElement;
// generate a unique id for the element so we can associate the label properly
const uniqid = this.getRandomId();
Function execute
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
protected function execute(InputInterface $input, OutputInterface $output): int
{
$Db = Db::getConnection();
$queryItemsOrExperiment = "SELECT DISTINCT `id`, `body`, `userid`
- 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 getTinymceBaseConfig
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
export function getTinymceBaseConfig(page: string): object {
let plugins = 'accordion advlist anchor autolink autoresize table searchreplace code fullscreen insertdatetime charmap lists save image link pagebreak codesample template mention visualblocks visualchars emoticons';
let toolbar1 = 'undo redo | styles fontsize bold italic underline strikethrough | alignleft aligncenter alignright alignjustify | superscript subscript | bullist numlist outdent indent | forecolor backcolor | charmap emoticons adddate | codesample | link | sort-table | save';
let removedMenuItems = 'newdocument, image, anchor';
if (page === 'edit') {
- 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
Method generate
has 109 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function generate(Experiments | Items $Entity): void
{
$Teams = new Teams($Entity->Users, $Entity->Users->team);
$Teams->bypassWritePermission = true;
if ($Entity instanceof Experiments) {
Method importRootDataset
has 109 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function importRootDataset(array $dataset): void
{
$createTarget = $this->targetNumber;
$title = $this->transformIfNecessary($dataset['name'] ?? _('Untitled'));
Function formatMetadata
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
public static function formatMetadata(string $json): string
{
$final = '';
$Metadata = new Metadata($json);
$extraFields = $Metadata->getExtraFields();
- 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 edit.ts
has 329 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* @author Nicolas CARPi <nico-git@deltablot.email>
* @copyright 2012 Nicolas CARPi
* @see https://www.elabftw.net Official website
* @license AGPL-3.0
Method getSettingsByIdp
has 97 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function getSettingsByIdp(array $idp): array
{
$idpSigningCerts = array($idp['x509']);
if (!empty($idp['x509_new'])) {
File show.ts
has 321 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* @author Nicolas CARPi <nico-git@deltablot.email>
* @copyright 2012 Nicolas CARPi
* @see https://www.elabftw.net Official website
* @license AGPL-3.0
File plugin.js
has 318 lines of code (exceeds 250 allowed). Consider refactoring. Open
class AutoComplete {
editor;
options = {};
query = '';
hasFocus = true;
File EntitySqlBuilder.php
has 315 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* @author Nicolas CARPi <nico-git@deltablot.email>
* @copyright 2022 Nicolas CARPi