Skip to content

Commit 9a5fc01

Browse files
committed
tweak: improve looping over parameters
1 parent d57f4d8 commit 9a5fc01

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Input.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,10 +252,11 @@ public function with(string...$keys):Trigger {
252252
return $this->select(...$keys);
253253
}
254254

255+
/** @SuppressWarnings(PHPMD.UnusedLocalVariable) */
255256
public function selectPrefix(string $prefix):Trigger {
256257
$keys = [];
257258

258-
foreach(array_keys($this->parameters) as $key) {
259+
foreach($this->parameters as $key => $param) {
259260
if(str_starts_with($key, $prefix)) {
260261
array_push($keys, $key);
261262
}

0 commit comments

Comments
 (0)