Completed
Push — master ( c56780...0a78d5 )
by GBProd
02:21
created

DataProvider::flushBulk()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 2
Bugs 0 Features 0
Metric Value
c 2
b 0
f 0
dl 0
loc 7
ccs 5
cts 5
cp 1
rs 9.4285
cc 1
eloc 4
nc 1
nop 0
crap 1
1
<?php
2
3
namespace GBProd\ElasticsearchDataProviderBundle\DataProvider;
4
5
use Elasticsearch\Client;
6
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
7
8
/**
9
 * Interface for dataprovider
10
 *
11
 * @author gbprod <[email protected]>
12
 */
13
interface DataProvider
14
{
15
    /**
16
     * Populate index
17
     *
18
     * @param Client                   $client
19
     * @param string                   $index
20
     * @param string                   $type
21
     * @param EventDispatcherInterface $dispatcher
22
     *
23
     * @return void
24
     */
25
    public function run(Client $client, $index, $type, EventDispatcherInterface $dispatcher);
26
27
    /**
28
     * Number of documents that should be indexed
29
     *
30
     * @return int
31
     */
32
    public function count();
33
}
34