Completed
Push — 2.1 ( 63ded9...b14dac )
by Paweł
23s queued 11s
created

Component::getLayout()   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
    public function __construct(string $text, string $layout = null)
14
    {
15
        $this->text = $text;
16
        $this->layout = $layout;
17
    }
18
19
    public function getText(): string
20
    {
21
        return $this->text;
22
    }
23
24
    abstract public function getRole(): string;
25
26
    public function getLayout(): ?string
27
    {
28
        return $this->layout;
29
    }
30
}
31