Completed
Push — develop ( 3ee9cc...870d86 )
by Adrien
29:45
created

WriterPart::setParentWriter()   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
ccs 0
cts 3
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace PhpOffice\PhpSpreadsheet\Writer\Xlsx;
4
5
/**
6
 * Copyright (c) 2006 - 2015 PhpSpreadsheet.
7
 *
8
 * This library is free software; you can redistribute it and/or
9
 * modify it under the terms of the GNU Lesser General Public
10
 * License as published by the Free Software Foundation; either
11
 * version 2.1 of the License, or (at your option) any later version.
12
 *
13
 * This library is distributed in the hope that it will be useful,
14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16
 * Lesser General Public License for more details.
17
 *
18
 * You should have received a copy of the GNU Lesser General Public
19
 * License along with this library; if not, write to the Free Software
20
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21
 *
22
 * @category   PhpSpreadsheet
23
 *
24
 * @copyright  Copyright (c) 2006 - 2015 PhpSpreadsheet (https://github.com/PHPOffice/PhpSpreadsheet)
25
 * @license    http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt    LGPL
26
 */
27
abstract class WriterPart
28
{
29
    /**
30
     * Parent Xlsx object.
31
     *
32
     * @var \PhpOffice\PhpSpreadsheet\Writer\Xlsx
33
     */
34
    private $parentWriter;
35
36
    /**
37
     * Get parent Xlsx object.
38
     *
39
     * @throws \PhpOffice\PhpSpreadsheet\Writer\Exception
40
     *
41
     * @return \PhpOffice\PhpSpreadsheet\Writer\Xlsx
42
     */
43 52
    public function getParentWriter()
44
    {
45 52
        return $this->parentWriter;
46
    }
47
48
    /**
49
     * Set parent Xlsx object.
50
     *
51
     * @param \PhpOffice\PhpSpreadsheet\Writer\Xlsx $pWriter
52
     */
53 52
    public function __construct(\PhpOffice\PhpSpreadsheet\Writer\Xlsx $pWriter)
54
    {
55 52
        $this->parentWriter = $pWriter;
56 52
    }
57
}
58