Skip to content

Commit

Permalink
Fixes php 7.2 compatiblity
Browse files Browse the repository at this point in the history
  • Loading branch information
jaapio committed Oct 10, 2017
1 parent 455a017 commit 67be7ec
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/phpDocumentor/Descriptor/ArgumentDescriptor.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,9 @@ public function setTypes($types)
*/
public function getTypes()
{
if (count($this->types)==0 &&
$this->getInheritedElement() !== null
) {
$this->setTypes($this->getInheritedElement()->getTypes());
$countable = $this->types instanceof \Countable || is_array($this->types);
if ((!$countable || count($this->types) == 0) && $this->getInheritedElement() !== null) {
$this->setTypes($this->getInheritedElement()->getTypes());
}

return $this->types;
Expand Down

0 comments on commit 67be7ec

Please sign in to comment.