| Conditions | 3 |
| Paths | 3 |
| Total Lines | 12 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 20 | public function hook_sanitize($doc, $site_url, $allowed_elements, $disallowed_attributes) { |
||
|
|
|||
| 21 | |||
| 22 | $xpath = new DOMXpath($doc); |
||
| 23 | $entries = $xpath->query('//iframe'); |
||
| 24 | |||
| 25 | foreach ($entries as $entry) { |
||
| 26 | if (!iframe_whitelisted($entry)) { |
||
| 27 | $entry->parentNode->removeChild($entry); |
||
| 28 | } |
||
| 29 | } |
||
| 30 | |||
| 31 | return array($doc, $allowed_elements, $disallowed_attributes); |
||
| 32 | } |
||
| 39 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.