Skip to content

Commit 0104e35

Browse files
committed
Remove an unnecessary reference from parameter.
The parameter isn't being modified, so having this is unexpected, and passing params by reference is slower than passing by value. The reference was part of the initial commit for src/Token.php
1 parent 7acdeeb commit 0104e35

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Token.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function getText(string $document = null) {
3535
return substr($document, $this->start, $this->length - ($this->start - $this->fullStart));
3636
}
3737

38-
public function getFullText(string & $document) : string {
38+
public function getFullText(string $document) : string {
3939
return substr($document, $this->fullStart, $this->length);
4040
}
4141

@@ -76,7 +76,7 @@ public function jsonSerialize() {
7676
if (!isset($GLOBALS["SHORT_TOKEN_SERIALIZE"])) {
7777
$GLOBALS["SHORT_TOKEN_SERIALIZE"] = false;
7878
}
79-
79+
8080
if ($GLOBALS["SHORT_TOKEN_SERIALIZE"]) {
8181
return [
8282
"kind" => $kindName,

0 commit comments

Comments
 (0)