Completed
Push — master ( 80ef2e...65d1c9 )
by
unknown
58:18 queued 18:37
created

TestEmailTemplate   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 56
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

5 Methods

Rating   Name   Duplication   Size   Complexity  
A getSlug() 0 4 1
A getName() 0 4 1
A getDescription() 0 4 1
A listParameters() 0 6 1
A listAttachments() 0 6 1
1
<?php
2
3
namespace SfCod\EmailEngineBundle\Example;
4
5
use SfCod\EmailEngineBundle\Example\Attachments\TestImage;
6
use SfCod\EmailEngineBundle\Example\Params\TestMessage;
7
use SfCod\EmailEngineBundle\Template\AbstractTemplate;
8
use SfCod\EmailEngineBundle\Template\Params\ParameterInterface;
9
10
/**
11
 * Class TestEmailTemplate
12
 *
13
 * @author Virchenko Maksim <[email protected]>
14
 *
15
 * @package SfCod\EmailEngineBundle\Example
16
 */
17
class TestEmailTemplate extends AbstractTemplate
18
{
19
    /**
20
     * Get email template slug
21
     *
22
     * @return string
23
     */
24
    public static function getSlug(): string
25
    {
26
        return 'test_email_slug';
27
    }
28
29
    /**
30
     * Get email template name
31
     *
32
     * @return string
33
     */
34
    public static function getName(): string
35
    {
36
        return 'Test email template';
37
    }
38
39
    /**
40
     * Get email template description
41
     *
42
     * @return string
43
     */
44
    public static function getDescription(): string
45
    {
46
        return 'Email template for example';
47
    }
48
49
    /**
50
     * List parameters
51
     *
52
     * @return ParameterInterface[]
53
     */
54
    public static function listParameters(): array
55
    {
56
        return [
57
            TestMessage::class, // {message}
58
        ];
59
    }
60
61
    /**
62
     * List attachments
63
     *
64
     * @return array
65
     */
66
    public static function listAttachments(): array
67
    {
68
        return [
69
            TestImage::class,
70
        ];
71
    }
72
}
73