Showing 620 of 1,375 total issues
Method beforeResolve
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
ResolverInterface $subject,
Field $field,
$context,
ResolveInfo $info,
array $value = null,
Method __construct
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
StoreManagerInterface $storeManager,
CategoryRepositoryInterface $categoryRepository,
Conditions $conditionsHelper,
SkuPositionSortOrderBuilder $skuPositionSortOrderBuilder,
Provider $filterProvider,
Function aroundReindex
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function aroundReindex(\Magento\Catalog\Model\Category $category, \Closure $proceed)
{
$proceed();
// Reindex only if attached product list has changed.
- 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 __construct
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
ScopeConfigInterface $scopeConfig,
StoreManagerInterface $storeManager,
CategoryCollectionFactory $categoryCollectionFactory,
UrlFinderInterface $urlFinder,
UrlInterface $urlBuilder,
Function execute
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function execute($entity, $arguments = [])
{
$attributeData = $entity->getData(self::ATTRIBUTE_CODE);
if (!is_object($attributeData)) {
- 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 beforeGetImage
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function beforeGetImage(
\Magento\Catalog\Block\Product\AbstractProduct $subject,
\Magento\Catalog\Model\Product $product,
$location,
array $attributes = []
- 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
Consider simplifying this complex logical expression. Open
if ((this.options.values.length === 2 && this.options.range === true) &&
((index === 0 && newVal > otherVal) || (index === 1 && newVal < otherVal))
) {
newVal = otherVal;
}
Function _measureText
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function _measureText(ctx, data, gc, longest, string) {
Function _updateBezierControlPoints
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function _updateBezierControlPoints(points, options, area, loop, indexAxis) {
Method getPreviewResults
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
ContainerConfigurationInterface $containerConfiguration,
ApplierList $applier,
$size,
$queryText = null,
$category = null
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
DbContext $context,
RuleFactory $ruleFactory,
SerializerInterface $serializer,
array $containerToLimitationDataMapping = [],
$connectionName = null
Function determineUnitForFormatting
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function determineUnitForFormatting(scale, numTicks, minUnit, min, max) {
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
\Magento\Backend\Block\Context $context,
\Magento\Framework\Data\FormFactory $formFactory,
\Smile\ElasticsuiteCatalogRule\Model\RuleFactory $ruleFactory,
\Magento\Framework\Registry $registry,
array $data = []
Function getNearestItems
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function getNearestItems(chart, position, axis, intersect, useFinalPosition) {
Function lttbDecimation
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function lttbDecimation(data, start, count, availableWidth, options) {
Function optimizedEvaluateItems
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function optimizedEvaluateItems(chart, axis, position, handler, intersect) {
Function skip
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function skip(ticks, newTicks, spacing, majorStart, majorEnd) {
Function determineLimits
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function determineLimits(angle, pos, size, min, max) {
Function _steppedLineTo
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function _steppedLineTo(ctx, previous, target, flip, mode) {
Function _createResolver
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function _createResolver(scopes, prefixes = [''], rootScopes = scopes, fallback, getTarget = () => scopes[0]) {