Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
7 / 7 |
|
100.00% |
7 / 7 |
CRAP | |
100.00% |
1 / 1 |
BreakElement | |
100.00% |
7 / 7 |
|
100.00% |
7 / 7 |
7 | |
100.00% |
1 / 1 |
__construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getText | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setText | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getFont | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setLanguage | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getLanguage | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getHashCode | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 |
1 | <?php |
2 | /** |
3 | * This file is part of PHPPresentation - A pure PHP library for reading and writing |
4 | * presentations documents. |
5 | * |
6 | * PHPPresentation 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/PHPPresentation/contributors. |
12 | * |
13 | * @see https://github.com/PHPOffice/PHPPresentation |
14 | * |
15 | * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 |
16 | */ |
17 | |
18 | declare(strict_types=1); |
19 | |
20 | namespace PhpOffice\PhpPresentation\Shape\RichText; |
21 | |
22 | use PhpOffice\PhpPresentation\Style\Font; |
23 | |
24 | /** |
25 | * Rich text break. |
26 | */ |
27 | class BreakElement implements TextElementInterface |
28 | { |
29 | /** |
30 | * Create a new \PhpOffice\PhpPresentation\Shape\RichText\Break instance. |
31 | */ |
32 | public function __construct() |
33 | { |
34 | } |
35 | |
36 | /** |
37 | * Get text. |
38 | * |
39 | * @return string Text |
40 | */ |
41 | public function getText() |
42 | { |
43 | return "\r\n"; |
44 | } |
45 | |
46 | /** |
47 | * Set text. |
48 | * |
49 | * @param string $pText Text value |
50 | */ |
51 | public function setText($pText = ''): self |
52 | { |
53 | return $this; |
54 | } |
55 | |
56 | /** |
57 | * Get font. |
58 | */ |
59 | public function getFont(): ?Font |
60 | { |
61 | return null; |
62 | } |
63 | |
64 | /** |
65 | * Set language. |
66 | * |
67 | * @param string $lang |
68 | */ |
69 | public function setLanguage($lang): self |
70 | { |
71 | return $this; |
72 | } |
73 | |
74 | /** |
75 | * Get language. |
76 | */ |
77 | public function getLanguage(): ?string |
78 | { |
79 | return null; |
80 | } |
81 | |
82 | /** |
83 | * Get hash code. |
84 | * |
85 | * @return string Hash code |
86 | */ |
87 | public function getHashCode(): string |
88 | { |
89 | return md5(__CLASS__); |
90 | } |
91 | } |