/** * {@inheritdoc} */ public function isValidBetween(Name $from, Name $to) { $this->lastResult = $this->inspector->isAllowed($from->toString(), $to->toString()); if (!is_null($this->collector) && $this->lastResult->isDenied()) { $this->collector->major(new PolicyViolation($from, $to, $this->lastResult)); } if (!is_null($this->collector) && $this->lastResult->isUndefined()) { $this->collector->undefined(new PolicyViolation($from, $to, $this->lastResult)); } return $this->lastResult->isAllowed(); }