Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
3 / 3 |
|
100.00% |
2 / 2 |
CRAP | |
100.00% |
1 / 1 |
Footnote | |
100.00% |
3 / 3 |
|
100.00% |
2 / 2 |
2 | |
100.00% |
1 / 1 |
__construct | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
getParagraphStyle | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 |
1 | <?php |
2 | |
3 | /** |
4 | * This file is part of PHPWord - A pure PHP library for reading and writing |
5 | * word processing documents. |
6 | * |
7 | * PHPWord is free software distributed under the terms of the GNU Lesser |
8 | * General Public License version 3 as published by the Free Software Foundation. |
9 | * |
10 | * For the full copyright and license information, please read the LICENSE |
11 | * file that was distributed with this source code. For the full list of |
12 | * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. |
13 | * |
14 | * @see https://github.com/PHPOffice/PHPWord |
15 | * |
16 | * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 |
17 | */ |
18 | |
19 | namespace PhpOffice\PhpWord\Element; |
20 | |
21 | use PhpOffice\PhpWord\Style\Paragraph; |
22 | |
23 | class Footnote extends AbstractContainer |
24 | { |
25 | /** |
26 | * @var string Container type |
27 | */ |
28 | protected $container = 'Footnote'; |
29 | |
30 | /** |
31 | * Paragraph style. |
32 | * |
33 | * @var null|Paragraph|string |
34 | */ |
35 | protected $paragraphStyle; |
36 | |
37 | /** |
38 | * Is part of collection. |
39 | * |
40 | * @var bool |
41 | */ |
42 | protected $collectionRelation = true; |
43 | |
44 | /** |
45 | * Create new instance. |
46 | * |
47 | * @param array|Paragraph|string $paragraphStyle |
48 | */ |
49 | public function __construct($paragraphStyle = null) |
50 | { |
51 | $this->paragraphStyle = $this->setNewStyle(new Paragraph(), $paragraphStyle); |
52 | $this->setDocPart($this->container); |
53 | } |
54 | |
55 | /** |
56 | * Get paragraph style. |
57 | * |
58 | * @return null|Paragraph|string |
59 | */ |
60 | public function getParagraphStyle() |
61 | { |
62 | return $this->paragraphStyle; |
63 | } |
64 | } |