AbstractMessage::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Zored\Telegram\Entity\Control\Message;
6
7
abstract class AbstractMessage implements MessageInterface
8
{
9
    /**
10
     * @var string
11
     */
12
    private $content;
13
14
    /**
15
     * @var bool
16
     */
17
    private $isLinkPreview;
18
19
    public function __construct(string $content, bool $isLinkPreview = false)
20
    {
21
        $this->content = $content;
22
        $this->isLinkPreview = $isLinkPreview;
23
    }
24
25
    /**
26
     * {@inheritdoc}
27
     */
28
    public function getContent(): string
29
    {
30
        return $this->content;
31
    }
32
33
    /**
34
     * {@inheritdoc}
35
     */
36
    public function isLinkPreview(): bool
37
    {
38
        return $this->isLinkPreview;
39
    }
40
}
41