diff options
Diffstat (limited to 'src/NodeClass')
-rw-r--r-- | src/NodeClass/DOMDocument.php | 2 | ||||
-rw-r--r-- | src/NodeClass/DOMNode.php | 3 | ||||
-rw-r--r-- | src/NodeClass/NodeClassTrait.php | 9 |
3 files changed, 6 insertions, 8 deletions
diff --git a/src/NodeClass/DOMDocument.php b/src/NodeClass/DOMDocument.php index f379268..98b1215 100644 --- a/src/NodeClass/DOMDocument.php +++ b/src/NodeClass/DOMDocument.php @@ -14,7 +14,7 @@ class DOMDocument extends \DOMDocument $this->registerNodeClass('DOMCdataSection', DOMCdataSection::class); $this->registerNodeClass('DOMCharacterData', DOMCharacterData::class); $this->registerNodeClass('DOMComment', DOMComment::class); - $this->registerNodeClass('DOMDocument', DOMDocument::class); + $this->registerNodeClass('DOMDocument', self::class); $this->registerNodeClass('DOMDocumentFragment', DOMDocumentFragment::class); $this->registerNodeClass('DOMDocumentType', DOMDocumentType::class); $this->registerNodeClass('DOMElement', DOMElement::class); diff --git a/src/NodeClass/DOMNode.php b/src/NodeClass/DOMNode.php index c9ed1c3..eb5e93e 100644 --- a/src/NodeClass/DOMNode.php +++ b/src/NodeClass/DOMNode.php @@ -3,10 +3,9 @@ namespace andreskrey\Readability\NodeClass; /** - * Class DOMNode + * Class DOMNode. * * @method getAttribute($attribute) - * @package andreskrey\Readability\NodeClass */ class DOMNode extends \DOMNode { diff --git a/src/NodeClass/NodeClassTrait.php b/src/NodeClass/NodeClassTrait.php index a1382d1..f2df51a 100644 --- a/src/NodeClass/NodeClassTrait.php +++ b/src/NodeClass/NodeClassTrait.php @@ -7,14 +7,14 @@ use andreskrey\Readability\NodeUtility; trait NodeClassTrait { /** - * Content score of the node. Used to determine the value of the content + * Content score of the node. Used to determine the value of the content. * * @var int */ public $contentScore = 0; /** - * Flag for initialized status + * Flag for initialized status. * * @var bool */ @@ -38,7 +38,7 @@ trait NodeClassTrait ]; /** - * initialized getter + * initialized getter. * * @return bool */ @@ -53,6 +53,7 @@ trait NodeClassTrait * @ TODO: I don't like the weightClasses param. How can we get the config here? * * @param $weightClasses bool Weight classes? + * * @return static */ public function initializeNode($weightClasses) @@ -181,7 +182,6 @@ trait NodeClassTrait return $linkLength / $textLength; } - /** * Calculates the weight of the class/id of the current element. * @@ -283,7 +283,6 @@ trait NodeClassTrait return ['rows' => $rows, 'columns' => $columns]; } - /** * Creates a new node based on the text content of the original node. * |