SolrCoreServiceExtension   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 2
c 1
b 0
f 0
dl 0
loc 12
ccs 2
cts 2
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A coreIsActive() 0 3 1
1
<?php
2
/**
3
 * class SolrCoreServiceExtension|Firesphere\SolrCompatibility\Extensions\SolrCoreServiceExtension add the old
4
 * active state check
5
 *
6
 * @package Firesphere\Solr\Compatibility
7
 * @author Simon `Firesphere` Erkelens; Marco `Sheepy` Hermo
8
 * @copyright Copyright (c) 2018 - now() Firesphere & Sheepy
9
 */
10
11
namespace Firesphere\SolrCompatibility\Extensions;
12
13
use Firesphere\SolrSearch\Services\SolrCoreService;
14
use SilverStripe\Core\Extension;
15
use Solarium\QueryType\Server\CoreAdmin\Result\StatusResult;
16
17
/**
18
 * Class \Firesphere\SolrCompatibility\Extensions\SolrCoreServiceExtension
19
 *
20
 * Add the old coreIsActive method to the Service for backward compatibility
21
 *
22
 * @property SolrCoreService|SolrCoreServiceExtension $owner
23
 */
24
class SolrCoreServiceExtension extends Extension
25
{
26
    /**
27
     * Check the status of a core
28
     *
29
     * @param string $core
30
     * @return StatusResult|null
31
     * @deprecated backward compatibility stub
32
     */
33 1
    public function coreIsActive($core)
34
    {
35 1
        return $this->owner->coreStatus($core);
36
    }
37
}
38