Skip to content

Commit b86637e

Browse files
committed
Remove rememberPossiblyImpureFunctionValues:false from PHPStan config
1 parent e740984 commit b86637e

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

phpstan.neon.dist

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ includes:
33
parameters:
44
level: 6
55
treatPhpDocTypesAsCertain: false
6-
rememberPossiblyImpureFunctionValues: false
76
checkGenericClassInNonGenericObjectType: false
87
paths:
98
- load.php

tests/plugins/webp-uploads/image-edit-tests.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,11 @@ public function it_should_use_the_next_available_hash_for_the_full_size_image_on
397397
remove_filter( 'wp_update_attachment_metadata', 'webp_uploads_update_attachment_metadata' );
398398

399399
$editor->rotate_right()->save();
400-
$this->assertSizeNameIsHashed( 'full', webp_uploads_get_next_full_size_key_from_backup( $attachment_id ) );
400+
401+
$full_size_key = webp_uploads_get_next_full_size_key_from_backup( $attachment_id );
402+
// @phpstan-ignore-next-line -- Work around PHPStan remembering the return value above being null but now being a string. This is instead of adding rememberPossiblyImpureFunctionValues:false to the config.
403+
$this->assertIsString( $full_size_key );
404+
$this->assertSizeNameIsHashed( 'full', $full_size_key );
401405
}
402406

403407
/**

0 commit comments

Comments
 (0)