improve docblocks
This commit is contained in:
parent
d88dee4876
commit
c1f088985a
@ -63,7 +63,7 @@ class Configuration
|
|||||||
/**
|
/**
|
||||||
* @return string|null
|
* @return string|null
|
||||||
*/
|
*/
|
||||||
public function getSmsSenderNumber()
|
public function getSmsSenderNumber(): ?string
|
||||||
{
|
{
|
||||||
/** @var string $number */
|
/** @var string $number */
|
||||||
$number = Registry::getConfig()->getConfigParam(self::SMS_SENDERNR);
|
$number = Registry::getConfig()->getConfigParam(self::SMS_SENDERNR);
|
||||||
|
@ -15,6 +15,8 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace D3\Linkmobility4OXID\Application\Model\Exceptions;
|
namespace D3\Linkmobility4OXID\Application\Model\Exceptions;
|
||||||
|
|
||||||
interface abortSendingExceptionInterface extends \Throwable
|
use Throwable;
|
||||||
|
|
||||||
|
interface abortSendingExceptionInterface extends Throwable
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -74,7 +74,7 @@ abstract class AbstractMessage
|
|||||||
/**
|
/**
|
||||||
* @return ResponseInterface|null
|
* @return ResponseInterface|null
|
||||||
*/
|
*/
|
||||||
public function getResponse()
|
public function getResponse(): ?ResponseInterface
|
||||||
{
|
{
|
||||||
return $this->response;
|
return $this->response;
|
||||||
}
|
}
|
||||||
@ -94,7 +94,6 @@ abstract class AbstractMessage
|
|||||||
public function getRecipientsList(): string
|
public function getRecipientsList(): string
|
||||||
{
|
{
|
||||||
$list = [];
|
$list = [];
|
||||||
/** @var Recipient $recipient */
|
|
||||||
foreach ($this->recipients as $recipient) {
|
foreach ($this->recipients as $recipient) {
|
||||||
$list[] = $recipient->get();
|
$list[] = $recipient->get();
|
||||||
}
|
}
|
||||||
|
@ -137,7 +137,7 @@ class Sms extends AbstractMessage
|
|||||||
return $response->isSuccessful();
|
return $response->isSuccessful();
|
||||||
} catch (abortSendingExceptionInterface $e) {
|
} catch (abortSendingExceptionInterface $e) {
|
||||||
Registry::getLogger()->warning($e->getMessage());
|
Registry::getLogger()->warning($e->getMessage());
|
||||||
// Oxid does not accept throwable interface only exceptions according by definition
|
// Oxid does not accept throwable interface only exceptions according to definition
|
||||||
Registry::getUtilsView()->addErrorToDisplay($e->getMessage());
|
Registry::getUtilsView()->addErrorToDisplay($e->getMessage());
|
||||||
} catch (GuzzleException $e) {
|
} catch (GuzzleException $e) {
|
||||||
Registry::getLogger()->warning($e->getMessage());
|
Registry::getLogger()->warning($e->getMessage());
|
||||||
|
@ -52,6 +52,7 @@ class OrderRecipients
|
|||||||
/** @var string $countryId */
|
/** @var string $countryId */
|
||||||
$countryId = $this->order->getFieldData(trim($countryIdFieldName));
|
$countryId = $this->order->getFieldData(trim($countryIdFieldName));
|
||||||
$country->load($countryId);
|
$country->load($countryId);
|
||||||
|
/** @var Recipient $recipient */
|
||||||
return oxNew(Recipient::class, $content, $country->getFieldData('oxisoalpha2'));
|
return oxNew(Recipient::class, $content, $country->getFieldData('oxisoalpha2'));
|
||||||
}
|
}
|
||||||
} catch (NumberParseException $e) {
|
} catch (NumberParseException $e) {
|
||||||
|
@ -25,7 +25,6 @@ class RequestFactory extends \D3\LinkmobilityClient\SMS\RequestFactory
|
|||||||
{
|
{
|
||||||
$configuration = oxNew(Configuration::class);
|
$configuration = oxNew(Configuration::class);
|
||||||
|
|
||||||
/** @var SmsRequestInterface $request */
|
|
||||||
$request = parent::getSmsRequest();
|
$request = parent::getSmsRequest();
|
||||||
$request->setTestMode($configuration->getTestMode())
|
$request->setTestMode($configuration->getTestMode())
|
||||||
->setSenderAddress(
|
->setSenderAddress(
|
||||||
|
Loading…
Reference in New Issue
Block a user