SolrReindexTest_TestHandler::processGroup()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 3
Bugs 1 Features 1
Metric Value
cc 1
eloc 3
c 3
b 1
f 1
nc 1
nop 7
dl 0
loc 12
rs 10
1
<?php
2
3
namespace SilverStripe\FullTextSearch\Tests\SolrReindexTest;
4
5
use SilverStripe\FullTextSearch\Solr\Reindex\Handlers\SolrReindexBase;
6
use Psr\Log\LoggerInterface;
7
use SilverStripe\FullTextSearch\Solr\SolrIndex;
8
9
/**
10
 * Provides a wrapper for testing SolrReindexBase
11
 */
12
class SolrReindexTest_TestHandler extends SolrReindexBase
13
{
14
    public function processGroup(
15
        LoggerInterface $logger,
16
        SolrIndex $indexInstance,
17
        $state,
18
        $class,
19
        $groups,
20
        $group,
21
        $taskName
22
    ) {
23
        $indexName = $indexInstance->getIndexName();
24
        $stateName = json_encode($state);
25
        $logger->info("Called processGroup with {$indexName}, {$stateName}, {$class}, group {$group} of {$groups}");
26
    }
27
28
    public function triggerReindex(LoggerInterface $logger, $batchSize, $taskName, $classes = null)
29
    {
30
        $logger->info("Called triggerReindex");
31
    }
32
}
33