Code Duplication    Length = 9-9 lines in 2 locations

src/xsDayTimeDuration.php 1 location

@@ 20-28 (lines=9) @@
17
 * - If no time items (hour, minute, second) are present, the letter T must not appear.
18
 * @package AlgoWeb\xsdTypes
19
 */
20
class xsDayTimeDuration extends xsDuration
21
{
22
    public function fixValue()
23
    {
24
        parent::fixValue();
25
        $v = new \DateInterval($this->value);
26
        $this->value = $this->format($v, 'PnDTnHnMnS');
27
    }
28
}
29

src/xsYearMonthDuration.php 1 location

@@ 19-27 (lines=9) @@
16
 * Schema 1.0 specification and is therefore not supported for use in XML Schema 1.0 schemas.
17
 * @package AlgoWeb\xsdTypes
18
 */
19
class xsYearMonthDuration extends xsDuration
20
{
21
    public function fixValue()
22
    {
23
        parent::fixValue();
24
        $v = new \DateInterval($this->value);
25
        $this->value = $this->format($v, 'PnYnM');
26
    }
27
}
28