Issues (21)

src/GetMessage/Response/CheckTicketXmlResponse.php (2 issues)

1
<?php
2
declare(strict_types=1);
3
4
namespace Fns\GetMessage\Response;
5
6
use Fns\Contracts\ResponseSendMessage;
7
use SimpleXMLElement;
8
9
class CheckTicketXmlResponse extends SimpleXMLElement implements ResponseSendMessage
10
{
11
    public function isError(): bool
12
    {
13
        return $this->getCode() !== 200;
14
    }
15
16
    public function getCode(): int
17
    {
18
        return (int)$this->Result->Code;
0 ignored issues
show
Bug Best Practice introduced by
The property Result does not exist on Fns\GetMessage\Response\CheckTicketXmlResponse. Since you implemented __get, consider adding a @property annotation.
Loading history...
19
    }
20
21
    public function getBody(): string
22
    {
23
        return (string)$this->Result->Message;
0 ignored issues
show
Bug Best Practice introduced by
The property Result does not exist on Fns\GetMessage\Response\CheckTicketXmlResponse. Since you implemented __get, consider adding a @property annotation.
Loading history...
24
    }
25
}
26