Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
10 / 10
100.00% covered (success)
100.00%
10 / 10
CRAP
100.00% covered (success)
100.00%
1 / 1
TrackChangesView
100.00% covered (success)
100.00%
10 / 10
100.00% covered (success)
100.00%
10 / 10
15
100.00% covered (success)
100.00%
1 / 1
 hasMarkup
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setMarkup
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
2
 hasComments
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setComments
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
2
 hasInsDel
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setInsDel
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
2
 hasFormatting
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setFormatting
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
2
 hasInkAnnotations
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setInkAnnotations
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
2
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
19namespace PhpOffice\PhpWord\ComplexType;
20
21/**
22 * Visibility of Annotation Types.
23 *
24 * @see http://www.datypic.com/sc/ooxml/e-w_revisionView-1.html
25 */
26final class TrackChangesView
27{
28    /**
29     * Display Visual Indicator Of Markup Area.
30     *
31     * @var bool
32     */
33    private $markup;
34
35    /**
36     * Display Comments.
37     *
38     * @var bool
39     */
40    private $comments;
41
42    /**
43     * Display Content Revisions.
44     *
45     * @var bool
46     */
47    private $insDel;
48
49    /**
50     * Display Formatting Revisions.
51     *
52     * @var bool
53     */
54    private $formatting;
55
56    /**
57     * Display Ink Annotations.
58     *
59     * @var bool
60     */
61    private $inkAnnotations;
62
63    /**
64     * Get Display Visual Indicator Of Markup Area.
65     *
66     * @return bool True if markup is shown
67     */
68    public function hasMarkup()
69    {
70        return $this->markup;
71    }
72
73    /**
74     * Set Display Visual Indicator Of Markup Area.
75     *
76     * @param ?bool $markup
77     *            Set to true to show markup
78     */
79    public function setMarkup($markup): void
80    {
81        $this->markup = $markup === null ? true : $markup;
82    }
83
84    /**
85     * Get Display Comments.
86     *
87     * @return bool True if comments are shown
88     */
89    public function hasComments()
90    {
91        return $this->comments;
92    }
93
94    /**
95     * Set Display Comments.
96     *
97     * @param ?bool $comments
98     *            Set to true to show comments
99     */
100    public function setComments($comments): void
101    {
102        $this->comments = $comments === null ? true : $comments;
103    }
104
105    /**
106     * Get Display Content Revisions.
107     *
108     * @return bool True if content revisions are shown
109     */
110    public function hasInsDel()
111    {
112        return $this->insDel;
113    }
114
115    /**
116     * Set Display Content Revisions.
117     *
118     * @param ?bool $insDel
119     *            Set to true to show content revisions
120     */
121    public function setInsDel($insDel): void
122    {
123        $this->insDel = $insDel === null ? true : $insDel;
124    }
125
126    /**
127     * Get Display Formatting Revisions.
128     *
129     * @return bool True if formatting revisions are shown
130     */
131    public function hasFormatting()
132    {
133        return $this->formatting;
134    }
135
136    /**
137     * Set Display Formatting Revisions.
138     *
139     * @param null|bool $formatting
140     *            Set to true to show formatting revisions
141     */
142    public function setFormatting($formatting = null): void
143    {
144        $this->formatting = $formatting === null ? true : $formatting;
145    }
146
147    /**
148     * Get Display Ink Annotations.
149     *
150     * @return bool True if ink annotations are shown
151     */
152    public function hasInkAnnotations()
153    {
154        return $this->inkAnnotations;
155    }
156
157    /**
158     * Set Display Ink Annotations.
159     *
160     * @param ?bool $inkAnnotations
161     *            Set to true to show ink annotations
162     */
163    public function setInkAnnotations($inkAnnotations): void
164    {
165        $this->inkAnnotations = $inkAnnotations === null ? true : $inkAnnotations;
166    }
167}