-
-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Remove `DOMNode` from `Graby::$body` union type, it is obtained from `Readability::getContent()`, which only returns `DOMElement`. - Remove `DOMNode` from `Graby::cleanupHtml()` union type for `$contentBlock` parameter, it is obtained from `ContentExtractor::getContent()`, which only returns `DOMElement`. - Use `instanceof` checks rather than comparing `DOMNode::$nodeType` property to make the actual class clear to PHPStan. - Discard non-element bodies in `ContentExtractor::extractBody()`, `ContentExtractor::process()` assumes the body is an `Element` as it checks if its `tagName` is `iframe`.
- Loading branch information
Showing
3 changed files
with
11 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters