From b22da1bd4a7910aea0a11e329a9780906f9259c5 Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Mon, 18 Jul 2022 23:59:49 +0200 Subject: [PATCH] apply PSR-12 rules --- Tests/RecipientsList/RecipientsListTest.php | 2 +- Tests/Request/AbstractRequest.php | 4 ++-- Tests/ValueObject/RecipientTest.php | 4 ++-- Tests/ValueObject/SenderTest.php | 6 +++--- Tests/ValueObject/ValueObjectTest.php | 4 ++-- src/ValueObject/Recipient.php | 6 +++--- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Tests/RecipientsList/RecipientsListTest.php b/Tests/RecipientsList/RecipientsListTest.php index 7383fa2..e62d537 100644 --- a/Tests/RecipientsList/RecipientsListTest.php +++ b/Tests/RecipientsList/RecipientsListTest.php @@ -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); } /** diff --git a/Tests/Request/AbstractRequest.php b/Tests/Request/AbstractRequest.php index 32d0bf7..0a81c93 100644 --- a/Tests/Request/AbstractRequest.php +++ b/Tests/Request/AbstractRequest.php @@ -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'); diff --git a/Tests/ValueObject/RecipientTest.php b/Tests/ValueObject/RecipientTest.php index 7cafd68..5d73941 100644 --- a/Tests/ValueObject/RecipientTest.php +++ b/Tests/ValueObject/RecipientTest.php @@ -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], diff --git a/Tests/ValueObject/SenderTest.php b/Tests/ValueObject/SenderTest.php index 300b16b..860f4ae 100644 --- a/Tests/ValueObject/SenderTest.php +++ b/Tests/ValueObject/SenderTest.php @@ -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], diff --git a/Tests/ValueObject/ValueObjectTest.php b/Tests/ValueObject/ValueObjectTest.php index 51ad87d..f9ef1ed 100644 --- a/Tests/ValueObject/ValueObjectTest.php +++ b/Tests/ValueObject/ValueObjectTest.php @@ -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 [''] ); } -} \ No newline at end of file +} diff --git a/src/ValueObject/Recipient.php b/src/ValueObject/Recipient.php index d32dde8..d6473e1 100644 --- a/src/ValueObject/Recipient.php +++ b/src/ValueObject/Recipient.php @@ -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; }