Completed
Push — develop ( 29208e...50a0ec )
by Adrien
05:34
created

WriterPart::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 4
rs 10
c 0
b 0
f 0
ccs 0
cts 3
cp 0
crap 2
1
<?php
2
3
namespace PhpOffice\PhpSpreadsheet\Writer\Xlsx;
4
5
use PhpOffice\PhpSpreadsheet\Writer\Xlsx;
6
7
abstract class WriterPart
8
{
9
    /**
10
     * Parent Xlsx object.
11
     *
12
     * @var Xlsx
13
     */
14
    private $parentWriter;
15
16
    /**
17
     * Get parent Xlsx object.
18
     *
19
     * @throws \PhpOffice\PhpSpreadsheet\Writer\Exception
20
     *
21
     * @return Xlsx
22
     */
23
    public function getParentWriter()
24
    {
25
        return $this->parentWriter;
26
    }
27
28
    /**
29
     * Set parent Xlsx object.
30
     *
31
     * @param Xlsx $pWriter
32
     */
33
    public function __construct(Xlsx $pWriter)
34
    {
35
        $this->parentWriter = $pWriter;
36
    }
37
}
38