Passed
Push — feature/initial-implementation ( 3b7c72...40c5a6 )
by Fike
01:49
created

ListenerProvider   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
dl 0
loc 18
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getClassListeners() 0 6 1
A getPropertyListeners() 0 7 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace AmaTeam\ElasticSearch\Entity\Annotation;
6
7
use AmaTeam\ElasticSearch\Entity\Annotation\Listener\Indexing\DocumentAnnotationListener;
8
use AmaTeam\ElasticSearch\Entity\Annotation\Listener\Mapping\Clazz\ClassParameterAnnotationListener;
9
use AmaTeam\ElasticSearch\Entity\Annotation\Listener\Mapping\Clazz\ClassTypeAnnotationListener;
10
use AmaTeam\ElasticSearch\Entity\Annotation\Listener\Mapping\Property\PropertyForcedViewsAnnotationListener;
11
use AmaTeam\ElasticSearch\Entity\Annotation\Listener\Mapping\Property\PropertyParameterAnnotationListener;
12
use AmaTeam\ElasticSearch\Entity\Annotation\Listener\Mapping\Property\PropertyTargetClassAnnotationListener;
13
use AmaTeam\ElasticSearch\Entity\Annotation\Listener\Mapping\Property\PropertyTypeAnnotationListener;
14
15
/**
16
 * Silly direct dependency decoupling
17
 */
18
class ListenerProvider
19
{
20
    public static function getClassListeners(): array
21
    {
22
        return [
23
            new DocumentAnnotationListener(),
24
            new ClassParameterAnnotationListener(),
25
            new ClassTypeAnnotationListener(),
26
        ];
27
    }
28
29
    public static function getPropertyListeners(): array
30
    {
31
        return [
32
            new PropertyTargetClassAnnotationListener(),
33
            new PropertyTypeAnnotationListener(),
34
            new PropertyParameterAnnotationListener(),
35
            new PropertyForcedViewsAnnotationListener(),
36
        ];
37
    }
38
}
39