99use Yiisoft \Db \Expression \ExpressionInterface ;
1010use Yiisoft \Db \QueryBuilder \Condition \Interface \BetweenColumnsConditionInterface ;
1111
12+ use function is_array ;
13+ use function is_int ;
14+ use function is_string ;
15+
1216/**
1317 * Class BetweenColumnCondition represents a `BETWEEN` condition where values are between two columns.
1418 *
@@ -65,7 +69,9 @@ public function getValue(): array|int|string|Iterator|ExpressionInterface
6569 }
6670
6771 /**
68- * @throws InvalidArgumentException
72+ * Creates a condition based on the given operator and operands.
73+ *
74+ * @throws InvalidArgumentException If the number of operands is not 3.
6975 */
7076 public static function fromArrayDefinition (string $ operator , array $ operands ): self
7177 {
@@ -81,6 +87,11 @@ public static function fromArrayDefinition(string $operator, array $operands): s
8187 );
8288 }
8389
90+ /**
91+ * Validates the given value to be arrayed, int, string, Iterator or ExpressionInterface.
92+ *
93+ * @throws InvalidArgumentException If the value is not arrayed, int, string, Iterator or ExpressionInterface.
94+ */
8495 private static function validateValue (
8596 string $ operator ,
8697 mixed $ value
@@ -100,6 +111,11 @@ private static function validateValue(
100111 );
101112 }
102113
114+ /**
115+ * Validates the given interval start column to be string or ExpressionInterface.
116+ *
117+ * @throws InvalidArgumentException If the interval start column is not string or ExpressionInterface.
118+ */
103119 private static function validateIntervalStartColumn (
104120 string $ operator ,
105121 mixed $ intervalStartColumn
@@ -116,6 +132,11 @@ private static function validateIntervalStartColumn(
116132 );
117133 }
118134
135+ /**
136+ * Validates the given interval end column to be string or ExpressionInterface.
137+ *
138+ * @throws InvalidArgumentException If the interval end column is not string or ExpressionInterface.
139+ */
119140 private static function validateIntervalEndColumn (
120141 string $ operator ,
121142 mixed $ intervalEndColumn
0 commit comments