Completed
Pull Request — 1.1 (#636)
by
unknown
02:42
created

ParentDocument::getSettings()   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
c 1
b 0
f 0
dl 0
loc 6
rs 9.4285
cc 1
eloc 3
nc 1
nop 0
1
<?php
2
3
/*
4
 * This file is part of the ONGR package.
5
 *
6
 * (c) NFQ Technologies UAB <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace ONGR\ElasticsearchBundle\Annotation;
13
14
/**
15
 * Annotation used to enable parent-child relationship.
16
 *
17
 * @Annotation
18
 * @Target("PROPERTY")
19
 */
20
final class ParentDocument implements MetaField
21
{
22
    /**
23
     * Parent document class name.
24
     *
25
     * @var string
26
     *
27
     * @Doctrine\Common\Annotations\Annotation\Required
28
     */
29
    public $class;
30
31
    /**
32
     * {@inheritdoc}
33
     */
34
    public function getName()
35
    {
36
        return '_parent';
37
    }
38
39
    /**
40
     * {@inheritdoc}
41
     */
42
    public function getSettings()
43
    {
44
        return [
45
            'type' => null, // Actual value will be generated from $class property
46
        ];
47
    }
48
}
49