Param::getValue()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
dl 0
loc 3
rs 10
c 1
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Yiisoft\Db\Command;
6
7
use Yiisoft\Db\Expression\ExpressionInterface;
8
9
/**
10
 * Represents a parameter used in building an SQL statement.
11
 *
12
 * It can be used to represent a placeholder in an SQL statement, and can be bound to a specific value when the
13
 * statement is executed.
14
 *
15
 * It can also represent a column name or table name, depending on the context in which it's
16
 * used. The class provides methods for specifying the parameter name, value, as well as methods for quoting and
17
 * escaping the parameter value to ensure that it's handled by the database.
18
 */
19
final class Param implements ParamInterface, ExpressionInterface
20
{
21
    public function __construct(private mixed $value, private int $type)
22
    {
23
    }
24
25
    public function getType(): int
26
    {
27
        return $this->type;
28
    }
29
30
    public function getValue(): mixed
31
    {
32
        return $this->value;
33
    }
34
}
35