Completed
Push — master ( 1f59cc...77c58f )
by Ivannis Suárez
04:09
created

PropertyMetadata::toArray()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 6
rs 9.4285
c 1
b 0
f 0
cc 1
eloc 3
nc 1
nop 0
1
<?php
2
/**
3
 * This file is part of the Cubiche package.
4
 *
5
 * Copyright (c) Cubiche
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace Cubiche\Infrastructure\Doctrine\ODM\MongoDB\Metadata;
12
13
use Cubiche\Core\Metadata\PropertyMetadata as BasePropertyMetadata;
14
15
/**
16
 * PropertyMetadata class.
17
 *
18
 * @author Ivannis Suárez Jerez <[email protected]>
19
 */
20
class PropertyMetadata extends BasePropertyMetadata
21
{
22
    /**
23
     * @var string
24
     */
25
    public $namespace;
26
27
    /**
28
     * @var string
29
     */
30
    public $type;
31
32
    /**
33
     * PropertyMetadata constructor.
34
     *
35
     * @param string $class
36
     * @param string $name
37
     * @param string $namespace
38
     */
39
    public function __construct($class, $name, $namespace)
40
    {
41
        parent::__construct($class, $name);
42
43
        $this->namespace = $namespace;
44
    }
45
46
    /**
47
     * @param string $type
48
     */
49
    public function setType($type)
50
    {
51
        $this->type = $type;
52
    }
53
54
    /**
55
     * @return array
56
     */
57
    public function toArray()
58
    {
59
        return array(
60
            'type' => $this->type,
61
        );
62
    }
63
}
64