blob: baf5aae079708388fd5d9c7f9aca391d742d333f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
<?php
declare(strict_types=1);
namespace Nsfisis\Albatross\Sql\Internal;
/**
* @internal
*/
final class SelectFirst
{
public function __construct(
private readonly Select $inner,
) {
}
/**
* @param array<string, string|int> $params
* @return ?array<string, string>
*/
public function execute(array $params = []): ?array
{
$result = $this->inner->execute($params);
return $result[0] ?? null;
}
}
|