Skip to content

Commit

Permalink
TE-8140 early return
Browse files Browse the repository at this point in the history
  • Loading branch information
gechetspr committed Dec 29, 2020
1 parent e9b8e59 commit bb9ef01
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,17 @@ public function __construct(array $widgetCacheKeyGeneratorPlugins = [])
*/
public function generateCacheKey(string $widgetClassName, array $arguments): ?string
{
if (isset(static::$widgetCacheKeyGeneratorPlugins[$widgetClassName])) {
$key = static::$widgetCacheKeyGeneratorPlugins[$widgetClassName]->generateCacheKey($arguments);
if (!isset(static::$widgetCacheKeyGeneratorPlugins[$widgetClassName])) {
return md5($widgetClassName . serialize($arguments));
}

if ($key === null) {
return null;
}
$key = static::$widgetCacheKeyGeneratorPlugins[$widgetClassName]->generateCacheKey($arguments);

return md5($widgetClassName . $key);
if ($key === null) {
return null;
}

return md5($widgetClassName . serialize($arguments));
return md5($widgetClassName . $key);
}

/**
Expand Down

0 comments on commit bb9ef01

Please sign in to comment.