expressions[] = 'r.' . $key . ' == "' . $value . '"'; } public static function set(string $key, string $value): KeyValue { return new self($key, $value); } public function and(string $key, string $value): KeyValue { $this->expressions[] = 'and r.' . $key . ' == "' . $value . '"'; return $this; } public function or(string $key, string $value): KeyValue { $this->expressions[] = 'or r.' . $key . ' == "' . $value . '"'; return $this; } public function __toString() { return implode(' ', $this->expressions); } }