Skip to content
Draft
Prev Previous commit
Next Next commit
Add Psalm-specific annotation
  • Loading branch information
XedinUnknown committed Apr 18, 2021
commit a1a951521662f1bb0c75937c25676e59b62375d2
5 changes: 3 additions & 2 deletions src/Meta/MetaQueryInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
use WpOop\WordPress\Query\QueryConfiguratorInterface;

/**
* @psalm-type FieldConfig = array {key: string, value: mixed, compare: string, type: string}
* @psalm-type FieldConfig = array{key: string, value: mixed, compare: string, type: string}
* @psalm-type MetaQueryConfig = array{relation, ...: FieldConfig|MetaQueryConfig}
*/

/**
Expand Down Expand Up @@ -38,7 +39,7 @@ public function withOr(QueryConfiguratorInterface $query): QueryConfiguratorInte
* @return array The configuration for {@see WP_Meta_Query}.
* An array containing the `relation` key, as well as unlimited numeric keys each of which
* contains a {@see FieldConfig}.
* @psalm-return array{relation: string, 0: FieldConfig}
* @psalm-return MetaQueryConfig
*/
public function getConfig(): array;
}