Passed
Pull Request — master (#343)
by Sergei
08:05 queued 05:38
created

ConjunctionCondition   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 17
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 2 1
A fromArrayDefinition() 0 3 1
A getExpressions() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Yiisoft\Db\QueryBuilder\Conditions;
6
7
use Yiisoft\Db\QueryBuilder\Conditions\Interface\ConjunctionConditionInterface;
8
9
/**
10
 * Class ConjunctionCondition.
11
 */
12
abstract class ConjunctionCondition implements ConjunctionConditionInterface
13
{
14
    final public function __construct(protected array $expressions)
15
    {
16
    }
17
18
    public function getExpressions(): array
19
    {
20
        return $this->expressions;
21
    }
22
23
    /**
24
     * @psalm-suppress MixedArgument
25
     */
26
    public static function fromArrayDefinition(string $operator, array $operands): self
27
    {
28
        return new static($operands);
29
    }
30
}
31