Skip to content

Commit a033b90

Browse files
committed
Only variables should be assigned by reference
1 parent 138c43a commit a033b90

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/VerifierServer/Endpoints/SS14VerifiedEndpoint.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ protected function __post(array &$list, string $ss14, string $discord, int|strin
155155

156156
public function add(string $discord, string $ss14): void
157157
{
158-
$list = &$this->state->getVerifyList();
158+
$list = $this->state->getVerifyList();
159159
$list[] = [
160160
'discord' => $discord,
161161
'ss14' => $ss14,
@@ -174,7 +174,7 @@ public function remove(string $discord, string $ss14 = ''): ?array
174174

175175
public function getIndex(string $discord, string $ss14 = ''): int|string|false
176176
{
177-
$list = &$this->state->getVerifyList();
177+
$list = $this->state->getVerifyList();
178178
$existingIndex = array_search($discord, array_column($list, 'discord'));
179179
if ($ss14 && $existingIndex === false) $existingIndex = array_search($ss14, array_column($list, 'ss14'));
180180
return $existingIndex;

src/VerifierServer/Endpoints/VerifiedEndpoint.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ protected function delete(int|string|false $existingIndex, array &$list, int|str
253253

254254
public function add(string $discord, string $ckey): void
255255
{
256-
$list = &$this->state->getVerifyList();
256+
$list = $this->state->getVerifyList();
257257
$list[] = [
258258
'discord' => $discord,
259259
'ss13' => $ckey,
@@ -272,15 +272,15 @@ public function remove(string $discord, string $ckey = ''): ?array
272272

273273
public function getIndex(string $discord, string $ckey = ''): int|string|false
274274
{
275-
$list = &$this->state->getVerifyList();
275+
$list = $this->state->getVerifyList();
276276
$existingIndex = array_search($ckey, array_column($list, 'ss13'));
277277
if ($ckey && $existingIndex === false) $existingIndex = array_search($discord, array_column($list, 'discord'));
278278
return $existingIndex;
279279
}
280280

281281
public function removeIndex(int|string $existingIndex): array
282282
{
283-
$list = &$this->state->getVerifyList();
283+
$list = $this->state->getVerifyList();
284284
$splice = array_splice($list, (int)$existingIndex, 1);
285285
$this->state::writeJson($this->state->getJsonPath(), $list);
286286
$this->state->setVerifyList($list);

0 commit comments

Comments
 (0)