Code Duplication    Length = 9-9 lines in 2 locations

src/xsDayTimeDuration.php 1 location

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

src/xsYearMonthDuration.php 1 location

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