Skip to content

Commit 3e090b6

Browse files
committed
PHPStan fixes
1 parent 8616c97 commit 3e090b6

File tree

2 files changed

+0
-6
lines changed

2 files changed

+0
-6
lines changed

phpstan.neon.dist

-3
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@ parameters:
2727
-
2828
message: '/\(int\) does not accept int\|WP_Error\.$/'
2929
path: tests/phpunit/integration/tests
30-
-
31-
message: '/^Parameter #1 \$post of function set_post_thumbnail expects int\|WP_Post, int\|WP_Error given\.$/'
32-
path: tests/phpunit/integration/tests
3330
-
3431
message: '/^Call to deprecated method _get_first_available_transport\(\)/'
3532
path: includes/REST_API/Hotlinking_Controller.php

tests/phpunit/unit/includes/ScriptHash.php

-3
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,6 @@ trait ScriptHash {
4141
*/
4242
public function generate_script_hash( string $script ): ?string {
4343
$sha384 = hash( 'sha384', $script, true );
44-
if ( ! $sha384 ) {
45-
return null;
46-
}
4744
$hash = str_replace(
4845
[ '+', '/', '=' ],
4946
[ '-', '_', '.' ],

0 commit comments

Comments
 (0)