@@ -61,7 +61,7 @@ |
||
| 61 | 61 | * {@overrideDoc} |
| 62 | 62 | * |
| 63 | 63 | * @param \DOMDocument $doc |
| 64 | - * @return type |
|
| 64 | + * @return \DOMNode |
|
| 65 | 65 | */ |
| 66 | 66 | public function toDOMElement(\DOMDocument $doc) |
| 67 | 67 | { |
@@ -62,13 +62,13 @@ |
||
| 62 | 62 | } |
| 63 | 63 | |
| 64 | 64 | |
| 65 | - public function setValueToElement(\DOMElement &$el, \DOMDocument $doc = null) |
|
| 65 | + public function setValueToElement(\DOMElement&$el, \DOMDocument $doc = null) |
|
| 66 | 66 | { |
| 67 | 67 | if (count($this->parts) > 0) { |
| 68 | 68 | $name = $doc->createElement(CDA::NS_CDA.'name'); |
| 69 | 69 | $el->appendChild($name); |
| 70 | 70 | |
| 71 | - foreach($this->parts as $part => $value) { |
|
| 71 | + foreach ($this->parts as $part => $value) { |
|
| 72 | 72 | $partElement = $doc->createElement(CDA::NS_CDA.$part, $value); |
| 73 | 73 | $name->appendChild($partElement); |
| 74 | 74 | } |
@@ -33,13 +33,13 @@ |
||
| 33 | 33 | */ |
| 34 | 34 | abstract class AnyType |
| 35 | 35 | { |
| 36 | - /** |
|
| 37 | - * |
|
| 38 | - * Add attribute to the given element. |
|
| 39 | - * |
|
| 40 | - * The data type are responsible to add the given attribute, content child |
|
| 41 | - * to the Element. |
|
| 42 | - * |
|
| 43 | - */ |
|
| 36 | + /** |
|
| 37 | + * |
|
| 38 | + * Add attribute to the given element. |
|
| 39 | + * |
|
| 40 | + * The data type are responsible to add the given attribute, content child |
|
| 41 | + * to the Element. |
|
| 42 | + * |
|
| 43 | + */ |
|
| 44 | 44 | abstract public function setValueToElement(\DOMElement &$el, \DOMDocument $doc = null); |
| 45 | 45 | } |
@@ -41,5 +41,5 @@ |
||
| 41 | 41 | * to the Element. |
| 42 | 42 | * |
| 43 | 43 | */ |
| 44 | - abstract public function setValueToElement(\DOMElement &$el, \DOMDocument $doc = null); |
|
| 44 | + abstract public function setValueToElement(\DOMElement&$el, \DOMDocument $doc = null); |
|
| 45 | 45 | } |
@@ -137,7 +137,7 @@ |
||
| 137 | 137 | return $this; |
| 138 | 138 | } |
| 139 | 139 | |
| 140 | - public function setValueToElement(\DOMElement &$el, \DOMDocument $doc = null) |
|
| 140 | + public function setValueToElement(\DOMElement&$el, \DOMDocument $doc = null) |
|
| 141 | 141 | { |
| 142 | 142 | $el->setAttribute(CDA::NS_CDA."code", $this->getCode()); |
| 143 | 143 | |
@@ -123,7 +123,7 @@ |
||
| 123 | 123 | } |
| 124 | 124 | |
| 125 | 125 | |
| 126 | - public function setValueToElement(\DOMElement &$el, \DOMDocument $doc = null) |
|
| 126 | + public function setValueToElement(\DOMElement&$el, \DOMDocument $doc = null) |
|
| 127 | 127 | { |
| 128 | 128 | $value = \mb_substr( |
| 129 | 129 | $this->getDate()->format(self::DATE_FORMAT), |
@@ -46,7 +46,7 @@ |
||
| 46 | 46 | |
| 47 | 47 | public function toDOMElement(\DOMDocument $doc) |
| 48 | 48 | { |
| 49 | - return $this->createElement($doc, array ('codedValue')); |
|
| 49 | + return $this->createElement($doc, array('codedValue')); |
|
| 50 | 50 | } |
| 51 | 51 | |
| 52 | 52 | public function getCodedValue() |
@@ -56,7 +56,7 @@ |
||
| 56 | 56 | $el = $doc->createElement(CDA::NS_CDA.$this->getElementTag()); |
| 57 | 57 | |
| 58 | 58 | if (count($properties) > 0) { |
| 59 | - foreach($properties as $property) { |
|
| 59 | + foreach ($properties as $property) { |
|
| 60 | 60 | $this->{$property}->setValueToElement($el); |
| 61 | 61 | } |
| 62 | 62 | } |
@@ -64,7 +64,7 @@ |
||
| 64 | 64 | { |
| 65 | 65 | $component = $doc->createElement('component'); |
| 66 | 66 | |
| 67 | - foreach($this->getComponents() as $subComponent) { |
|
| 67 | + foreach ($this->getComponents() as $subComponent) { |
|
| 68 | 68 | $component->appendChild($subComponent->toDOMElement($doc)); |
| 69 | 69 | } |
| 70 | 70 | |
@@ -234,7 +234,7 @@ |
||
| 234 | 234 | $dom->appendChild($doc); |
| 235 | 235 | // set the NS |
| 236 | 236 | $doc->setAttributeNS('http://www.w3.org/2001/XMLSchema-instance', |
| 237 | - 'xsi:schemaLocation','urn:hl7-org:v3 CDA.xsd'); |
|
| 237 | + 'xsi:schemaLocation', 'urn:hl7-org:v3 CDA.xsd'); |
|
| 238 | 238 | // add typeId |
| 239 | 239 | $doc->appendChild($this->typeId->toDOMElement($dom)); |
| 240 | 240 | // add id |