Skip to content

Commit

Permalink
Merge pull request #20 from netlogix/automated-apply-coding-standards
Browse files Browse the repository at this point in the history
  • Loading branch information
saschanowak committed Jun 19, 2024
2 parents bd74125 + b8c7224 commit 11a6332
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 11a6332

Please sign in to comment.