Skip to content

Commit

Permalink
Merge pull request #13 from beatrycze-volk/return-type
Browse files Browse the repository at this point in the history
Fix return for `getValues()`
  • Loading branch information
beatrycze-volk authored Apr 18, 2024
2 parents 4d678b6 + 0c2df12 commit 19bf0f0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .github/phpstan.neon
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
parameters:
ignoreErrors:
- '#PHPDoc tag @var for property Slub\\Mods\\Element\\Xml\\Element::\$values with type array\|false is not subtype of native type array\.#'
- '#PHPDoc tag @return with type array\|false is not subtype of native type array\.#'
level: 5
paths:
- ../src/
Expand Down
5 changes: 3 additions & 2 deletions src/Mods/Element/Xml/Element.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,13 @@ public function exists(): bool
}

/**
* Get the value of the queried element
* Get the array of values of the queried element.
*
* @access public
*
* @return array|false
* @return array|false array if element exists, false otherwise
*/
// TODO: change return type after upgrade to PHP 8.x
public function getValues(): array
{
return $this->values;
Expand Down

0 comments on commit 19bf0f0

Please sign in to comment.