Showing 620 of 1,375 total issues
File chart.js
has 12846 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*!
* Chart.js v3.3.2
* https://www.chartjs.org
* (c) 2021 Chart.js Contributors
* Released under the MIT License
Function smileTracker
has a Cognitive Complexity of 82 (exceeds 5 allowed). Consider refactoring. Open
const smileTracker = (function () {
"use strict";
const guid = (function() {
- 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 smileTracker
has 279 lines of code (exceeds 40 allowed). Consider refactoring. Open
const smileTracker = (function () {
"use strict";
const guid = (function() {
File slider.js
has 568 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*!
* jQuery UI Slider - v1.10.4
* http://jqueryui.com
*
* Copyright 2014 jQuery Foundation and other contributors
Function afterCreateCollection
has a Cognitive Complexity of 55 (exceeds 5 allowed). Consider refactoring. Open
public function afterCreateCollection(ProductsList $subject, $collection)
{
$storeId = $this->getCurrentStoreId($subject);
$sortOption = $subject->getData('sort_order');
$conditionOption = $subject->getData('condition_option');
- 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 extractTermStatsByPosition
has a Cognitive Complexity of 50 (exceeds 5 allowed). Consider refactoring. Open
private function extractTermStatsByPosition($termVectors, $useAllTokens = false)
{
$statByPosition = [];
$analyzers = [
FieldInterface::ANALYZER_STANDARD,
- 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 FrontPlugin.php
has 452 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade Smile ElasticSuite to newer
Collection
has 32 functions (exceeds 10 allowed). Consider refactoring. Open
class Collection extends \Magento\Catalog\Model\ResourceModel\Product\Collection
{
/**
* @var QueryResponse
*/
Client
has 29 functions (exceeds 10 allowed). Consider refactoring. Open
class Client implements ClientInterface
{
/**
* @var \OpenSearch\Client
*/
File Collection.php
has 378 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade Smile ElasticSuite to newer
Function _computeLabelItems
has 139 lines of code (exceeds 40 allowed). Consider refactoring. Open
_computeLabelItems(chartArea) {
const me = this;
const axis = me.axis;
const options = me.options;
const {position, ticks: optionTicks} = options;
Function saveAndReplaceThesaurus
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
private function saveAndReplaceThesaurus(): void
{
$behavior = $this->getBehavior();
$rows = [];
while ($bunch = $this->_dataSourceModel->getNextBunch()) {
- 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
Optimizer
has 26 functions (exceeds 10 allowed). Consider refactoring. Open
class Optimizer extends \Magento\Framework\Model\AbstractModel implements OptimizerInterface, IdentityInterface
{
/**
* @var string
*/
Field
has 26 functions (exceeds 10 allowed). Consider refactoring. Open
class Field implements FieldInterface
{
/**
* @var int
*/
Function checkUpdateNeeded
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
private function checkUpdateNeeded($subject)
{
$updateMapping = $cleanCache = $invalidateIndex = false;
if ($this->saveIsNew === 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
IndexSettings
has 25 functions (exceeds 10 allowed). Consider refactoring. Open
class IndexSettings extends AbstractConfiguration
{
/**
* Location of ElasticSuite base settings configuration.
*
Switcher
has 24 functions (exceeds 10 allowed). Consider refactoring. Open
class Switcher extends Template
{
/**
* Name of container variable
*
Factory
has 24 functions (exceeds 10 allowed). Consider refactoring. Open
class Factory
{
/**
* XML root node for search relevance
*/
File product-attributes.js
has 347 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade Smile ElasticSuite to newer
* versions in the future.
Function _draw
has 116 lines of code (exceeds 40 allowed). Consider refactoring. Open
_draw() {
const me = this;
const {options: opts, columnSizes, lineWidths, ctx} = me;
const {align, labels: labelOpts} = opts;
const defaultColor = defaults.color;