File tree Expand file tree Collapse file tree 3 files changed +9
-4
lines changed Expand file tree Collapse file tree 3 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 9090
9191 - name : Run PHPStan
9292 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/
9494
9595 - name : Run psalm
9696 if : ${{ matrix.RUN_PSALM }}
Original file line number Diff line number Diff line change @@ -392,6 +392,8 @@ final public static function getConstants()
392392 $ constants = $ scopeConstants + $ constants ;
393393 } while (($ reflection = $ reflection ->getParentClass ()) && $ reflection ->name !== __CLASS__ );
394394
395+ /** @var array<string, null|bool|int|float|string|array<mixed>> $constants */
396+
395397 assert (
396398 self ::noAmbiguousValues ($ constants ),
397399 '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
477477
478478 public function testIsEmpty (): void
479479 {
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+ };
482485 $ map1 = new EnumMap (Enum32::class, []);
483- $ map2 = new EnumMap (Enum32::class, $ items2 );
486+ $ map2 = new EnumMap (Enum32::class, $ makeItems2 () );
484487
485488 $ this ->assertTrue ($ map1 ->isEmpty ());
486489 $ this ->assertFalse ($ map2 ->isEmpty ());
You can’t perform that action at this time.
0 commit comments