Showing 620 of 1,375 total issues
MultiMatch
has 12 functions (exceeds 10 allowed). Consider refactoring. Open
class MultiMatch implements QueryInterface
{
/**
* @var string
*/
Config
has 12 functions (exceeds 10 allowed). Consider refactoring. Open
class Config extends \Magento\Framework\View\Element\Template
{
/**
* The default tracking consent script, used as a fallback if none defined in layout.
*/
Index
has 12 functions (exceeds 10 allowed). Consider refactoring. Open
class Index
{
/**
* @var string
*/
File QueryBuilder.php
has 263 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 execute
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
public function execute()
{
/** @var \Magento\Backend\Model\View\Result\Redirect $resultRedirect */
$resultRedirect = $this->resultRedirectFactory->create();
$data = $this->getRequest()->getPostValue();
- 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 addData
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
public function addData($storeId, array $indexData)
{
$productIds = array_keys($indexData);
$indexData = $this->addAttributeData($storeId, $productIds, $indexData);
- 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 updateSearchContext
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
public function updateSearchContext($args)
{
if (!empty($args['search'])) {
try {
$query = $this->queryFactory->create()->loadByQueryText($args['search']);
- 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 isEventInvalid
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
protected function isEventInvalid($data)
{
$isEventInvalid = true;
if (isset($data['page']['store_id']) && is_numeric($data['page']['store_id'])) {
- 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 fitWithPointLabels
has 71 lines of code (exceeds 40 allowed). Consider refactoring. Open
function fitWithPointLabels(scale) {
const furthestLimits = {
l: 0,
r: scale.width,
t: 0,
QueryBuilder
has 11 functions (exceeds 10 allowed). Consider refactoring. Open
class QueryBuilder
{
/**
* @var QueryFactory
*/
ProductDate
has 11 functions (exceeds 10 allowed). Consider refactoring. Open
class ProductDate implements SpecialAttributeInterface
{
/**
* @var string
*/
Context
has 11 functions (exceeds 10 allowed). Consider refactoring. Open
class Context implements \Smile\ElasticsuiteCore\Api\Search\ContextInterface
{
/**
* @var \Magento\Catalog\Api\Data\CategoryInterface
*/
Converter
has 11 functions (exceeds 10 allowed). Consider refactoring. Open
class Converter implements \Magento\Framework\Config\ConverterInterface
{
const ROOT_NODE_NAME = 'analysis';
const CHAR_FILTER_TYPE_ROOT_NODE = 'char_filters';
const CHAR_FILTER_TYPE_NODE = 'char_filter';
Request
has 11 functions (exceeds 10 allowed). Consider refactoring. Open
class Request extends \Magento\Framework\Search\Request implements RequestInterface
{
/**
* @var SortOrderInterface
*/
IndexSettings
has 11 functions (exceeds 10 allowed). Consider refactoring. Open
class IndexSettings implements IndexSettingsInterface
{
/**
* @var string
*/
Thesaurus
has 11 functions (exceeds 10 allowed). Consider refactoring. Open
class Thesaurus extends AbstractEntity
{
const ENTITY_CODE = 'thesaurus';
const COL_TERMS = 'terms_relations';
const COL_STORES = 'stores';
Method __construct
has 17 arguments (exceeds 4 allowed). Consider refactoring. Open
$minimumShouldMatch,
$tieBreaker,
$phraseMatchBoost,
$cutOffFrequency,
FuzzinessConfigurationInterface $fuzziness = null,
Function _initItems
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
protected function _initItems()
{
parent::_initItems();
foreach ($this->_items as $key => $item) {
- 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 addOptionsData
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
private function addOptionsData(array $items)
{
if ($this->getAttributeModel()->getFacetSortOrder() == BucketInterface::SORT_ORDER_MANUAL) {
$options = $this->getAttributeModel()->getFrontend()->getSelectOptions();
$optionPosition = 0;
- 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 getBucketValues
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
private function getBucketValues($rawBucket)
{
$values = [];
if (isset($rawBucket['sum_other_doc_count']) && $rawBucket['sum_other_doc_count'] > 0) {
- 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"