@@ -52,6 +52,9 @@ |
||
52 | 52 | return $this->value; |
53 | 53 | } |
54 | 54 | |
55 | + /** |
|
56 | + * @return string |
|
57 | + */ |
|
55 | 58 | public function getTag() |
56 | 59 | { |
57 | 60 | return $this->tag; |
@@ -71,9 +71,9 @@ |
||
71 | 71 | } |
72 | 72 | |
73 | 73 | |
74 | - public function setValueToElement(\DOMElement &$el, \DOMDocument $doc = null) |
|
74 | + public function setValueToElement(\DOMElement&$el, \DOMDocument $doc = null) |
|
75 | 75 | { |
76 | - assert ($this->getTag() === null, new \RuntimeException("The tag " |
|
76 | + assert($this->getTag() === null, new \RuntimeException("The tag " |
|
77 | 77 | . "on boolean must be defined")); |
78 | 78 | |
79 | 79 | $el->setAttributeNS(CD::NS_CDA, $this->getTag(), $value); |
@@ -40,7 +40,7 @@ |
||
40 | 40 | // only for php7.0 |
41 | 41 | $data = random_bytes(16); |
42 | 42 | |
43 | - //assert(strlen($data) == 16); |
|
43 | + //assert(strlen($data) == 16); |
|
44 | 44 | |
45 | 45 | $data[6] = chr(ord($data[6]) & 0x0f | 0x40); // set version to 0100 |
46 | 46 | $data[8] = chr(ord($data[8]) & 0x3f | 0x80); // set bits 6-7 to 10 |
@@ -42,8 +42,8 @@ |
||
42 | 42 | |
43 | 43 | //assert(strlen($data) == 16); |
44 | 44 | |
45 | - $data[6] = chr(ord($data[6]) & 0x0f | 0x40); // set version to 0100 |
|
46 | - $data[8] = chr(ord($data[8]) & 0x3f | 0x80); // set bits 6-7 to 10 |
|
45 | + $data[6] = chr(ord($data[6])&0x0f|0x40); // set version to 0100 |
|
46 | + $data[8] = chr(ord($data[8])&0x3f|0x80); // set bits 6-7 to 10 |
|
47 | 47 | |
48 | 48 | return vsprintf('%s%s-%s-%s-%s-%s%s%s', str_split(bin2hex($data), 4)); |
49 | 49 | } |
@@ -164,7 +164,7 @@ |
||
164 | 164 | public function setTemplateIds(array $templateIds) |
165 | 165 | { |
166 | 166 | // check that each element is an instance of InstanceIdentifier |
167 | - $result = \array_reduce($templateIds, function ($carry, $current) { |
|
167 | + $result = \array_reduce($templateIds, function($carry, $current) { |
|
168 | 168 | if ($carry === false) { |
169 | 169 | return false; |
170 | 170 | } |
@@ -57,8 +57,7 @@ |
||
57 | 57 | |
58 | 58 | function setQuantity($quantity) |
59 | 59 | { |
60 | - if (! |
|
61 | - ( |
|
60 | + if (!( |
|
62 | 61 | $quantity instanceof PhysicalQuantity |
63 | 62 | || |
64 | 63 | $quantity instanceof AbstractInterval |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | if ($months != 0) { |
90 | 90 | return ['mo', $months]; |
91 | 91 | } |
92 | - if ($days != 0) { |
|
92 | + if ($days != 0) { |
|
93 | 93 | return ['d', $days]; |
94 | 94 | } |
95 | 95 | if ($hours != 0) { |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | } |
104 | 104 | } |
105 | 105 | |
106 | - public function setValueToElement(\DOMElement &$el, \DOMDocument $doc = null) |
|
106 | + public function setValueToElement(\DOMElement&$el, \DOMDocument $doc = null) |
|
107 | 107 | { |
108 | 108 | if ($doc === null) { |
109 | 109 | throw new \Exception("doc should not be null"); |
@@ -69,7 +69,7 @@ |
||
69 | 69 | } |
70 | 70 | |
71 | 71 | |
72 | - public function setValueToElement(\DOMElement &$el, \DOMDocument $doc = null) |
|
72 | + public function setValueToElement(\DOMElement&$el, \DOMDocument $doc = null) |
|
73 | 73 | { |
74 | 74 | if ($this->getValue() !== NULL) { |
75 | 75 | $el->setAttributeNS(CDA::NS_CDA, 'value', $this->getValue()); |