Skip to content

Commit

Permalink
fix deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
freekmurze committed Dec 2, 2024
1 parent c7e3909 commit 0f2477c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/CodeSnippets/FileSnippetProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public function numberOfLines(): int
return $this->file->key() + 1;
}

public function getLine(int $lineNumber = null): string
public function getLine(?int $lineNumber = null): string
{
if (is_null($lineNumber)) {
return $this->getNextLine();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public function numberOfLines(): int
return count($this->lines);
}

public function getLine(int $lineNumber = null): string
public function getLine(?int $lineNumber = null): string
{
if (is_null($lineNumber)) {
return $this->getNextLine();
Expand Down
2 changes: 1 addition & 1 deletion src/CodeSnippets/NullSnippetProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public function numberOfLines(): int
return 1;
}

public function getLine(int $lineNumber = null): string
public function getLine(?int $lineNumber = null): string
{
return $this->getNextLine();
}
Expand Down
2 changes: 1 addition & 1 deletion src/CodeSnippets/SnippetProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ interface SnippetProvider
{
public function numberOfLines(): int;

public function getLine(int $lineNumber = null): string;
public function getLine(?int $lineNumber = null): string;

public function getNextLine(): string;
}

0 comments on commit 0f2477c

Please sign in to comment.