apply PSR-12 rules

Cette révision appartient à :
Daniel Seifert 2022-07-18 23:59:49 +02:00
Parent 95b95d1d8b
révision b22da1bd4a
Signé par: DanielS
ID de la clé GPG: 6A513E13AEE66170
6 fichiers modifiés avec 13 ajouts et 13 suppressions

Voir le fichier

@ -50,7 +50,7 @@ class RecipientsListTest extends ApiTestCase
$phoneUtil = PhoneNumberUtil::getInstance();
$example = $phoneUtil->getExampleNumberForType($this->phoneCountryFixture, PhoneNumberType::MOBILE);
$this->phoneNumberFixture = $phoneUtil->format($example, PhoneNumberFormat::NATIONAL);
$this->phoneNumberFixture = $phoneUtil->format($example, PhoneNumberFormat::NATIONAL);
}
/**

Voir le fichier

@ -124,7 +124,7 @@ abstract class AbstractRequest extends ApiTestCase
{
$phoneUtil = PhoneNumberUtil::getInstance();
$example = $phoneUtil->getExampleNumberForType('DE', PhoneNumberType::MOBILE);
$phoneNumberFixture = $phoneUtil->format($example, PhoneNumberFormat::NATIONAL);
$phoneNumberFixture = $phoneUtil->format($example, PhoneNumberFormat::NATIONAL);
$recipient = new Recipient($phoneNumberFixture, 'DE');
@ -157,7 +157,7 @@ abstract class AbstractRequest extends ApiTestCase
{
$phoneUtil = PhoneNumberUtil::getInstance();
$example = $phoneUtil->getExampleNumberForType('DE', PhoneNumberType::MOBILE);
$phoneNumberFixture = $phoneUtil->format($example, PhoneNumberFormat::NATIONAL);
$phoneNumberFixture = $phoneUtil->format($example, PhoneNumberFormat::NATIONAL);
$recipient = new Recipient($phoneNumberFixture, 'DE');

Voir le fichier

@ -46,7 +46,7 @@ class RecipientTest extends ApiTestCase
$phoneUtil = PhoneNumberUtil::getInstance();
$example = $phoneUtil->getExampleNumberForType($this->phoneCountryFixture, PhoneNumberType::MOBILE);
$this->phoneNumberFixture = $phoneUtil->format($example, PhoneNumberFormat::NATIONAL);
$this->phoneNumberFixture = $phoneUtil->format($example, PhoneNumberFormat::NATIONAL);
$this->recipient = new Recipient($this->phoneNumberFixture, $this->phoneCountryFixture);
}
@ -155,7 +155,7 @@ class RecipientTest extends ApiTestCase
{
$phoneUtil = PhoneNumberUtil::getInstance();
$example = $phoneUtil->getExampleNumberForType($this->phoneCountryFixture, PhoneNumberType::MOBILE);
$phoneNumberFixture = $phoneUtil->format($example, PhoneNumberFormat::NATIONAL);
$phoneNumberFixture = $phoneUtil->format($example, PhoneNumberFormat::NATIONAL);
return [
'empty number' => ['', 'DE', true, PhoneNumberType::MOBILE, InvalidArgumentException::class],

Voir le fichier

@ -47,7 +47,7 @@ class SenderTest extends ApiTestCase
$phoneUtil = PhoneNumberUtil::getInstance();
$example = $phoneUtil->getExampleNumberForType($this->phoneCountryFixture, PhoneNumberType::MOBILE);
$this->phoneNumberFixture = $phoneUtil->format($example, PhoneNumberFormat::NATIONAL);
$this->phoneNumberFixture = $phoneUtil->format($example, PhoneNumberFormat::NATIONAL);
/** @var Sender|MockObject sender */
$this->sender = new Sender($this->phoneNumberFixture, $this->phoneCountryFixture);
@ -107,7 +107,7 @@ class SenderTest extends ApiTestCase
{
$phoneUtil = PhoneNumberUtil::getInstance();
$example = $phoneUtil->getExampleNumberForType($this->phoneCountryFixture, PhoneNumberType::MOBILE);
$this->phoneNumberFixture = $phoneUtil->format($example, PhoneNumberFormat::NATIONAL);
$this->phoneNumberFixture = $phoneUtil->format($example, PhoneNumberFormat::NATIONAL);
return [
'null number' => [null, $this->phoneCountryFixture, false],
@ -168,7 +168,7 @@ class SenderTest extends ApiTestCase
{
$phoneUtil = PhoneNumberUtil::getInstance();
$example = $phoneUtil->getExampleNumberForType($this->phoneCountryFixture, PhoneNumberType::MOBILE);
$phoneNumberFixture = $phoneUtil->format($example, PhoneNumberFormat::NATIONAL);
$phoneNumberFixture = $phoneUtil->format($example, PhoneNumberFormat::NATIONAL);
return [
'empty number' => ['', 'DE', true, InvalidArgumentException::class],

Voir le fichier

@ -52,7 +52,7 @@ class ValueObjectTest extends ApiTestCase
{
$phoneUtil = PhoneNumberUtil::getInstance();
$example = $phoneUtil->getExampleNumberForType('DE', PhoneNumberType::MOBILE);
$phoneNumberFixture = $phoneUtil->format($example, PhoneNumberFormat::NATIONAL);
$phoneNumberFixture = $phoneUtil->format($example, PhoneNumberFormat::NATIONAL);
$this->callMethod(
$this->value,
@ -85,4 +85,4 @@ class ValueObjectTest extends ApiTestCase
['']
);
}
}
}

Voir le fichier

@ -53,7 +53,7 @@ class Recipient extends StringValueObject
$phoneUtil = $this->getPhoneNumberUtil();
$phoneNumber = $phoneUtil->parse($number, strtoupper($iso2CountryCode));
$number = $phoneUtil->format( $phoneNumber, PhoneNumberFormat::E164 );
$number = $phoneUtil->format($phoneNumber, PhoneNumberFormat::E164);
if (false === $phoneUtil->isValidNumber($phoneNumber)) {
throw new RecipientException(ExceptionMessages::INVALID_RECIPIENT_PHONE);
@ -63,9 +63,9 @@ class Recipient extends StringValueObject
$this->allowedNumberTypes
)
) {
throw new RecipientException( ExceptionMessages::NOT_A_MOBILE_NUMBER);
throw new RecipientException(ExceptionMessages::NOT_A_MOBILE_NUMBER);
}
parent::__construct($number);
$this->countryCode = $iso2CountryCode;
}