Passed
Push — master ( 14b05a...fa6902 )
by Daniel
02:41
created

Csv::setEnclosure()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php declare(strict_types=1);
2
3
/**
4
 * This file is part of the Csv-Machine package.
5
 *
6
 * (c) Dan McAdams <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace RoadBunch\Csv;
13
14
15
/**
16
 * Class Csv
17
 *
18
 * @author  Dan McAdams
19
 * @package RoadBunch\Csv
20
 */
21
class Csv implements CsvInterface
22
{
23
    protected $delimiter = Delimiter::DELIMITER_COMMA;
24
    protected $enclosure = Enclosure::ENCLOSURE_DOUBLE_QUOTE;
25
    protected $newline   = Newline::NEWLINE_LF;
26
    protected $escape    = Escape::ESCAPE_CHAR;
27
28
    /**
29
     * @param string $delimiter
30
     */
31 1
    public function setDelimiter(string $delimiter)
32
    {
33 1
        $this->delimiter = $delimiter;
34 1
    }
35
36
    /**
37
     * @param string $enclosure
38
     */
39 1
    public function setEnclosure(string $enclosure)
40
    {
41 1
        $this->enclosure = $enclosure;
42 1
    }
43
44
    /**
45
     * @param string $newline
46
     */
47 1
    public function setNewline(string $newline)
48
    {
49 1
        $this->newline = $newline;
50 1
    }
51
52
    /**
53
     * @param string $escape
54
     */
55 1
    public function setEscape(string $escape)
56
    {
57 1
        $this->escape = $escape;
58 1
    }
59
}
60