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
MPath
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%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 href
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3declare(strict_types=1);
4
5namespace Phpdftk\Svg;
6
7/**
8 * SVG 2 §19.6 — `<mpath>` child of `<animateMotion>` that
9 * references a path by `href` (or legacy `xlink:href`) instead
10 * of carrying inline path data via the `path` attribute on the
11 * parent.
12 */
13final class MPath extends Element
14{
15    public function __construct()
16    {
17        parent::__construct('mpath');
18    }
19
20    public function href(): ?string
21    {
22        return $this->getAttribute('href')
23            ?? $this->getAttribute('xlink:href');
24    }
25}