@@ -26,9 +26,7 @@ |
||
26 | 26 | |
27 | 27 | namespace PHPHealth\CDA; |
28 | 28 | |
29 | -use PHPHealth\CDA\DataType\Quantity\DateAndTime\TimeStamp; |
|
30 | 29 | use PHPHealth\CDA\DataType\Identifier\InstanceIdentifier; |
31 | -use PHPHealth\CDA\DataType\Code\CodedValue; |
|
32 | 30 | use PHPHealth\CDA\Elements\Code; |
33 | 31 | use PHPHealth\CDA\Elements\Title; |
34 | 32 | use PHPHealth\CDA\Elements\EffectiveTime; |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | |
162 | 162 | /** |
163 | 163 | * |
164 | - * @return string |
|
164 | + * @return Title |
|
165 | 165 | */ |
166 | 166 | public function getTitle() |
167 | 167 | { |
@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | /** |
172 | 172 | * |
173 | 173 | * @param \PHPHealth\CDA\Elements\Title $title |
174 | - * @return \PHPHealth\CDA2\ClinicalDocument |
|
174 | + * @return ClinicalDocument |
|
175 | 175 | */ |
176 | 176 | public function setTitle(Title $title) |
177 | 177 | { |
@@ -49,6 +49,9 @@ |
||
49 | 49 | } |
50 | 50 | |
51 | 51 | |
52 | + /** |
|
53 | + * @param string $type |
|
54 | + */ |
|
52 | 55 | private function addElement($type, $content) |
53 | 56 | { |
54 | 57 | $this->elements[] = [$type, $content]; |
@@ -79,7 +79,7 @@ |
||
79 | 79 | return $table; |
80 | 80 | } |
81 | 81 | |
82 | - public function setValueToElement(\DOMElement &$el, \DOMDocument $doc = null) |
|
82 | + public function setValueToElement(\DOMElement&$el, \DOMDocument $doc = null) |
|
83 | 83 | { |
84 | 84 | foreach ($this->elements as list($type, $element)) { |
85 | 85 | switch ($type) |
@@ -35,7 +35,6 @@ |
||
35 | 35 | use PHPHealth\CDA\RIM\Participation\Consumable; |
36 | 36 | use PHPHealth\CDA\Elements\DoseQuantity; |
37 | 37 | use PHPHealth\CDA\DataType\Identifier\InstanceIdentifier; |
38 | -use PHPHealth\CDA\DataType\TextAndMultimedia\CharacterString; |
|
39 | 38 | |
40 | 39 | /** |
41 | 40 | * |
@@ -220,7 +220,7 @@ |
||
220 | 220 | foreach ($this->getEffectiveTime() as $time) { |
221 | 221 | $effectiveTime = new EffectiveTime($time); |
222 | 222 | |
223 | - if (! $first) { |
|
223 | + if (!$first) { |
|
224 | 224 | $effectiveTime->setOperatorAppend(); |
225 | 225 | } |
226 | 226 |
@@ -77,7 +77,7 @@ |
||
77 | 77 | } |
78 | 78 | |
79 | 79 | |
80 | - public function setValueToElement(\DOMElement &$el, \DOMDocument $doc = null) |
|
80 | + public function setValueToElement(\DOMElement&$el, \DOMDocument $doc = null) |
|
81 | 81 | { |
82 | 82 | $low = $doc->createElement(CDA::NS_CDA.'low'); |
83 | 83 | $this->low->setValueToElement($low, $doc); |
@@ -42,7 +42,7 @@ |
||
42 | 42 | $this->flavor = $flavor; |
43 | 43 | } |
44 | 44 | |
45 | - public function setValueToElement(\DOMElement &$el, \DOMDocument $doc = null) |
|
45 | + public function setValueToElement(\DOMElement&$el, \DOMDocument $doc = null) |
|
46 | 46 | { |
47 | 47 | $el->setAttribute(CDA::NS_CDA.'nullFlavor', $this->flavor); |
48 | 48 | } |
@@ -145,7 +145,7 @@ |
||
145 | 145 | return $this; |
146 | 146 | } |
147 | 147 | |
148 | - public function setValueToElement(\DOMElement &$el, \DOMDocument $doc = null) |
|
148 | + public function setValueToElement(\DOMElement&$el, \DOMDocument $doc = null) |
|
149 | 149 | { |
150 | 150 | if ($this->getMediaType() !== 'text/plain') { |
151 | 151 | $el->setAttribute(CD::NS_CDA.'mediaType', $this->getMediaType()); |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | public function setTemplateIds(array $templateIds) |
132 | 132 | { |
133 | 133 | $validation = \array_reduce($templateIds, |
134 | - function ($carry, $item) { |
|
134 | + function($carry, $item) { |
|
135 | 135 | if ($carry === false) { |
136 | 136 | return false; |
137 | 137 | } |
@@ -237,13 +237,13 @@ discard block |
||
237 | 237 | ); |
238 | 238 | } |
239 | 239 | // append title |
240 | - if (! empty($this->getTitle())) { |
|
240 | + if (!empty($this->getTitle())) { |
|
241 | 241 | $el->appendChild( |
242 | 242 | (new Title($this->getTitle()))->toDOMElement($doc) |
243 | 243 | ); |
244 | 244 | } |
245 | 245 | // append text |
246 | - if (! empty($this->getText())) { |
|
246 | + if (!empty($this->getText())) { |
|
247 | 247 | $el->appendChild( |
248 | 248 | (new Text($this->getText()))->toDOMElement($doc) |
249 | 249 | ); |
@@ -69,10 +69,10 @@ |
||
69 | 69 | } |
70 | 70 | |
71 | 71 | /** |
72 | - * |
|
73 | - * @param type $ref |
|
74 | - * @return ReferenceElement |
|
75 | - */ |
|
72 | + * |
|
73 | + * @param type $ref |
|
74 | + * @return ReferenceElement |
|
75 | + */ |
|
76 | 76 | public function getReferenceElement($ref) |
77 | 77 | { |
78 | 78 | if (! array_key_exists($ref, $this->elementReferences)) { |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | */ |
62 | 62 | public function getReferenceType($ref) |
63 | 63 | { |
64 | - if (! array_key_exists($ref, $this->typeReferences)) { |
|
64 | + if (!array_key_exists($ref, $this->typeReferences)) { |
|
65 | 65 | $this->createReference($ref); |
66 | 66 | } |
67 | 67 | |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | */ |
76 | 76 | public function getReferenceElement($ref) |
77 | 77 | { |
78 | - if (! array_key_exists($ref, $this->elementReferences)) { |
|
78 | + if (!array_key_exists($ref, $this->elementReferences)) { |
|
79 | 79 | $this->createReference($ref); |
80 | 80 | } |
81 | 81 |
@@ -64,7 +64,7 @@ |
||
64 | 64 | return $el; |
65 | 65 | } |
66 | 66 | |
67 | - public function setValueToElement(\DOMElement &$el, \DOMDocument $doc = null) |
|
67 | + public function setValueToElement(\DOMElement&$el, \DOMDocument $doc = null) |
|
68 | 68 | { |
69 | 69 | $el->appendChild($this->toDOMElement($doc)); |
70 | 70 | } |