AbstractMessage   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 3
dl 0
loc 32
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A isLinkPreview() 0 3 1
A getContent() 0 3 1
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