@@ -298,6 +298,7 @@ protected function _findValueSeparator($quantileNumber, IntervalInterface $inter
298
298
$ interval ->load ($ intervalValuesCount + 1 , $ offset , $ lowerValue , $ this ->_upperLimit )
299
299
);
300
300
}
301
+ // phpcs:ignore Generic.CodeAnalysis.ForLoopWithTestFunctionCall
301
302
$ lastValue = $ this ->offsetLimits ($ intervalValuesCount , $ values );
302
303
$ bestRoundValue = [];
303
304
@@ -500,6 +501,7 @@ protected function _mergeRoundValues(&$oldRoundValues, &$newRoundValues)
500
501
foreach ($ newRoundValues as $ roundingFactor => $ roundValueValues ) {
501
502
if (array_key_exists ($ roundingFactor , $ oldRoundValues )) {
502
503
$ oldRoundValues [$ roundingFactor ] = array_unique (
504
+ // phpcs:ignore Magento2.Performance.ForeachArrayMerge
503
505
array_merge ($ oldRoundValues [$ roundingFactor ], $ roundValueValues )
504
506
);
505
507
} else {
@@ -554,6 +556,7 @@ protected function _findBestSeparator($quantileNumber, $separators)
554
556
555
557
/**
556
558
* Search first index of value, that satisfy conditions to be 'greater or equal' than $value
559
+ *
557
560
* Returns -1 if index was not found
558
561
*
559
562
* @param float $value
@@ -596,6 +599,13 @@ protected function _binarySearch($value, $limits = null)
596
599
return $ this ->_binarySearch ($ value , [$ limits [0 ], $ limits [1 ]]);
597
600
}
598
601
602
+ /**
603
+ * Get the offsetLimit value
604
+ *
605
+ * @param $intervalValuesCount
606
+ * @param $values
607
+ * @return mixed
608
+ */
599
609
private function offsetLimits ($ intervalValuesCount , $ values )
600
610
{
601
611
if (array_key_exists ((int )$ intervalValuesCount - 1 , $ values )) {
0 commit comments