Code Duplication    Length = 32-32 lines in 2 locations

src/xsENTITIES.php 1 location

@@ 10-41 (lines=32) @@
7
 *
8
 * @package AlgoWeb\xsdTypes
9
 */
10
class xsENTITIES extends xsAnySimpleType
11
{
12
    /**
13
     * Construct
14
     *
15
     * @param mixed $value
16
     */
17
    public function __construct($value)
18
    {
19
        parent::__construct($value);
20
        $this->setMinLengthFacet(1);
21
    }
22
23
    protected function fixValue($value)
24
    {
25
        foreach ($value as $v) {
26
            $v->fixValue($v);
27
        }
28
    }
29
30
    protected function isOK($value)
31
    {
32
        if (!is_array($value)) {
33
            throw new \InvalidArgumentException(
34
                "the provided value for " . __CLASS__ . " Must be an array of type xsIDREF "
35
            );
36
        }
37
        foreach ($value as $v) {
38
            $v->isOKInternal();
39
        }
40
    }
41
}
42

src/xsIDREFS.php 1 location

@@ 6-37 (lines=32) @@
3
namespace AlgoWeb\xsdTypes;
4
5
6
class xsIDREFS extends xsAnySimpleType
7
{
8
    /**
9
     * Construct
10
     *
11
     * @param mixed $value
12
     */
13
    public function __construct($value)
14
    {
15
        parent::__construct($value);
16
        $this->setMinLengthFacet(1);
17
    }
18
19
    protected function fixValue($value)
20
    {
21
        foreach ($value as $v) {
22
            $v->fixValue($v);
23
        }
24
    }
25
26
    protected function isOK($value)
27
    {
28
        if (!is_array($value)) {
29
            throw new \InvalidArgumentException(
30
                "the provided value for " . __CLASS__ . " Must be an array of type xsIDREF "
31
            );
32
        }
33
        foreach ($value as $v) {
34
            $v->isOKInternal();
35
        }
36
    }
37
}
38