packages/sql-catalog/tests/Fake/PairModel.php
1<?php
2
3declare(strict_types=1);
4
5namespace Tests\Fake;
6
7use SqlCatalog\Core\Evaluation\ArrayEntry;
8use SqlCatalog\Core\Evaluation\ArrayTerm;
9use SqlCatalog\Core\Evaluation\Domain;
10
11/**
12 * A custom model that selects two placeholders.
13 */
14final class PairModel
15{
16 /**
17 * @param list<Domain> $arguments
18 */
19 public function __invoke(array $arguments): Domain
20 {
21 return self::evaluate($arguments);
22 }
23
24 /**
25 * @param list<Domain> $arguments
26 */
27 public static function evaluate(array $arguments): Domain
28 {
29 return Domain::of(new ArrayTerm([
30 new ArrayEntry(null, Domain::literal('?')),
31 new ArrayEntry(null, Domain::literal('?')),
32 ]));
33 }
34}
35