Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
8 / 8 |
|
100.00% |
5 / 5 |
CRAP | |
100.00% |
1 / 1 |
Superscript | |
100.00% |
8 / 8 |
|
100.00% |
5 / 5 |
5 | |
100.00% |
1 / 1 |
__construct | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
getBase | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getSuperscript | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setBase | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
setSuperscript | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 |
1 | <?php |
2 | |
3 | namespace PhpOffice\Math\Element; |
4 | |
5 | class Superscript extends AbstractElement |
6 | { |
7 | /** |
8 | * @var AbstractElement |
9 | */ |
10 | protected $base; |
11 | |
12 | /** |
13 | * @var AbstractElement |
14 | */ |
15 | protected $superscript; |
16 | |
17 | public function __construct(AbstractElement $base, AbstractElement $superscript) |
18 | { |
19 | $this->setBase($base); |
20 | $this->setSuperscript($superscript); |
21 | } |
22 | |
23 | public function getBase(): AbstractElement |
24 | { |
25 | return $this->base; |
26 | } |
27 | |
28 | public function getSuperscript(): AbstractElement |
29 | { |
30 | return $this->superscript; |
31 | } |
32 | |
33 | public function setBase(AbstractElement $element): self |
34 | { |
35 | $this->base = $element; |
36 | |
37 | return $this; |
38 | } |
39 | |
40 | public function setSuperscript(AbstractElement $element): self |
41 | { |
42 | $this->superscript = $element; |
43 | |
44 | return $this; |
45 | } |
46 | } |