Skip to content

Commit

Permalink
[automated] Apply Coding Standard
Browse files Browse the repository at this point in the history
  • Loading branch information
saschanowak authored and github-actions[bot] committed Jun 19, 2024
1 parent bd74125 commit b8c7224
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions Classes/EventListener/AddCdnToResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,17 @@ class AddCdnToResource
{
protected $configuration = [];

public function __construct(
ExtensionConfiguration $extensionConfiguration = null
) {
$this->configuration = $extensionConfiguration ? $extensionConfiguration->get('nxsimplecdn') :
public function __construct(ExtensionConfiguration $extensionConfiguration = null)
{
$this->configuration = $extensionConfiguration instanceof ExtensionConfiguration ? $extensionConfiguration->get(
'nxsimplecdn'
) :
GeneralUtility::makeInstance(ExtensionConfiguration::class)->get('nxsimplecdn');
}

public function __invoke(GeneratePublicUrlForResourceEvent $event): void
{
if ((bool)$this->configuration['enabled'] === false) {
if (!(bool) $this->configuration['enabled']) {
return;
}

Expand Down

0 comments on commit b8c7224

Please sign in to comment.