Skip to content

Commit d472b91

Browse files
committed
resolve feedback
Addresses phpstan#3613 (comment) and phpstan#3613 (comment) The relevate lowercase-string tests do not seem to be affected ... ?
1 parent f319d82 commit d472b91

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

src/Type/Accessory/AccessoryLowercaseStringType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ public function isLowercaseString(): TrinaryLogic
311311

312312
public function isUppercaseString(): TrinaryLogic
313313
{
314-
return TrinaryLogic::createNo();
314+
return TrinaryLogic::createMaybe();
315315
}
316316

317317
public function isClassStringType(): TrinaryLogic

src/Type/Accessory/AccessoryUppercaseStringType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ public function isLiteralString(): TrinaryLogic
306306

307307
public function isLowercaseString(): TrinaryLogic
308308
{
309-
return TrinaryLogic::createNo();
309+
return TrinaryLogic::createMaybe();
310310
}
311311

312312
public function isUppercaseString(): TrinaryLogic

tests/PHPStan/Analyser/nsrt/uppercase-string-parse.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public function parse(string $uppercase, string $string): void
1818
if (array_key_exists('foo', $a)) {
1919
$value = $a['foo'];
2020
if (\is_string($value)) {
21-
assertType('uppercase-string', $value);
21+
assertType('lowercase-string|uppercase-string', $value);
2222
}
2323
}
2424

tests/PHPStan/Analyser/nsrt/uppercase-string-trim.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ class Foo
1212
*/
1313
public function doTrim(string $uppercase, string $string): void
1414
{
15-
assertType('uppercase-string', trim($uppercase));
16-
assertType('uppercase-string', ltrim($uppercase));
17-
assertType('uppercase-string', rtrim($uppercase));
18-
assertType('uppercase-string', trim($uppercase, $string));
19-
assertType('uppercase-string', ltrim($uppercase, $string));
20-
assertType('uppercase-string', rtrim($uppercase, $string));
15+
assertType('lowercase-string|uppercase-string', trim($uppercase));
16+
assertType('lowercase-string|uppercase-string', ltrim($uppercase));
17+
assertType('lowercase-string|uppercase-string', rtrim($uppercase));
18+
assertType('lowercase-string|uppercase-string', trim($uppercase, $string));
19+
assertType('lowercase-string|uppercase-string', ltrim($uppercase, $string));
20+
assertType('lowercase-string|uppercase-string', rtrim($uppercase, $string));
2121
assertType('string', trim($string));
2222
assertType('string', ltrim($string));
2323
assertType('string', rtrim($string));

0 commit comments

Comments
 (0)