Skip to content

Commit d0c7b81

Browse files
committed
Remove Hash class in-favor of directly calling PHP's hash function.
1 parent 79e2ff7 commit d0c7b81

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

src/SettingsApiFactory.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
namespace Dwnload\WpSettingsApi;
66

77
use Dwnload\WpSettingsApi\Api\PluginSettings;
8-
use TheFrosty\WpUtilities\Api\Hash;
8+
use function hash;
99
use function json_encode;
1010

1111
/**
@@ -44,8 +44,6 @@ public static function create(array $fields): PluginSettings
4444
*/
4545
private static function getId(array $fields): string
4646
{
47-
return (new class {
48-
use Hash;
49-
})->getHashedKey(json_encode($fields));
47+
return hash('sha256', json_encode($fields));
5048
}
5149
}

0 commit comments

Comments
 (0)