diff --git a/src/CodeSnippets/FileSnippetProvider.php b/src/CodeSnippets/FileSnippetProvider.php index 6fd5e30..b3656e6 100644 --- a/src/CodeSnippets/FileSnippetProvider.php +++ b/src/CodeSnippets/FileSnippetProvider.php @@ -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(); diff --git a/src/CodeSnippets/LaravelSerializableClosureSnippetProvider.php b/src/CodeSnippets/LaravelSerializableClosureSnippetProvider.php index 1dc9351..0cd41c2 100644 --- a/src/CodeSnippets/LaravelSerializableClosureSnippetProvider.php +++ b/src/CodeSnippets/LaravelSerializableClosureSnippetProvider.php @@ -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(); diff --git a/src/CodeSnippets/NullSnippetProvider.php b/src/CodeSnippets/NullSnippetProvider.php index 9fda38f..220029e 100644 --- a/src/CodeSnippets/NullSnippetProvider.php +++ b/src/CodeSnippets/NullSnippetProvider.php @@ -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(); } diff --git a/src/CodeSnippets/SnippetProvider.php b/src/CodeSnippets/SnippetProvider.php index bed22ba..7064b92 100644 --- a/src/CodeSnippets/SnippetProvider.php +++ b/src/CodeSnippets/SnippetProvider.php @@ -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; }