Skip to content

Commit

Permalink
Allow null for phpstan
Browse files Browse the repository at this point in the history
  • Loading branch information
Camwyn committed Oct 23, 2023
1 parent e44274b commit 2f50c7c
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/DB/DB.php
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ public static function prefix( $tableName ) {
* Create QueryBuilder instance
*
* @param string|RawSQL $table
* @param string $alias
* @param null|string $alias
*
* @return QueryBuilder
*/
Expand Down
2 changes: 1 addition & 1 deletion src/DB/QueryBuilder/Clauses/From.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class From {

/**
* @param string|RawSQL $table
* @param string $alias
* @param null|string $alias
*/
public function __construct( $table, $alias = '' ) {
$this->table = QueryBuilder::prefixTable( $table );
Expand Down
2 changes: 1 addition & 1 deletion src/DB/QueryBuilder/Clauses/Join.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class Join {
/**
* @param string $table
* @param string $joinType \StellarWP\DB\QueryBuilder\Types\JoinType
* @param string $alias
* @param null|string $alias
*/
public function __construct( $joinType, $table, $alias = '' ) {
$this->table = QueryBuilder::prefixTable( $table );
Expand Down
2 changes: 1 addition & 1 deletion src/DB/QueryBuilder/Clauses/Select.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class Select {

/**
* @param string $column
* @param string $alias
* @param null|string $alias
*/
public function __construct( $column, $alias = '' ) {
$this->column = trim( $column );
Expand Down
2 changes: 1 addition & 1 deletion src/DB/QueryBuilder/Concerns/FromClause.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ trait FromClause {

/**
* @param string|RawSQL $table
* @param string $alias
* @param null|string $alias
*
* @return $this
*/
Expand Down
6 changes: 3 additions & 3 deletions src/DB/QueryBuilder/Concerns/JoinClause.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function join( $callback ) {
* @param string|RawSQL $table
* @param string $column1
* @param string $column2
* @param string $alias
* @param null|string $alias
*
* @return static
*/
Expand All @@ -56,7 +56,7 @@ function ( JoinQueryBuilder $builder ) use ( $table, $column1, $column2, $alias
* @param string|RawSQL $table
* @param string $column1
* @param string $column2
* @param string $alias
* @param null|string $alias
*
* @return static
*/
Expand All @@ -76,7 +76,7 @@ function ( JoinQueryBuilder $builder ) use ( $table, $column1, $column2, $alias
* @param string|RawSQL $table
* @param string $column1
* @param string $column2
* @param string $alias
* @param null|string $alias
*
* @return static
*/
Expand Down
10 changes: 5 additions & 5 deletions src/DB/QueryBuilder/JoinQueryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class JoinQueryBuilder {

/**
* @param string|RawSQL $table
* @param string $alias
* @param null|string $alias
*
* @return $this
*/
Expand All @@ -33,7 +33,7 @@ public function leftJoin( $table, $alias = '' ) {

/**
* @param string|RawSQL $table
* @param string $alias
* @param null|string $alias
*
* @return $this
*/
Expand All @@ -47,7 +47,7 @@ public function rightJoin( $table, $alias = '' ) {

/**
* @param string|RawSQL $table
* @param string $alias
* @param null|string $alias
*
* @return $this
*/
Expand Down Expand Up @@ -122,11 +122,11 @@ public function joinRaw( $sql, ...$args ) {
*
* @param string $joinType
* @param string|RawSQL $table
* @param string $alias
* @param null|string $alias
*
* @return $this
*/
private function join( $joinType, $table, $alias ) {
private function join( $joinType, $table, $alias = '' ) {
$this->joins[] = new Join(
$joinType,
$table,
Expand Down

0 comments on commit 2f50c7c

Please sign in to comment.