Various code cleanup.

This commit is contained in:
James Cole
2021-05-24 08:57:02 +02:00
parent d60650cff2
commit ad54163518
21 changed files with 157 additions and 164 deletions

View File

@@ -74,6 +74,7 @@ class CacheProperties
/**
* @return bool
* @throws JsonException
*/
public function has(): bool
{
@@ -86,14 +87,13 @@ class CacheProperties
}
/**
* @throws JsonException
*/
private function hash(): void
{
$content = '';
foreach ($this->properties as $property) {
try {
$content .= json_encode($property, JSON_THROW_ON_ERROR, 512);
$content .= json_encode($property, JSON_THROW_ON_ERROR);
} catch (JsonException $e) {
// @ignoreException
$content .= hash('sha256', (string)time());