improve docblocks

This commit is contained in:
Daniel Seifert 2022-12-28 00:11:00 +01:00
bovenliggende d88dee4876
commit c1f088985a
Getekend door: DanielS
GPG sleutel-ID: 6A513E13AEE66170
6 gewijzigde bestanden met toevoegingen van 7 en 6 verwijderingen

Bestand weergeven

@ -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);

Bestand weergeven

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

Bestand weergeven

@ -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();
}

Bestand weergeven

@ -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());

Bestand weergeven

@ -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) {

Bestand weergeven

@ -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(