Showing 7 of 7 total issues
Function migrateDailyToMonthlyIndices
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
public function migrateDailyToMonthlyIndices(): void { $indexIdentifiers = [SessionIndexInterface::INDEX_IDENTIFIER, EventIndexInterface::INDEX_IDENTIFIER]; foreach ($indexIdentifiers as $indexIdentifier) {
- Read upRead up
Function keepLatest
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function keepLatest(int $number) { if ($number === 0) { return; }
- Read upRead up
Method __construct
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
\Magento\Store\Model\StoreManagerInterface $storeManager, \Smile\ElasticsuiteCore\Api\Index\IndexSettingsInterface $indexSettings, \Smile\ElasticsuiteCore\Api\Client\ClientInterface $client, \Smile\ElasticsuiteCore\Api\Index\IndexOperationInterface $indexOperation, \Smile\ElasticsuiteTracker\Model\EventIndex\DateBounds $dateBounds,
Function getIndicesToDelete
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
protected function getIndicesToDelete(\DateTime $thresholdDate, array $indices, string $indexAlias): array { $indicesToDelete = []; foreach ($indices as $index) { $date = str_replace("{$indexAlias}_", '', $index);
- Read upRead up
Possibly zero references to use statement for classlike/namespace SessionIndex
(\Smile\ElasticsuiteTracker\Model\ResourceModel\SessionIndex)
Open
use Smile\ElasticsuiteTracker\Model\ResourceModel\SessionIndex;
- Exclude checks
Possibly zero references to use statement for classlike/namespace LoggerInterface
(\Psr\Log\LoggerInterface)
Open
use Psr\Log\LoggerInterface;
- Exclude checks
Similar blocks of code found in 8 locations. Consider refactoring. Open
public function __construct( \Magento\Store\Model\StoreManagerInterface $storeManager, \Smile\ElasticsuiteCore\Api\Index\IndexSettingsInterface $indexSettings, \Smile\ElasticsuiteCore\Api\Client\ClientInterface $client, \Smile\ElasticsuiteCore\Api\Index\IndexOperationInterface $indexOperation,
- Read upRead up