Skip to content

Commit f1fda3d

Browse files
committed
Remove unnecessary return values
1 parent 5cf917a commit f1fda3d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Json5Decoder.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ private function currentChar(): ?string
9797
/**
9898
* Parse the next character.
9999
*/
100-
private function next(): ?string
100+
private function next(): void
101101
{
102102
// Get the next character. When there are no more characters,
103103
// return the empty string.
@@ -108,13 +108,13 @@ private function next(): ?string
108108

109109
$this->at++;
110110

111-
return $this->currentByte = $this->getByte($this->at);
111+
$this->currentByte = $this->getByte($this->at);
112112
}
113113

114114
/**
115115
* Parse the next character if it matches $c or fail.
116116
*/
117-
private function nextOrFail(string $c): ?string
117+
private function nextOrFail(string $c): void
118118
{
119119
if ($c !== $this->currentByte) {
120120
$this->throwSyntaxError(\sprintf(
@@ -124,7 +124,7 @@ private function nextOrFail(string $c): ?string
124124
));
125125
}
126126

127-
return $this->next();
127+
$this->next();
128128
}
129129

130130
/**

0 commit comments

Comments
 (0)