for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types = 1);
/*
* This file is part of the SmsGate package
*
* (c) SmsGate
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code
*/
namespace SmsGate;
/**
* The value object for store error of send sms.
* @author Vitaliy Zhuk <[email protected]>
class Error
{
* @see ErrorReasons
* @var string
private $reason;
private $message;
* Constructor.
* @param string $reason
* @param string $message
public function __construct(string $reason, string $message = null)
$this->reason = $reason;
$this->message = $message;
}
* Get the reason of error
* @return string
public function getReason(): string
return $this->reason;
* Get the message of error
public function getMessage(): ?string
return $this->message;