Completed
Push — 6.0-dev ( ff3406 )
by Simonas
02:12
created

ObjectType   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A dump() 0 7 1
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 to mark a class as an object during the parsing process.
16
 *
17
 * `Object` name as class name is forbidden in PHP 7 but we never create this
18
 *  class as object and only use it for annotation definition.
19
 *
20
 * @Annotation
21
 * @Target("CLASS")
22
 */
23
final class ObjectType
24
{
25
    const NAME = 'object';
26
27
    /**
28
     * In this field you can define options.
29
     *
30
     * @var array
31
     */
32
    public $options = [];
33
34
    /**
35
     * {@inheritdoc}
36
     */
37
    public function dump(array $exclude = [])
38
    {
39
        return array_diff_key(
40
            $this->options,
41
            $exclude
42
        );
43
    }
44
}