22
33namespace Kir \MySQL \Builder ;
44
5- use DateTimeInterface ;
6- use Kir \MySQL \Builder \Expr \OptionalExpression ;
75use Kir \MySQL \Builder \Expr \OrderBySpecification ;
6+ use Kir \MySQL \Builder \Internal \Types ;
87use Kir \MySQL \Builder \Value \OptionalValue ;
9- use Kir \MySQL \Tools \VirtualTable ;
108
119/**
10+ * @phpstan-import-type DBParameterValueType from Types
11+ * @phpstan-import-type DBTableNameType from Types
12+ * @phpstan-import-type DBWhereExpressionType from Types
1213 */
1314interface Select {
1415 /**
@@ -48,35 +49,35 @@ public function field($expression, $alias = null);
4849 public function fields (array $ fields );
4950
5051 /**
51- * @param null| string $alias
52- * @param null|string|Select|VirtualTable|array<int, null|int|float|string|array<string, mixed>> $table
52+ * @param ($table is null ? DBTableNameType : string) $alias
53+ * @param null|DBTableNameType $table
5354 * @return $this
5455 */
55- public function from (? string $ alias , $ table = null );
56+ public function from ($ alias , $ table = null );
5657
5758 /**
5859 * @param string $alias
59- * @param string|array<int, array<string, mixed>>|Select|VirtualTable $table
60+ * @param DBTableNameType $table
6061 * @param string|null $expression
61- * @param null|scalar|array<int, null|scalar>|DBExpr|Select ...$args
62+ * @param DBParameterValueType ...$args
6263 * @return $this
6364 */
6465 public function joinInner (string $ alias , $ table , ?string $ expression = null , ...$ args );
6566
6667 /**
6768 * @param string $alias
68- * @param string|array<int, array<string, mixed>>|Select|VirtualTable $table
69+ * @param DBTableNameType $table
6970 * @param string $expression
70- * @param null|scalar|array<int, null|scalar>|DBExpr|Select ...$args
71+ * @param DBParameterValueType ...$args
7172 * @return $this
7273 */
7374 public function joinLeft (string $ alias , $ table , string $ expression , ...$ args );
7475
7576 /**
7677 * @param string $alias
77- * @param string|array<int, array<string, mixed>>|Select|VirtualTable $table
78+ * @param DBTableNameType $table
7879 * @param string $expression
79- * @param null|scalar|array<int, null|scalar>|DBExpr|Select ...$args
80+ * @param DBParameterValueType ...$args
8081 * @return $this
8182 */
8283 public function joinRight (string $ alias , $ table , string $ expression , ...$ args );
@@ -94,15 +95,15 @@ public function union(...$queries);
9495 public function unionAll (...$ queries );
9596
9697 /**
97- * @param string|array<string, mixed>|object|OptionalExpression $expression
98- * @param null|scalar|array<int, null|scalar>|DBExpr|Select|DateTimeInterface ...$args
98+ * @param DBWhereExpressionType $expression
99+ * @param DBParameterValueType ...$args
99100 * @return $this
100101 */
101102 public function where ($ expression , ...$ args );
102103
103104 /**
104- * @param string|array<string, mixed>|object|OptionalExpression $expression
105- * @param null|scalar|array<int, null|scalar>|DBExpr|Select|DateTimeInterface ...$args
105+ * @param DBWhereExpressionType $expression
106+ * @param DBParameterValueType ...$args
106107 * @return $this
107108 */
108109 public function having ($ expression , ...$ args );
0 commit comments