File tree 3 files changed +9
-4
lines changed
3 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 90
90
91
91
- name : Run PHPStan
92
92
if : ${{ matrix.RUN_PHPSTAN }}
93
- run : docker run --rm -u "$(id -u):$(id -g)" -v "$(pwd):/workdir" 'test:${{ matrix.PHP_VERSION }}' php ./vendor/bin/phpstan analyse --level max src/ tests/
93
+ run : docker run --rm -u "$(id -u):$(id -g)" -v "$(pwd):/workdir" 'test:${{ matrix.PHP_VERSION }}' php -d 'memory_limit=2G' ./vendor/bin/phpstan analyse --level max src/ tests/
94
94
95
95
- name : Run psalm
96
96
if : ${{ matrix.RUN_PSALM }}
Original file line number Diff line number Diff line change @@ -392,6 +392,8 @@ final public static function getConstants()
392
392
$ constants = $ scopeConstants + $ constants ;
393
393
} while (($ reflection = $ reflection ->getParentClass ()) && $ reflection ->name !== __CLASS__ );
394
394
395
+ /** @var array<string, null|bool|int|float|string|array<mixed>> $constants */
396
+
395
397
assert (
396
398
self ::noAmbiguousValues ($ constants ),
397
399
'Ambiguous enumerator values detected for ' . static ::class
Original file line number Diff line number Diff line change @@ -477,10 +477,13 @@ public function testSerializable(): void
477
477
478
478
public function testIsEmpty (): void
479
479
{
480
- /** @var array<int, string> $items2 */
481
- $ items2 = array_combine (Enum32::getValues (), Enum32::getNames ());
480
+ $ makeItems2 = function () {
481
+ foreach (Enum32::getEnumerators () as $ enumerator ) {
482
+ yield $ enumerator => $ enumerator ->getName ();
483
+ }
484
+ };
482
485
$ map1 = new EnumMap (Enum32::class, []);
483
- $ map2 = new EnumMap (Enum32::class, $ items2 );
486
+ $ map2 = new EnumMap (Enum32::class, $ makeItems2 () );
484
487
485
488
$ this ->assertTrue ($ map1 ->isEmpty ());
486
489
$ this ->assertFalse ($ map2 ->isEmpty ());
You can’t perform that action at this time.
0 commit comments