Skip to content

Commit

Permalink
PhpMethodReflection - fixed isDeprecated(), isInternal(), isFinal()
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Aug 17, 2019
1 parent a02404b commit 765179c
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 3 deletions.
4 changes: 4 additions & 0 deletions src/Reflection/Php/BuiltinMethodReflection.php
Expand Up @@ -48,4 +48,8 @@ public function getReturnType(): ?\ReflectionType;
*/
public function getParameters(): array;

public function isFinal(): bool;

public function isInternal(): bool;

}
10 changes: 10 additions & 0 deletions src/Reflection/Php/FakeBuiltinMethodReflection.php
Expand Up @@ -92,6 +92,16 @@ public function isVariadic(): bool
return false;
}

public function isFinal(): bool
{
return false;
}

public function isInternal(): bool
{
return false;
}

public function getReturnType(): ?\ReflectionType
{
return null;
Expand Down
10 changes: 10 additions & 0 deletions src/Reflection/Php/NativeBuiltinMethodReflection.php
Expand Up @@ -80,6 +80,16 @@ public function isDeprecated(): bool
return $this->reflection->isDeprecated();
}

public function isFinal(): bool
{
return $this->reflection->isFinal();
}

public function isInternal(): bool
{
return $this->reflection->isInternal();
}

public function isVariadic(): bool
{
return $this->reflection->isVariadic();
Expand Down
6 changes: 3 additions & 3 deletions src/Reflection/Php/PhpMethodReflection.php
Expand Up @@ -409,17 +409,17 @@ public function getDeprecatedDescription(): ?string

public function isDeprecated(): bool
{
return $this->isDeprecated;
return $this->reflection->isDeprecated() || $this->isDeprecated;
}

public function isInternal(): bool
{
return $this->isInternal;
return $this->reflection->isInternal() || $this->isInternal;
}

public function isFinal(): bool
{
return $this->isFinal;
return $this->reflection->isFinal() || $this->isFinal;
}

public function getThrowType(): ?Type
Expand Down

0 comments on commit 765179c

Please sign in to comment.