operator = $operator; $this->operands = $operands; } /** * @param Flag|FlagExpression ...$operands * * @return static */ public static function and(...$operands): self { return new self('and', $operands); } /** * @param Flag|FlagExpression ...$operands * * @return static */ public static function or(...$operands): self { return new self('or', $operands); } public function getOperator(): string { return $this->operator; } /** * @return array * @psalm-return (Flag|FlagExpression)[] */ public function getOperands(): array { return $this->operands; } }