deliveryId = $deliveryId; } public function getDeliveryResource(): KernelResource { return new KernelResource($this->deliveryId); } public function isDeliveryRemovalRequested(): bool { return $this->hasInScope(self::SCOPE_DELIVERY); } public function isExecutionsRemovalRequested(): bool { return $this->hasInScope(self::SCOPE_EXECUTIONS); } public function isRecursive(): bool { return $this->hasInScope(self::SCOPE_RESOURCES); } public function setIsRecursive(): self { $this->scope |= self::SCOPE_RESOURCES; return $this; } public function setDeliveryExecutionsOnly(): self { $this->scope = self::SCOPE_EXECUTIONS; return $this; } private function hasInScope(int $scope): bool { return (bool)($this->scope & $scope); } }