Issues (41)

src/AuraSqlQueryInsertProvider.php (1 issue)

Labels
Severity
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Ray\AuraSqlModule;
6
7
use Aura\SqlQuery\Common\InsertInterface;
8
use Aura\SqlQuery\QueryFactory;
9
use Override;
10
use Ray\AuraSqlModule\Annotation\AuraSqlQueryConfig;
11
use Ray\Di\ProviderInterface;
12
13
/** @implements ProviderInterface<InsertInterface> */
14
final readonly class AuraSqlQueryInsertProvider 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
    /**
17
     * @param string $db The database type
18
     *
19
     * @AuraSqlQueryConfig
20
     */
21
    #[AuraSqlQueryConfig]
22
    public function __construct(private string $db)
23
    {
24
    }
25
26
    /**
27
     * {@inheritDoc}
28
     */
29
    #[Override]
30
    public function get(): InsertInterface
31
    {
32
        return new QueryFactory($this->db)->newInsert();
33
    }
34
}
35