simplesamlphp /
xml-cas
| 1 | <?php |
||
| 2 | |||
| 3 | declare(strict_types=1); |
||
| 4 | |||
| 5 | namespace SimpleSAML\CAS\Utils; |
||
| 6 | |||
| 7 | use DOMNode; |
||
| 8 | use DOMXPath; |
||
| 9 | use SimpleSAML\CAS\Constants as C; |
||
|
0 ignored issues
–
show
|
|||
| 10 | |||
| 11 | /** |
||
| 12 | * Compilation of utilities for XPath. |
||
| 13 | * |
||
| 14 | * @package simplesamlphp/xml-cas |
||
| 15 | */ |
||
| 16 | class XPath extends \SimpleSAML\XPath\XPath |
||
| 17 | { |
||
| 18 | /** |
||
| 19 | * Get a DOMXPath object that can be used to search for CAS elements. |
||
| 20 | * |
||
| 21 | * @param \DOMNode $node The document to associate to the DOMXPath object. |
||
| 22 | * @param bool $autoregister Whether to auto-register all namespaces used in the document |
||
| 23 | * |
||
| 24 | * @return \DOMXPath A DOMXPath object ready to use in the given document, with several |
||
| 25 | * cas-related namespaces already registered. |
||
| 26 | */ |
||
| 27 | public static function getXPath(DOMNode $node, bool $autoregister = false): DOMXPath |
||
| 28 | { |
||
| 29 | $xp = parent::getXPath($node, $autoregister); |
||
| 30 | |||
| 31 | /* |
||
| 32 | * - Registering 'cas' to the same URI again is fine. |
||
| 33 | * - If someone previously bound 'cas' to a different URI on the same DOMXPath, |
||
| 34 | * your call will change its meaning for subsequent queries |
||
| 35 | * */ |
||
| 36 | $xp->registerNamespace('cas', C::NS_CAS); |
||
| 37 | |||
| 38 | return $xp; |
||
| 39 | } |
||
| 40 | } |
||
| 41 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths