Completed
Push — 2.1 ( 3d3dcf...bebfa2 )
by Rafał
10:25 queued 20s
created

Component::getInlineTextStyles()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace SWP\Bundle\CoreBundle\AppleNews\Component;
4
5
abstract class Component implements ComponentInterface
6
{
7
    /** @var string */
8
    protected $text;
9
10
    /** @var string|null */
11
    protected $layout;
12
13
    /** @var array */
14
    protected $inlineTextStyles;
15
16
    public function __construct(string $text, string $layout = null, array $inlineTextStyles = [])
17
    {
18
        $this->text = $text;
19
        $this->layout = $layout;
20
        $this->inlineTextStyles = $inlineTextStyles;
21
    }
22
23
    public function getText(): string
24
    {
25
        return $this->text;
26
    }
27
28
    abstract public function getRole(): string;
29
30
    public function getLayout(): ?string
31
    {
32
        return $this->layout;
33
    }
34
35
    public function getInlineTextStyles(): array
36
    {
37
        return $this->inlineTextStyles;
38
    }
39
}
40