public function getIgnorePattern($fileName)
{
$excludes = array();
foreach (array_map('trim', explode(',', $fileName)) as $ruleSetFileName) {
$ruleSetFileName = $this->createRuleSetFileName($ruleSetFileName);
// Hide error messages
$libxml = libxml_use_internal_errors(true);
$xml = simplexml_load_string(file_get_contents($ruleSetFileName));
if ($xml === false) {
// Reset error handling to previous setting
libxml_use_internal_errors($libxml);
throw new \RuntimeException(trim(libxml_get_last_error()->message));
}
foreach ($xml->children() as $node) {
if ($node->getName() === 'exclude-pattern') {
$excludes[] = '' . $node;
}
}
return $excludes;
}
}