Simple::loadData()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
eloc 3
c 1
b 0
f 0
nc 2
nop 0
dl 0
loc 7
ccs 5
cts 5
cp 1
crap 2
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace EasyDictionary\Dictionary;
6
7
use EasyDictionary\AbstractDictionary;
8
9
/**
10
 * Class Simple
11
 *
12
 * @package EasyDictionary\Dictionary
13
 */
14
class Simple extends AbstractDictionary
15
{
16
    /**
17
     * @inheritdoc
18
     */
19 14
    protected function loadData(): iterable
20
    {
21 14
        $dataProvider = $this->getDataProvider();
22
23 14
        return is_null($dataProvider)
24 1
            ? []
25 14
            : $dataProvider->getData($this->dataProviderFilter);
26
    }
27
}
28