Passed
Pull Request — master (#439)
by Kirill
06:35
created

InterceptedController   A

Complexity

Total Complexity 11

Size/Duplication

Total Lines 95
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 1
Metric Value
eloc 17
dl 0
loc 95
rs 10
c 2
b 0
f 1
wmc 11

11 Methods

Rating   Name   Duplication   Size   Complexity  
A with() 0 3 1
A without() 0 3 1
A dup() 0 3 1
A first() 0 3 1
A mix() 0 3 1
A skip() 0 3 1
A withAttribute() 0 4 1
A mixAttribute() 0 4 1
A firstAttribute() 0 4 1
A dupAttribute() 0 4 1
A skipAttribute() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Spiral\App\Controller;
6
7
use Spiral\App\Interceptor;
8
use Spiral\Domain\Annotation\Pipeline;
9
10
class InterceptedController
11
{
12
    public function without(): array
13
    {
14
        return [__FUNCTION__];
15
    }
16
17
    /**
18
     * @Pipeline(pipeline={Interceptor\One::class, Interceptor\Two::class, Interceptor\Three::class})
19
     * @return array
20
     */
21
    public function with(): array
22
    {
23
        return [__FUNCTION__];
24
    }
25
26
    /**
27
     * @Pipeline(pipeline={Interceptor\One::class, Interceptor\Two::class, Interceptor\Three::class})
28
     * @return array
29
     */
30
    public function mix(): array
31
    {
32
        return [__FUNCTION__];
33
    }
34
35
    /**
36
     * @Pipeline(pipeline={Interceptor\One::class, Interceptor\Two::class, Interceptor\Three::class})
37
     * @return array
38
     */
39
    public function dup(): array
40
    {
41
        return [__FUNCTION__];
42
    }
43
44
    /**
45
     * @Pipeline(pipeline={Interceptor\One::class, Interceptor\Two::class, Interceptor\Three::class}, skipNext=true)
46
     * @return array
47
     */
48
    public function skip(): array
49
    {
50
        return [__FUNCTION__];
51
    }
52
53
    /**
54
     * @Pipeline(pipeline={Interceptor\One::class, Interceptor\Two::class, Interceptor\Three::class}, skipNext=true)
55
     * @return array
56
     */
57
    public function first(): array
58
    {
59
        return [__FUNCTION__];
60
    }
61
62
    /**
63
     * @return array
64
     */
65
    #[Pipeline(pipeline: [Interceptor\One::class, Interceptor\Two::class, Interceptor\Three::class])]
66
    public function withAttribute(): array
67
    {
68
        return [__FUNCTION__];
69
    }
70
71
    /**
72
     * @return array
73
     */
74
    #[Pipeline(pipeline: [Interceptor\One::class, Interceptor\Two::class, Interceptor\Three::class])]
75
    public function mixAttribute(): array
76
    {
77
        return [__FUNCTION__];
78
    }
79
80
    /**
81
     * @return array
82
     */
83
    #[Pipeline(pipeline: [Interceptor\One::class, Interceptor\Two::class, Interceptor\Three::class])]
84
    public function dupAttribute(): array
85
    {
86
        return [__FUNCTION__];
87
    }
88
89
    /**
90
     * @return array
91
     */
92
    #[Pipeline(pipeline: [Interceptor\One::class, Interceptor\Two::class, Interceptor\Three::class], skipNext: true)]
93
    public function skipAttribute(): array
94
    {
95
        return [__FUNCTION__];
96
    }
97
98
    /**
99
     * @return array
100
     */
101
    #[Pipeline([Interceptor\One::class, Interceptor\Two::class, Interceptor\Three::class], true)]
102
    public function firstAttribute(): array
103
    {
104
        return [__FUNCTION__];
105
    }
106
}
107