Passed
Pull Request — master (#68)
by Aleksei
02:29
created

SchemaManager   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 2
Bugs 1 Features 0
Metric Value
wmc 4
eloc 6
c 2
b 1
f 0
dl 0
loc 21
ccs 0
cts 8
cp 0
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A withConfig() 0 3 1
A read() 0 3 1
A clear() 0 3 1
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