Skip to content

Commit 89660b6

Browse files
committed
phpstan bump
1 parent 572de4c commit 89660b6

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
},
1717
"require-dev": {
1818
"ext-curl": "*",
19-
"phpstan/phpstan": "^1.4.6",
19+
"phpstan/phpstan": "^1.11.3",
2020
"nette/tester": "v2.3.1",
2121
"elasticsearch/elasticsearch": "^7",
2222
"guzzlehttp/guzzle": "^6.3",

phpstan.neon

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
parameters:
22
ignoreErrors:
3-
- "#Call to function array_key_exists\\(\\) with string and array<int, string> will always evaluate to false#"
4-
5-
checkMissingIterableValueType: false
6-
checkGenericClassInNonGenericObjectType: false
3+
-
4+
identifier: missingType.generics
5+
-
6+
identifier: missingType.iterableValue

src/Response/Result/Hit.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -159,22 +159,22 @@ public function getFloatOrNullValue(string $key): float|null
159159

160160
public function getSubValue(string $key): mixed
161161
{
162-
if (\str_contains($key, \Spameri\ElasticQuery\Mapping\Settings\Mapping\FieldSeparator::FIELD_SEPARATOR) === TRUE) {
162+
if (\str_contains($key, \Spameri\ElasticQuery\Mapping\Settings\Mapping\FieldSeparator::FIELD_SEPARATOR) === true) {
163163
$levels = \explode(\Spameri\ElasticQuery\Mapping\Settings\Mapping\FieldSeparator::FIELD_SEPARATOR, $key);
164164

165-
$value = $this->source[$levels[0]] ?? NULL;
165+
$value = $this->source[$levels[0]] ?? null;
166166
unset($levels[0]);
167167

168168
foreach ($levels as $subKey) {
169-
$value = $value[$subKey] ?? NULL;
169+
$value = $value[$subKey] ?? null;
170170
}
171171

172-
if ($value !== NULL) {
172+
if ($value !== null) {
173173
return $value;
174174
}
175175
}
176176

177-
return NULL;
177+
return null;
178178
}
179179

180180

0 commit comments

Comments
 (0)