Passed
Push — master ( d5dda9...c69dbe )
by Alexander
02:26
created

SchemaManager::withConfig()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
eloc 1
c 0
b 0
f 0
dl 0
loc 3
ccs 0
cts 2
cp 0
rs 10
cc 1
nc 1
nop 1
crap 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Yiisoft\Yii\Cycle\Schema;
6
7
/**
8
 * @deprecated moved to {@see \Yiisoft\Yii\Cycle\Schema\Provider\Support\SchemaProviderPipeline}
9
 */
10
final class SchemaManager implements SchemaProviderInterface
11
{
12
    private SchemaProviderInterface $provider;
13
14
    public function __construct(SchemaProviderInterface $provider)
15
    {
16
        $this->provider = $provider;
17
    }
18
19
    public function read(?SchemaProviderInterface $nextProvider = null): ?array
20
    {
21
        return $this->provider->read();
22
    }
23
24
    public function clear(): bool
25
    {
26
        return $this->provider->clear();
27
    }
28
    public function withConfig(array $config): SchemaProviderInterface
29
    {
30
        return clone $this;
31
    }
32
}
33