| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 30 | 2 | public function check(DOMElement $template, Tag $tag) |
|
| 31 | { |
||
| 32 | 2 | $xpath = new DOMXPath($template->ownerDocument); |
|
| 33 | 2 | $query = '//object//param[contains(@name, "{") or .//xsl:attribute[translate(@name, "NAME", "name") = "name"]]'; |
|
| 34 | 2 | $nodes = $xpath->query($query); |
|
| 35 | |||
| 36 | 2 | foreach ($nodes as $node) |
|
| 37 | { |
||
| 38 | 2 | throw new UnsafeTemplateException("A 'param' element with a suspect name has been found", $node); |
|
| 39 | } |
||
| 40 | } |
||
| 41 | } |