Skip to content

Commit

Permalink
Improvements regarding codacy issues
Browse files Browse the repository at this point in the history
  • Loading branch information
markusweigelt committed Jan 10, 2025
1 parent 70cb8d9 commit c567307
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Classes/Validation/AbstactDomDocumentValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ public function __construct()
parent::__construct(DOMDocument::class);
}

abstract public function isValidDocument();

protected function isValid($value): void
{
$this->xpath = new DOMXPath($value);
Expand All @@ -60,6 +62,4 @@ protected function createNodeValidator(?DOMNode $node): DomNodeValidator
{
return new DomNodeValidator($this->xpath, $this->result, $node);
}

public abstract function isValidDocument();
}
2 changes: 1 addition & 1 deletion Classes/Validation/Dom/DomNodeListValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class DomNodeListValidator
private ?DOMNode $contextNode;

/**
* @var DOMNodeList|false|mixed The node list result of XPath query
* @var DOMNodeList|false The node list result of XPath query
*/
private DOMNodeList $nodeList;

Check failure on line 58 in Classes/Validation/Dom/DomNodeListValidator.php

View workflow job for this annotation

GitHub Actions / Static Code Analysis

PHPDoc tag @var for property Slub\Dfgviewer\Validation\Dom\DomNodeListValidator::$nodeList with type DOMNodeList|false is not subtype of native type DOMNodeList.

Expand Down
1 change: 1 addition & 0 deletions Classes/Validation/Dom/DomNodeValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
*/
class DomNodeValidator
{

/**
* @var DOMXPath The XPath of document to validate
*/
Expand Down
1 change: 1 addition & 0 deletions Tests/Unit/Validation/AbstractDomDocumentValidatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@

abstract class AbstractDomDocumentValidatorTest extends UnitTestCase
{

/**
* @var AbstractDlfValidator
*/
Expand Down

0 comments on commit c567307

Please sign in to comment.