improve docblocks

This commit is contained in:
Daniel Seifert 2022-12-28 00:11:00 +01:00
parent d88dee4876
commit c1f088985a
Signed by: DanielS
GPG Key ID: 6A513E13AEE66170
6 changed files with 7 additions and 6 deletions

View File

@ -63,7 +63,7 @@ class Configuration
/**
* @return string|null
*/
public function getSmsSenderNumber()
public function getSmsSenderNumber(): ?string
{
/** @var string $number */
$number = Registry::getConfig()->getConfigParam(self::SMS_SENDERNR);

View File

@ -15,6 +15,8 @@ declare(strict_types=1);
namespace D3\Linkmobility4OXID\Application\Model\Exceptions;
interface abortSendingExceptionInterface extends \Throwable
use Throwable;
interface abortSendingExceptionInterface extends Throwable
{
}

View File

@ -74,7 +74,7 @@ abstract class AbstractMessage
/**
* @return ResponseInterface|null
*/
public function getResponse()
public function getResponse(): ?ResponseInterface
{
return $this->response;
}
@ -94,7 +94,6 @@ abstract class AbstractMessage
public function getRecipientsList(): string
{
$list = [];
/** @var Recipient $recipient */
foreach ($this->recipients as $recipient) {
$list[] = $recipient->get();
}

View File

@ -137,7 +137,7 @@ class Sms extends AbstractMessage
return $response->isSuccessful();
} catch (abortSendingExceptionInterface $e) {
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());
} catch (GuzzleException $e) {
Registry::getLogger()->warning($e->getMessage());

View File

@ -52,6 +52,7 @@ class OrderRecipients
/** @var string $countryId */
$countryId = $this->order->getFieldData(trim($countryIdFieldName));
$country->load($countryId);
/** @var Recipient $recipient */
return oxNew(Recipient::class, $content, $country->getFieldData('oxisoalpha2'));
}
} catch (NumberParseException $e) {

View File

@ -25,7 +25,6 @@ class RequestFactory extends \D3\LinkmobilityClient\SMS\RequestFactory
{
$configuration = oxNew(Configuration::class);
/** @var SmsRequestInterface $request */
$request = parent::getSmsRequest();
$request->setTestMode($configuration->getTestMode())
->setSenderAddress(