Skip to content

Commit

Permalink
Fix argument exception (#999)
Browse files Browse the repository at this point in the history
Co-authored-by: Anton Volokha <avolokha@portmone.me>
  • Loading branch information
antonvolokha and Anton Volokha authored Nov 13, 2021
1 parent 8f2c1ff commit e8594d3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Analysis.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public function __construct(array $annotations = [], Context $context = null)
$this->addAnnotations($annotations, $context);
}

public function addAnnotation($annotation, Context $context): void
public function addAnnotation($annotation, ?Context $context): void
{
if ($this->annotations->contains($annotation)) {
return;
Expand Down Expand Up @@ -125,7 +125,7 @@ public function addAnnotation($annotation, Context $context): void
}
}

public function addAnnotations(array $annotations, Context $context): void
public function addAnnotations(array $annotations, ?Context $context): void
{
foreach ($annotations as $annotation) {
$this->addAnnotation($annotation, $context);
Expand Down

0 comments on commit e8594d3

Please sign in to comment.