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