RowBuilderFactory::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
namespace Akeneo\Component\SpreadsheetParser\Xlsx;
4
5
/**
6
 * Factory for RowBuilder objects
7
 *
8
 * @author    Antoine Guigan <[email protected]>
9
 * @copyright 2014 Akeneo SAS (http://www.akeneo.com)
10
 * @license   http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
11
 */
12
13
class RowBuilderFactory
14
{
15
16
    /**
17
     *
18
     * @var string
19
     */
20
    protected $rowBuilderClass;
21
22
    /**
23
     * Constructor
24
     *
25
     * @param string $rowBuilderClass
26
     */
27
    public function __construct($rowBuilderClass)
28
    {
29
        $this->rowBuilderClass = $rowBuilderClass;
30
    }
31
32
    /**
33
     * Creates a RowBuilder object
34
     *
35
     * @return RowBuilder
36
     */
37
    public function create()
38
    {
39
        return new $this->rowBuilderClass();
40
    }
41
}
42