report; } public function getContext(): ?string { return $this->context; } /** * @return bool */ public function checkContext($context) { if (empty($this->context)) { return true; } if (is_array($context)) { $res = array_filter($context, fn ($elem) => 0 === stripos($this->context, (string) $elem)); return count($res) > 0; } elseif ($this->context == $context) { return true; } elseif (0 === stripos($this->context, (string) $context)) { return true; } else { return false; } } }