Completed
Push — master ( b03e4f...bb3ad1 )
by Camilo
02:00
created

ResultString   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 15
ccs 0
cts 6
cp 0
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A __toString() 0 4 1
1
<?php
2
declare(strict_types = 1);
3
4
namespace unreal4u\TelegramAPI\Telegram\Types\Custom;
5
6
use unreal4u\TelegramAPI\Abstracts\CustomType;
7
use Psr\Log\LoggerInterface;
8
9
/**
10
 * Some API calls respond with int types
11
 */
12
class ResultString extends CustomType
13
{
14
    public $data = '';
15
16
    public function __construct(string $result, LoggerInterface $logger = null)
17
    {
18
        $this->logger = $logger;
19
        $this->data = $result;
20
    }
21
22
    public function __toString()
23
    {
24
        return (string)$this->data;
25
    }
26
}
27