Completed
Push — master ( c56287...fbce28 )
by Camilo
02:12
created

ResultNull   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 16
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 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
 * Not being used by the package itself, but useful for some bots to initialize if no response is actually expected
11
 */
12
class ResultNull extends CustomType
13
{
14
    public function __construct(array $data = null, LoggerInterface $logger = null)
15
    {
16
        $this->logger = $logger;
17
    }
18
19
    /**
20
     * I don't really use this function, but I can imagine it can come in handy when PHP handles the casting internally
21
     * @return string
0 ignored issues
show
Documentation introduced by
Should the return type not be string|null?

This check compares the return type specified in the @return annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.

Loading history...
22
     */
23
    public function __toString()
24
    {
25
        return null;
26
    }
27
}
28