@@ -44,7 +44,7 @@ |
||
| 44 | 44 | |
| 45 | 45 | /** |
| 46 | 46 | * Add exceptions to the collection |
| 47 | - * @param Exception Exception to add |
|
| 47 | + * @param Exception \Exception to add |
|
| 48 | 48 | * @return ExceptionCollection; |
| 49 | 49 | */ |
| 50 | 50 | public function add(\Exception $exception) |
@@ -17,9 +17,9 @@ |
||
| 17 | 17 | { |
| 18 | 18 | $msg = ''; |
| 19 | 19 | foreach ($errors as $error) { |
| 20 | - $msg .= $error."\n"; |
|
| 20 | + $msg .= $error . "\n"; |
|
| 21 | 21 | } |
| 22 | - return new static('This XML is not valid. '.$msg); |
|
| 22 | + return new static('This XML is not valid. ' . $msg); |
|
| 23 | 23 | } |
| 24 | 24 | |
| 25 | 25 | public static function isNotXml() |
@@ -39,7 +39,7 @@ |
||
| 39 | 39 | $dom->formatOutput = false; |
| 40 | 40 | $dom->loadXML($xml, LIBXML_NOBLANKS | LIBXML_NOEMPTYTAG); |
| 41 | 41 | libxml_clear_errors(); |
| 42 | - if (! $dom->schemaValidate($xsd)) { |
|
| 42 | + if (!$dom->schemaValidate($xsd)) { |
|
| 43 | 43 | $errors = []; |
| 44 | 44 | foreach (libxml_get_errors() as $error) { |
| 45 | 45 | $errors[] = $error->message; |
@@ -125,9 +125,9 @@ discard block |
||
| 125 | 125 | public function getChave($nodeName = 'infNFe') |
| 126 | 126 | { |
| 127 | 127 | $node = $this->getElementsByTagName($nodeName)->item(0); |
| 128 | - if (! empty($node)) { |
|
| 128 | + if (!empty($node)) { |
|
| 129 | 129 | $chaveId = $node->getAttribute("Id"); |
| 130 | - $chave = preg_replace('/[^0-9]/', '', $chaveId); |
|
| 130 | + $chave = preg_replace('/[^0-9]/', '', $chaveId); |
|
| 131 | 131 | return $chave; |
| 132 | 132 | } |
| 133 | 133 | return ''; |
@@ -147,7 +147,7 @@ discard block |
||
| 147 | 147 | * @return void |
| 148 | 148 | */ |
| 149 | 149 | public function addChild( |
| 150 | - DOMElement &$parent, |
|
| 150 | + DOMElement & $parent, |
|
| 151 | 151 | $name, |
| 152 | 152 | $content = '', |
| 153 | 153 | $obrigatorio = false, |
@@ -174,7 +174,7 @@ discard block |
||
| 174 | 174 | * @param string $msg |
| 175 | 175 | * @return void |
| 176 | 176 | */ |
| 177 | - public function appChild(DOMElement &$parent, DOMElement $child = null, $msg = '') |
|
| 177 | + public function appChild(DOMElement & $parent, DOMElement $child = null, $msg = '') |
|
| 178 | 178 | { |
| 179 | 179 | if (empty($child)) { |
| 180 | 180 | $this->erros[] = $msg; |
@@ -189,7 +189,7 @@ discard block |
||
| 189 | 189 | * @param DOMElement $child |
| 190 | 190 | * @return void |
| 191 | 191 | */ |
| 192 | - public function appExternalChild(DOMElement &$parent, DOMElement $child) |
|
| 192 | + public function appExternalChild(DOMElement & $parent, DOMElement $child) |
|
| 193 | 193 | { |
| 194 | 194 | $node = $this->importNode($child, true); |
| 195 | 195 | $parent->appendChild($node); |
@@ -204,7 +204,7 @@ discard block |
||
| 204 | 204 | * @return void |
| 205 | 205 | */ |
| 206 | 206 | public function appExternalChildBefore( |
| 207 | - DOMElement &$parent, |
|
| 207 | + DOMElement & $parent, |
|
| 208 | 208 | DOMElement $child, |
| 209 | 209 | $before |
| 210 | 210 | ) { |
@@ -226,7 +226,7 @@ discard block |
||
| 226 | 226 | * @param string $msg |
| 227 | 227 | * @return void |
| 228 | 228 | */ |
| 229 | - public function appChildBefore(DOMElement &$parent, DOMElement $child = null, $before = '', $msg = '') |
|
| 229 | + public function appChildBefore(DOMElement & $parent, DOMElement $child = null, $before = '', $msg = '') |
|
| 230 | 230 | { |
| 231 | 231 | if (empty($child) || |
| 232 | 232 | empty($before) || |
@@ -245,10 +245,10 @@ discard block |
||
| 245 | 245 | * @param array $arr |
| 246 | 246 | * @return int |
| 247 | 247 | */ |
| 248 | - public function addArrayChild(DOMElement &$parent, $arr) |
|
| 248 | + public function addArrayChild(DOMElement & $parent, $arr) |
|
| 249 | 249 | { |
| 250 | 250 | $num = 0; |
| 251 | - if (! empty($arr) && ! empty($parent)) { |
|
| 251 | + if (!empty($arr) && !empty($parent)) { |
|
| 252 | 252 | foreach ($arr as $node) { |
| 253 | 253 | $this->appChild($parent, $node, ''); |
| 254 | 254 | $num++; |