@@ -15,38 +15,38 @@ |
||
15 | 15 | */ |
16 | 16 | class SolrIndexCheck implements EnvironmentCheck |
17 | 17 | { |
18 | - /** |
|
19 | - * {@inheritDoc} |
|
20 | - * |
|
21 | - * @return array |
|
22 | - */ |
|
23 | - public function check() |
|
24 | - { |
|
25 | - $brokenCores = []; |
|
18 | + /** |
|
19 | + * {@inheritDoc} |
|
20 | + * |
|
21 | + * @return array |
|
22 | + */ |
|
23 | + public function check() |
|
24 | + { |
|
25 | + $brokenCores = []; |
|
26 | 26 | |
27 | - if (!class_exists(Solr::class)) { |
|
28 | - return [ |
|
29 | - EnvironmentCheck::ERROR, |
|
30 | - 'Class `' . Solr::class . '` not found. Is the fulltextsearch module installed?' |
|
31 | - ]; |
|
32 | - } |
|
27 | + if (!class_exists(Solr::class)) { |
|
28 | + return [ |
|
29 | + EnvironmentCheck::ERROR, |
|
30 | + 'Class `' . Solr::class . '` not found. Is the fulltextsearch module installed?' |
|
31 | + ]; |
|
32 | + } |
|
33 | 33 | |
34 | - $service = Solr::service(); |
|
35 | - foreach (Solr::get_indexes() as $index) { |
|
36 | - /** @var SolrIndex $core */ |
|
37 | - $core = $index->getIndexName(); |
|
38 | - if (!$service->coreIsActive($core)) { |
|
39 | - $brokenCores[] = $core; |
|
40 | - } |
|
41 | - } |
|
34 | + $service = Solr::service(); |
|
35 | + foreach (Solr::get_indexes() as $index) { |
|
36 | + /** @var SolrIndex $core */ |
|
37 | + $core = $index->getIndexName(); |
|
38 | + if (!$service->coreIsActive($core)) { |
|
39 | + $brokenCores[] = $core; |
|
40 | + } |
|
41 | + } |
|
42 | 42 | |
43 | - if (!empty($brokenCores)) { |
|
44 | - return [ |
|
45 | - EnvironmentCheck::ERROR, |
|
46 | - 'The following indexes are unavailable: ' . implode($brokenCores, ', ') |
|
47 | - ]; |
|
48 | - } |
|
43 | + if (!empty($brokenCores)) { |
|
44 | + return [ |
|
45 | + EnvironmentCheck::ERROR, |
|
46 | + 'The following indexes are unavailable: ' . implode($brokenCores, ', ') |
|
47 | + ]; |
|
48 | + } |
|
49 | 49 | |
50 | - return [EnvironmentCheck::OK, 'Expected indexes are available.']; |
|
51 | - } |
|
50 | + return [EnvironmentCheck::OK, 'Expected indexes are available.']; |
|
51 | + } |
|
52 | 52 | } |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | if (!class_exists(Solr::class)) { |
28 | 28 | return [ |
29 | 29 | EnvironmentCheck::ERROR, |
30 | - 'Class `' . Solr::class . '` not found. Is the fulltextsearch module installed?' |
|
30 | + 'Class `'.Solr::class.'` not found. Is the fulltextsearch module installed?' |
|
31 | 31 | ]; |
32 | 32 | } |
33 | 33 | |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | if (!empty($brokenCores)) { |
44 | 44 | return [ |
45 | 45 | EnvironmentCheck::ERROR, |
46 | - 'The following indexes are unavailable: ' . implode($brokenCores, ', ') |
|
46 | + 'The following indexes are unavailable: '.implode($brokenCores, ', ') |
|
47 | 47 | ]; |
48 | 48 | } |
49 | 49 |