Issues (56)

src/AuraSqlQuerySelectProvider.php (1 issue)

Labels
Severity
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Ray\AuraSqlModule;
6
7
use Aura\SqlQuery\Common\SelectInterface;
8
use Aura\SqlQuery\QueryFactory;
9
use Override;
10
use Ray\AuraSqlModule\Annotation\AuraSqlQueryConfig;
11
use Ray\Di\ProviderInterface;
12
13
/** @implements ProviderInterface<SelectInterface> */
14
final readonly class AuraSqlQuerySelectProvider implements ProviderInterface
0 ignored issues
show
A parse error occurred: Syntax error, unexpected T_READONLY, expecting T_CLASS on line 14 at column 6
Loading history...
15
{
16
    /** @param string $db The database type */
17
    public function __construct(
18
        #[AuraSqlQueryConfig]
19
        private string $db
20
    ) {
21
    }
22
23
    /**
24
     * {@inheritDoc}
25
     */
26
    #[Override]
27
    public function get(): SelectInterface
28
    {
29
        return new QueryFactory($this->db)->newSelect();
30
    }
31
}
32