18
18
use function is_int ;
19
19
use Laudis \Neo4j \Contracts \ConnectionInterface ;
20
20
use Laudis \Neo4j \Contracts \FormatterInterface ;
21
- use Laudis \Neo4j \Databags \Result ;
21
+ use Laudis \Neo4j \Databags \SummarizedResult ;
22
22
use Laudis \Neo4j \Databags \ResultSummary ;
23
23
use Laudis \Neo4j \Databags \ServerInfo ;
24
24
use Laudis \Neo4j \Databags \Statement ;
36
36
* @psalm-import-type CypherResponse from \Laudis\Neo4j\Contracts\FormatterInterface
37
37
* @psalm-import-type BoltCypherStats from \Laudis\Neo4j\Contracts\FormatterInterface
38
38
*
39
- * @implements FormatterInterface<Result <T>>
39
+ * @implements FormatterInterface<SummarizedResult <T>>
40
40
*/
41
- final class ResultFormatter implements FormatterInterface
41
+ final class SummarizedResultFormatter implements FormatterInterface
42
42
{
43
43
/** @var FormatterInterface<T> */
44
44
private FormatterInterface $ formatter ;
@@ -51,7 +51,7 @@ public function __construct(FormatterInterface $formatter)
51
51
$ this ->formatter = $ formatter ;
52
52
}
53
53
54
- public function formatHttpStats (array $ response , ConnectionInterface $ connection , Statement $ statement , float $ resultAvailableAfter , float $ resultConsumedAfter , CypherList $ results ): Result
54
+ public function formatHttpStats (array $ response , ConnectionInterface $ connection , Statement $ statement , float $ resultAvailableAfter , float $ resultConsumedAfter , CypherList $ results ): SummarizedResult
55
55
{
56
56
if (!isset ($ response ['stats ' ])) {
57
57
throw new UnexpectedValueException ('No stats found in the response set ' );
@@ -91,7 +91,7 @@ public function formatHttpStats(array $response, ConnectionInterface $connection
91
91
)
92
92
);
93
93
94
- return new Result ($ results , $ summary );
94
+ return new SummarizedResult ($ results , $ summary );
95
95
}
96
96
97
97
/**
@@ -129,7 +129,7 @@ public function formatBoltStats(array $response): SummaryCounters
129
129
);
130
130
}
131
131
132
- public function formatBoltResult (array $ meta , array $ results , ConnectionInterface $ connection , float $ resultAvailableAfter , float $ resultConsumedAfter , Statement $ statement ): Result
132
+ public function formatBoltResult (array $ meta , array $ results , ConnectionInterface $ connection , float $ resultAvailableAfter , float $ resultConsumedAfter , Statement $ statement ): SummarizedResult
133
133
{
134
134
$ last = array_key_last ($ results );
135
135
if (!isset ($ results [$ last ])) {
@@ -158,12 +158,12 @@ public function formatBoltResult(array $meta, array $results, ConnectionInterfac
158
158
);
159
159
$ formattedResult = $ this ->formatter ->formatBoltResult ($ meta , $ results , $ connection , $ resultAvailableAfter , $ resultConsumedAfter , $ statement );
160
160
161
- return new Result ($ formattedResult , $ summary );
161
+ return new SummarizedResult ($ formattedResult , $ summary );
162
162
}
163
163
164
164
public function formatHttpResult (ResponseInterface $ response , array $ body , ConnectionInterface $ connection , float $ resultsAvailableAfter , float $ resultsConsumedAfter , iterable $ statements ): CypherList
165
165
{
166
- /** @var Vector<Result > $tbr */
166
+ /** @var Vector<SummarizedResult > $tbr */
167
167
$ tbr = new Vector ();
168
168
169
169
$ toDecorate = $ this ->formatter ->formatHttpResult ($ response , $ body , $ connection , $ resultsAvailableAfter , $ resultsConsumedAfter , $ statements );
0 commit comments