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

SchemaManager::getProviders()   A

Complexity

Conditions 6
Paths 9

Size

Total Lines 16
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 9
CRAP Score 6

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 8
c 1
b 0
f 0
dl 0
loc 16
ccs 9
cts 9
cp 1
rs 9.2222
cc 6
nc 9
nop 0
crap 6
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