Conditions | 3 |
Paths | 4 |
Total Lines | 17 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 3.3332 |
Changes | 0 |
1 | <?php |
||
41 | 45 | public static function loadElementRef( |
|
42 | ElementDef $referenced, |
||
43 | DOMElement $node |
||
44 | ) { |
||
45 | 45 | $ref = new self($referenced); |
|
46 | 45 | $ref->setDoc(SchemaReader::getDocumentation($node)); |
|
47 | |||
48 | 45 | SchemaReader::maybeSetMax($ref, $node); |
|
49 | 45 | SchemaReader::maybeSetMin($ref, $node); |
|
50 | 45 | if ($node->hasAttribute('nillable')) { |
|
51 | $ref->setNil($node->getAttribute('nillable') == 'true'); |
||
52 | } |
||
53 | 45 | if ($node->hasAttribute('form')) { |
|
54 | $ref->setQualified($node->getAttribute('form') == 'qualified'); |
||
55 | } |
||
56 | |||
57 | 45 | return $ref; |
|
58 | } |
||
60 |