diff --git a/src/Extension/SandboxExtension.php b/src/Extension/SandboxExtension.php index 7705ffb688a..2230810359f 100644 --- a/src/Extension/SandboxExtension.php +++ b/src/Extension/SandboxExtension.php @@ -63,11 +63,12 @@ public function isSandboxedGlobally() return $this->sandboxedGlobally; } - private function isSourceSandboxed(?Source $source) : bool + private function isSourceSandboxed(?Source $source): bool { - if ($source === null || $this->sourcePolicy === null) { + if (null === $source || null === $this->sourcePolicy) { return false; } + return $this->sourcePolicy->enableSandbox($source); }