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
This commit is contained in:
Tyson Andre 2017-09-18 20:21:35 -07:00
Родитель 7acdeebf1d
Коммит 0104e356bb
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -35,7 +35,7 @@ class Token implements \JsonSerializable {
return substr($document, $this->start, $this->length - ($this->start - $this->fullStart));
}
public function getFullText(string & $document) : string {
public function getFullText(string $document) : string {
return substr($document, $this->fullStart, $this->length);
}
@ -76,7 +76,7 @@ class Token implements \JsonSerializable {
if (!isset($GLOBALS["SHORT_TOKEN_SERIALIZE"])) {
$GLOBALS["SHORT_TOKEN_SERIALIZE"] = false;
}
if ($GLOBALS["SHORT_TOKEN_SERIALIZE"]) {
return [
"kind" => $kindName,