Test Failed
Push — master ( bd1e8a...fed951 )
by Alexey
12:42 queued 12s
created

AttachmentField   A

Complexity

Total Complexity 7

Size/Duplication

Total Lines 85
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 7
lcom 0
cbo 0
dl 0
loc 85
rs 10
c 0
b 0
f 0

7 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getTitle() 0 4 1
A setTitle() 0 6 1
A getValue() 0 4 1
A setValue() 0 6 1
A isShort() 0 4 1
A setShort() 0 6 1
1
<?php
2
3
/*
4
 * This file is part of the WoW-Apps/Symfony-Slack-Bot bundle for Symfony.
5
 * https://github.com/wow-apps/symfony-slack-bot
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 * https://github.com/wow-apps/symfony-slack-bot/blob/master/LICENSE
10
 *
11
 * For technical documentation.
12
 * https://wow-apps.github.io/symfony-slack-bot/docs/
13
 *
14
 * Author Alexey Samara <[email protected]>
15
 *
16
 * Copyright 2016 WoW-Apps.
17
 */
18
19
namespace WowApps\SlackBundle\DTO;
20
21
/**
22
 * Class AttachmentField.
23
 *
24
 * @author Alexey Samara <[email protected]>
25
 */
26
class AttachmentField
27
{
28
    /** @var string */
29
    private $title;
30
31
    /** @var string */
32
    private $value;
33
34
    /** @var bool */
35
    private $short;
36
37
    /**
38
     * MessageAttachmentField constructor.
39
     *
40
     * @param string $title
41
     * @param string $value
42
     * @param bool   $short
43
     */
44
    public function __construct(string $title = '', string $value = '', bool $short = false)
45
    {
46
        $this->title = $title;
47
        $this->value = $value;
48
        $this->short = $short;
49
    }
50
51
    /**
52
     * @return string
53
     */
54
    public function getTitle(): string
55
    {
56
        return $this->title;
57
    }
58
59
    /**
60
     * @param string $title
61
     *
62
     * @return AttachmentField
63
     */
64
    public function setTitle(string $title): AttachmentField
65
    {
66
        $this->title = $title;
67
68
        return $this;
69
    }
70
71
    /**
72
     * @return string
73
     */
74
    public function getValue(): string
75
    {
76
        return $this->value;
77
    }
78
79
    /**
80
     * @param string $value
81
     *
82
     * @return AttachmentField
83
     */
84
    public function setValue(string $value): AttachmentField
85
    {
86
        $this->value = $value;
87
88
        return $this;
89
    }
90
91
    /**
92
     * @return bool
93
     */
94
    public function isShort(): bool
95
    {
96
        return $this->short;
97
    }
98
99
    /**
100
     * @param bool $short
101
     *
102
     * @return AttachmentField
103
     */
104
    public function setShort(bool $short): AttachmentField
105
    {
106
        $this->short = $short;
107
108
        return $this;
109
    }
110
}
111