src/DefaultContextFactory.php
public function setDefaultAccessPolicy(int $policy): int
    {
        $previous = $this->defaultAccessPolicy;
        
        switch ($policy) {
            case Context::ACCESS_POLICY_RETURN_NULL:
            case Context::ACCESS_POLICY_THROW_EXCEPTION:
                $this->defaultAccessPolicy = $policy;
                break;
            default:
                throw new \InvalidArgumentException(\sprintf('Unsupported default access policy: %s', $policy));
        }
        
        return $previous;
    }
public function setDefaultAccessPolicy(int $policy): int
    {
        $previous = $this->defaultAccessPolicy;
        
        switch ($policy) {
            case Context::ACCESS_POLICY_RETURN_NULL:
            case Context::ACCESS_POLICY_THROW_EXCEPTION:
                $this->defaultAccessPolicy = $policy;
                break;
            default:
                throw new \InvalidArgumentException(\sprintf('Unsupported default access policy: %s', $policy));
        }
        
        return $previous;
    }
{@inheritdoc}