@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | */ |
103 | 103 | public function checkContainsOrThrow($name) |
104 | 104 | { |
105 | - if ($name !== $this->getElementName()) { |
|
105 | + if ($name !== $this->getElementName()) { |
|
106 | 106 | throw new \InvalidArgumentException(sprintf("The Set should countains %s" |
107 | 107 | . " but contains %s", $name, $this->getElementName())); |
108 | 108 | } else { |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | return $this->elements; |
119 | 119 | } |
120 | 120 | |
121 | - public function setValueToElement(\DOMElement &$el, \DOMDocument $doc = null) |
|
121 | + public function setValueToElement(\DOMElement&$el, \DOMDocument $doc = null) |
|
122 | 122 | { |
123 | 123 | if (count($this->elements) === 0) { |
124 | 124 | return; |
@@ -149,13 +149,13 @@ |
||
149 | 149 | ); |
150 | 150 | } |
151 | 151 | // append title |
152 | - if (! empty($this->getTitle())) { |
|
152 | + if (!empty($this->getTitle())) { |
|
153 | 153 | $el->appendChild( |
154 | 154 | (new Title($this->getTitle()))->toDOMElement($doc) |
155 | 155 | ); |
156 | 156 | } |
157 | 157 | // append text |
158 | - if (! empty($this->getText())) { |
|
158 | + if (!empty($this->getText())) { |
|
159 | 159 | $el->appendChild( |
160 | 160 | (new Text($this->getText()))->toDOMElement($doc) |
161 | 161 | ); |
@@ -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()); |
@@ -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); |