|
@@ 197-202 (lines=6) @@
|
| 194 |
|
$libxml = libxml_use_internal_errors(true); |
| 195 |
|
|
| 196 |
|
$xml = simplexml_load_string(file_get_contents($fileName)); |
| 197 |
|
if ($xml === false) { |
| 198 |
|
// Reset error handling to previous setting |
| 199 |
|
libxml_use_internal_errors($libxml); |
| 200 |
|
|
| 201 |
|
throw new \RuntimeException(trim(libxml_get_last_error()->message)); |
| 202 |
|
} |
| 203 |
|
|
| 204 |
|
$ruleSet = new RuleSet(); |
| 205 |
|
$ruleSet->setFileName($fileName); |
|
@@ 521-526 (lines=6) @@
|
| 518 |
|
$libxml = libxml_use_internal_errors(true); |
| 519 |
|
|
| 520 |
|
$xml = simplexml_load_string(file_get_contents($ruleSetFileName)); |
| 521 |
|
if ($xml === false) { |
| 522 |
|
// Reset error handling to previous setting |
| 523 |
|
libxml_use_internal_errors($libxml); |
| 524 |
|
|
| 525 |
|
throw new \RuntimeException(trim(libxml_get_last_error()->message)); |
| 526 |
|
} |
| 527 |
|
|
| 528 |
|
foreach ($xml->children() as $node) { |
| 529 |
|
/** @var $node \SimpleXMLElement */ |