Skip to content

Commit

Permalink
Fix nullable signatures
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeljoelphillips committed Dec 12, 2020
1 parent 97507f8 commit 07f70ab
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/Reflection/Adapter/ReflectionClass.php
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ public function hasConstant($name)
/**
* {@inheritDoc}
*/
public function getConstants(int $filter = null)
public function getConstants(?int $filter = null)
{
return $this->betterReflectionClass->getConstants($filter);
}
Expand Down Expand Up @@ -279,7 +279,7 @@ public function getReflectionConstant($name)
/**
* {@inheritdoc}
*/
public function getReflectionConstants(int $filter = null)
public function getReflectionConstants(?int $filter = null)
{
return array_values(array_map(static function (BetterReflectionClassConstant $betterConstant): ReflectionClassConstant {
return new ReflectionClassConstant($betterConstant);
Expand Down
2 changes: 1 addition & 1 deletion src/Reflection/Adapter/ReflectionObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ public function hasConstant($name)
/**
* {@inheritDoc}
*/
public function getConstants(int $filter = null)
public function getConstants(?int $filter = null)
{
return $this->betterReflectionObject->getConstants($filter);
}
Expand Down
8 changes: 4 additions & 4 deletions src/Reflection/ReflectionObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,9 @@ public function getImmediateConstants(): array
/**
* {@inheritdoc}
*/
public function getConstants(): array
public function getConstants(?int $filter = null): array
{
return $this->reflectionClass->getConstants();
return $this->reflectionClass->getConstants($filter);
}

/**
Expand Down Expand Up @@ -224,9 +224,9 @@ public function getImmediateReflectionConstants(): array
/**
* {@inheritdoc}
*/
public function getReflectionConstants(): array
public function getReflectionConstants(?int $filter = null): array
{
return $this->reflectionClass->getReflectionConstants();
return $this->reflectionClass->getReflectionConstants($filter);
}

public function getConstructor(): ReflectionMethod
Expand Down

0 comments on commit 07f70ab

Please sign in to comment.