Passed
Push — master ( eff61e...76df74 )
by Gordon
02:24
created

IndexCreator   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 3
eloc 6
c 2
b 0
f 0
dl 0
loc 23
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A createIndex() 0 3 1
A getIndexName() 0 3 1
A getIndexStoredFields() 0 3 1
1
<?php declare(strict_types = 1);
2
3
namespace Suilven\FreeTextSearch\Tests\Mock;
4
5
// @phpcs:disable SlevomatCodingStandard.Functions.UnusedParameter.UnusedParameter
6
class IndexCreator extends \Suilven\FreeTextSearch\Base\IndexCreator implements
7
    \Suilven\FreeTextSearch\Interfaces\IndexCreator
8
{
9
10
    /** @var string */
11
    private static $indexName;
12
13
    public function createIndex(string $indexName): void
14
    {
15
        self::$indexName = $indexName;
16
    }
17
18
19
    /** @return array<string> */
20
    public function getIndexStoredFields(): array
21
    {
22
        return $this->getStoredFields('sitetree');
23
    }
24
25
26
    public static function getIndexName(): string
27
    {
28
        return self::$indexName;
29
    }
30
}
31