Skip to content

Commit 4d98aff

Browse files
committed
suppressed unnecessary warnings in psalm
1 parent a54d5be commit 4d98aff

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/Formatter/Specialised/BoltOGMTranslator.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,7 @@ public function mapValueToType($value)
253253
throw new UnexpectedValueException('Cannot handle value of debug type: '.$type);
254254
}
255255

256+
/** @psalm-suppress ImpureFunctionCall */
256257
return call_user_func($this->rawToTypes[$type], $value);
257258
}
258259
}

src/Types/AbstractCypherSequence.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ final public function filter(callable $callback): self
121121
/** @var array<TKey, TValue> $tbr */
122122
$tbr = [];
123123
foreach ($this->sequence as $key => $value) {
124+
/** @psalm-suppress ImpureFunctionCall */
124125
if ($callback($value, $key)) {
125126
$tbr[$key] = $value;
126127
}
@@ -143,6 +144,7 @@ final public function map(callable $callback): self
143144
/** @var array<TKey, ReturnType> $tbr */
144145
$tbr = [];
145146
foreach ($this->sequence as $key => $value) {
147+
/** @psalm-suppress ImpureFunctionCall */
146148
$tbr[$key] = $callback($value, $key);
147149
}
148150

@@ -162,6 +164,7 @@ final public function map(callable $callback): self
162164
final public function reduce(callable $callback, $initial = null)
163165
{
164166
foreach ($this->sequence as $key => $value) {
167+
/** @psalm-suppress ImpureFunctionCall */
165168
$initial = $callback($initial, $value, $key);
166169
}
167170

@@ -223,6 +226,7 @@ public function join(?string $glue = null): string
223226
public function each(callable $callable): self
224227
{
225228
foreach ($this->sequence as $key => $value) {
229+
/** @psalm-suppress ImpureFunctionCall */
226230
$callable($value, $key);
227231
}
228232

0 commit comments

Comments
 (0)