Completed
Push — master ( 882947...a4a53d )
by Mike
13:52 queued 13:46
created

StubSchemaProvider   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 20
c 0
b 0
f 0
ccs 5
cts 5
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A createSchema() 0 4 1
1
<?php
2
3
namespace Doctrine\DBAL\Migrations\Provider;
4
5
use Doctrine\DBAL\Schema\Schema;
6
7
/**
8
 * A schemea provider implementation that just returns the schema its given.
9
 *
10
 * @since   1.0.0-alpha3
11
 */
12
final class StubSchemaProvider implements SchemaProviderInterface
13
{
14
    /**
15
     * @var     Schema
16
     */
17
    private $toSchema;
18
19 5
    public function __construct(Schema $schema)
20
    {
21 5
        $this->toSchema = $schema;
22 5
    }
23
24
    /**
25
     * {@inheritdoc}
26
     */
27 5
    public function createSchema()
28
    {
29 5
        return $this->toSchema;
30
    }
31
}
32