@@ -83,48 +83,52 @@ public static function fromArrayDefinition(string $operator, array $operands): s
8383
8484 private static function validateValue (
8585 string $ operator ,
86- mixed $ operand
86+ mixed $ value
8787 ): array |int |string |Iterator |ExpressionInterface {
8888 if (
89- !is_array ($ operand ) &&
90- !is_int ($ operand ) &&
91- !is_string ($ operand ) &&
92- !($ operand instanceof Iterator) &&
93- !($ operand instanceof ExpressionInterface)
89+ !is_array ($ value ) &&
90+ !is_int ($ value ) &&
91+ !is_string ($ value ) &&
92+ !($ value instanceof Iterator) &&
93+ !($ value instanceof ExpressionInterface)
9494 ) {
9595 throw new InvalidArgumentException (
9696 "Operator ' $ operator' requires value to be array, int, string, Iterator or ExpressionInterface. "
9797 );
9898 }
9999
100- return $ operand ;
100+ return $ value ;
101101 }
102102
103- private static function validateIntervalStartColumn (string $ operator , mixed $ operand ): string |ExpressionInterface
104- {
103+ private static function validateIntervalStartColumn (
104+ string $ operator ,
105+ mixed $ intervalStartColumn
106+ ): string |ExpressionInterface {
105107 if (
106- !is_string ($ operand ) &&
107- !($ operand instanceof ExpressionInterface)
108+ !is_string ($ intervalStartColumn ) &&
109+ !($ intervalStartColumn instanceof ExpressionInterface)
108110 ) {
109111 throw new InvalidArgumentException (
110112 "Operator ' $ operator' requires interval start column to be string or ExpressionInterface. "
111113 );
112114 }
113115
114- return $ operand ;
116+ return $ intervalStartColumn ;
115117 }
116118
117- private static function validateIntervalEndColumn (string $ operator , mixed $ operand ): string |ExpressionInterface
118- {
119+ private static function validateIntervalEndColumn (
120+ string $ operator ,
121+ mixed $ intervalEndColumn
122+ ): string |ExpressionInterface {
119123 if (
120- !is_string ($ operand ) &&
121- !($ operand instanceof ExpressionInterface)
124+ !is_string ($ intervalEndColumn ) &&
125+ !($ intervalEndColumn instanceof ExpressionInterface)
122126 ) {
123127 throw new InvalidArgumentException (
124128 "Operator ' $ operator' requires interval end column to be string or ExpressionInterface. "
125129 );
126130 }
127131
128- return $ operand ;
132+ return $ intervalEndColumn ;
129133 }
130134}
0 commit comments