Passed
Pull Request — master (#370)
by Valentin
04:52
created

InterceptedController   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 50
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 7
c 1
b 0
f 1
dl 0
loc 50
rs 10
wmc 6

6 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
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