Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
75.00% |
3 / 4 |
|
75.00% |
3 / 4 |
CRAP | |
0.00% |
0 / 1 |
| AnimateMotion | |
75.00% |
3 / 4 |
|
75.00% |
3 / 4 |
4.25 | |
0.00% |
0 / 1 |
| __construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| path | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| rotate | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| keyPoints | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace Phpdftk\Svg; |
| 6 | |
| 7 | /** |
| 8 | * SVG 2 §19.6 — `<animateMotion>` moves an element along a path. |
| 9 | * `path` carries the SVG-path data; `rotate` controls whether the |
| 10 | * element rotates to follow the tangent. |
| 11 | */ |
| 12 | final class AnimateMotion extends Animation |
| 13 | { |
| 14 | public function __construct() |
| 15 | { |
| 16 | parent::__construct('animateMotion'); |
| 17 | } |
| 18 | |
| 19 | public function path(): ?string |
| 20 | { |
| 21 | return $this->getAttribute('path'); |
| 22 | } |
| 23 | |
| 24 | public function rotate(): ?string |
| 25 | { |
| 26 | return $this->getAttribute('rotate'); |
| 27 | } |
| 28 | |
| 29 | public function keyPoints(): ?string |
| 30 | { |
| 31 | return $this->getAttribute('keyPoints'); |
| 32 | } |
| 33 | } |