BulkEntityReader::getConfigurationFields()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Actualys\Bundle\DrupalCommerceConnectorBundle\Reader\ORM;
4
5
use Pim\Bundle\BaseConnectorBundle\Reader\ORM\EntityReader;
6
7
/**
8
 * Reads all entities at once
9
 *
10
 * @author    Gildas Quemener <[email protected]>
11
 * @copyright 2013 Akeneo SAS (http://www.akeneo.com)
12
 * @license   http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
13
 */
14
class BulkEntityReader extends EntityReader
15
{
16
    /**
17
     * @return array|mixed|null
18
     */
19 View Code Duplication
    public function read()
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
20
    {
21
        $entities = [];
22
23
        while ($entity = parent::read()) {
24
            $entities[] = $entity;
25
            $this->stepExecution->incrementReadCount();
26
        }
27
28
        return empty($entities) ? null : $entities;
29
    }
30
31
    /**
32
     * @return array
33
     */
34
    public function getConfigurationFields()
35
    {
36
        return array();
37
    }
38
}
39