Showing 12 of 12 total issues
IndexStatsProvider
has 11 functions (exceeds 10 allowed). Consider refactoring. Open
class IndexStatsProvider{ /** * Cache Key Prefix. */
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
CacheHelper $cacheHelper, ClientInterface $client, IndicesList $indicesList, IndexStatusProvider $indexStatusProvider, LoggerInterface $logger
Function getElasticSuiteIndices
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function getElasticSuiteIndices($params = []): array { if ($this->elasticsuiteIndices === null) { $this->elasticsuiteIndices = [];
- Read upRead up
Assigning array{}
to property but \Smile\ElasticsuiteIndices\Model\IndexStatsProvider->elasticsuiteIndices
is null
Open
$this->elasticsuiteIndices = [];
- Exclude checks
Argument 1 (array_arg)
is null
but \ksort()
takes array
Open
ksort($this->elasticsuiteIndices, SORT_STRING | SORT_NATURAL);
- Exclude checks
Assigning array<string>|array<string></string></string>
to property but \Smile\ElasticsuiteIndices\Model\IndexStatsProvider->indicesStats
is null
Open
$this->indicesStats[$indexName] = current($indexStatsResponse['indices']);
- Exclude checks
Suspicious array access to null
Open
$this->elasticsuiteIndices[$name] = $aliases ? key($aliases['aliases']) : null;
- Exclude checks
Suspicious array access to null
Open
$this->indicesStats[$indexName] = current($indexStatsResponse['indices']);
- Exclude checks
Assigning false[]|int[]|null[]|string[]
to property but \Smile\ElasticsuiteIndices\Model\IndexStatsProvider->elasticsuiteIndices
is null
Open
$this->elasticsuiteIndices[$name] = $aliases ? key($aliases['aliases']) : null;
- Exclude checks
Assigning array{}
to property but \Smile\ElasticsuiteIndices\Model\IndexStatsProvider->indicesStats
is null
Open
$this->indicesStats = [];
- Exclude checks
Similar blocks of code found in 2 locations. Consider refactoring. Open
public function getShardsConfiguration($indexName) { // Retrieve the index settings. $indexSettings = $this->getIndexSettings($indexName);
- Read upRead up
Similar blocks of code found in 2 locations. Consider refactoring. Open
public function getReplicasConfiguration($indexName) { // Retrieve the index settings. $indexSettings = $this->getIndexSettings($indexName);
- Read upRead up