| @@ -64,35 +64,15 @@ | ||
| 64 | 64 | * Extends WP_Query to include custom table. |
| 65 | 65 | * |
| 66 | 66 | * @link https://wordpress.stackexchange.com/questions/50305/how-to-extend-wp-query-to-include-custom-table-in-query |
| 67 | 67 | * |
| 68 | - * @param array<string, string>|mixed $clauses Clauses. | |
| 69 | - * @param \WP_Query|mixed $queryObject WP_Query. | |
| 68 | + * @param array<string, string> $clauses Clauses. | |
| 69 | + * @param \WP_Query $queryObject WP_Query. | |
| 70 | 70 | * |
| 71 | - * @return array<string, string>|mixed | |
| 71 | + * @return array<string, string> | |
| 72 | 72 | */ |
| 73 | - public function processClauses( $clauses, $queryObject ) { | |
| 73 | + public function processClauses( array $clauses, \WP_Query $queryObject ): array { | |
| 74 | 74 | if ( $this->contextResolver->isOrderGridPage() === false ) { |
| 75 | - return $clauses; | |
| 76 | - } | |
| 77 | - | |
| 78 | - if ( ! is_array( $clauses ) | |
| 79 | - || array_filter( | |
| 80 | - $clauses, | |
| 81 | - static function ( $value, $key ) { | |
| 82 | - return is_string( $key ) && is_string( $value ); | |
| 83 | - }, | |
| 84 | - ARRAY_FILTER_USE_BOTH | |
| 85 | - ) !== $clauses | |
| 86 | - ) { | |
| 87 | - WcLogger::logArgumentTypeError( __METHOD__, 'clauses', 'array', $clauses ); | |
| 88 | - | |
| 89 | - return $clauses; | |
| 90 | - } | |
| 91 | - | |
| 92 | - if ( ! $queryObject instanceof \WP_Query ) { | |
| 93 | - WcLogger::logArgumentTypeError( __METHOD__, 'queryObject', \WP_Query::class, $queryObject ); | |
| 94 | - | |
| 95 | 75 | return $clauses; |
| 96 | 76 | } |
| 97 | 77 | |
| 98 | 78 | $isOrderPostQueryCall = |