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