diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php index 5f09a0c..b8b7aac 100644 --- a/.php-cs-fixer.php +++ b/.php-cs-fixer.php @@ -22,6 +22,7 @@ return (new PhpCsFixer\Config()) 'ordered_imports' => true, 'php_unit_strict' => false, 'phpdoc_order' => true, + 'phpdoc_to_param_type' => true, // 'psr4' => true, 'strict_comparison' => true, 'strict_param' => true, diff --git a/src/Readability.php b/src/Readability.php index 9c1b983..0bc2ec8 100644 --- a/src/Readability.php +++ b/src/Readability.php @@ -546,12 +546,8 @@ class Readability implements LoggerAwareInterface /** * Get the inner text of a node. * This also strips out any excess whitespace to be found. - * - * @param \DOMElement $e - * @param bool $normalizeSpaces (default: true) - * @param bool $flattenLines (default: false) */ - public function getInnerText($e, bool $normalizeSpaces = true, bool $flattenLines = false): string + public function getInnerText(?\DOMNode $e, bool $normalizeSpaces = true, bool $flattenLines = false): string { if (null === $e || !isset($e->textContent) || '' === $e->textContent) { return '';