Completed
Push — master ( 51f6ca...e53887 )
by Alexander
01:34
created

Collection   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 20
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
1
<?php
2
/**
3
 * Ember Db - An embeddable document database for php.
4
 * Copyright (C) 2016 Alexander During
5
 *
6
 * This program is free software: you can redistribute it and/or modify
7
 * it under the terms of the GNU General Public License as published by
8
 * the Free Software Foundation, either version 3 of the License, or
9
 * (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18
 *
19
 * @link      http://github.com/alexanderduring/php-ember-db
20
 * @copyright Copyright (C) 2016 Alexander During
21
 * @license   http://www.gnu.org/licenses GNU General Public License v3.0
22
 */
23
24
declare(strict_types=1);
25
26
namespace EmberDb\Collection;
27
28
class Collection
29
{
30
    /** @var MetaData */
31
    private $metaData;
32
33
    /** @var string */
34
    private $name;
35
36
    /** @var stromg */
37
    private $path;
38
39
40
41
    public function __construct(string $name, string $path)
42
    {
43
        $this->name = $name;
44
        $this->path = $path;
0 ignored issues
show
Documentation Bug introduced by
It seems like $path of type string is incompatible with the declared type object<EmberDb\Collection\stromg> of property $path.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
45
        $this->metaData = new MetaData($path . '/' . $name . 'meta.edb');
46
    }
47
}