Passed
Push — master ( aa67e9...f960a1 )
by De Cramer
02:31
created

AbstractCsvFile   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
dl 0
loc 31
ccs 0
cts 6
cp 0
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
1
<?php
2
3
namespace Oliverde8\Component\PhpEtl\Model\File;
4
5
/**
6
 * Class AbstractFile
7
 *
8
 * @author    de Cramer Oliver<[email protected]>
9
 * @copyright 2018 Oliverde8
10
 * @package Oliverde8\Component\PhpEtl\Model\File
11
 */
12
class AbstractCsvFile
13
{
14
    /** @var String */
15
    protected $filePath;
16
17
    /** @var string */
18
    protected $delimiter;
19
20
    /** @var string */
21
    protected $enclosure;
22
23
    /** @var string */
24
    protected $escape;
25
26
    /** @var resource File pointer */
27
    protected $file = null;
28
29
    /**
30
     * Reader constructor.
31
     *
32
     * @param string $filePath  Path to the csv file.
33
     * @param string $delimiter Delimiter to use for the csv file.
34
     * @param string $enclosure Enclosure to use for the csv file.
35
     * @param string $escape    Escape to use for the csv file.
36
     */
37
    public function __construct($filePath, $delimiter = ';', $enclosure = '"', $escape = '\\')
38
    {
39
        $this->filePath = $filePath;
40
        $this->delimiter = $delimiter;
41
        $this->enclosure = $enclosure;
42
        $this->escape = $escape;
43
    }
44
}
45