From 528497dba716b13e78f171acd6f856f4aee06a55 Mon Sep 17 00:00:00 2001 From: Heinz Wiesinger Date: Wed, 12 Jun 2024 08:51:41 +0200 Subject: [PATCH] General: Fix typos --- ApnsPHP/Message.php | 2 +- .../Tests/CustomMessageGetPayloadDictionaryTest.php | 8 ++++---- ApnsPHP/Push.php | 2 +- ApnsPHP/Tests/MessageGetPayloadTest.php | 8 ++++---- ApnsPHP/Tests/MessageGetTest.php | 4 ++-- ApnsPHP/Tests/MessageSetTest.php | 4 ++-- sample_push_custom.php | 2 +- sample_push_many.php | 2 +- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/ApnsPHP/Message.php b/ApnsPHP/Message.php index d36e9685..8960e147 100644 --- a/ApnsPHP/Message.php +++ b/ApnsPHP/Message.php @@ -217,7 +217,7 @@ public function selfForRecipient(int $recipient = 0) ); } - //TODO: Replace this with actuall looping over recipients + //TODO: Replace this with actually looping over recipients $copy = clone $this; $copy->deviceTokens = [$this->deviceTokens[$recipient]]; diff --git a/ApnsPHP/Message/Tests/CustomMessageGetPayloadDictionaryTest.php b/ApnsPHP/Message/Tests/CustomMessageGetPayloadDictionaryTest.php index 617876c7..c20f13a3 100644 --- a/ApnsPHP/Message/Tests/CustomMessageGetPayloadDictionaryTest.php +++ b/ApnsPHP/Message/Tests/CustomMessageGetPayloadDictionaryTest.php @@ -32,7 +32,7 @@ public function testGetPayloadDictionaryReturnsCompletePayloadWithoutLocKey(): v $this->class->setMutableContent(true); $this->class->setCategory('something'); $this->class->setThreadId('thisIsAThreadId'); - $this->class->setCustomProperty('propertie', 'propertie'); + $this->class->setCustomProperty('property', 'property'); $this->class->setCustomProperty('name', 'value'); $this->class->setActionLocKey('Button title'); $this->class->setLocArgs([ 'value', 'value' ]); @@ -56,7 +56,7 @@ public function testGetPayloadDictionaryReturnsCompletePayloadWithoutLocKey(): v 'category' => 'something', 'thread-id' => 'thisIsAThreadId' ], - 'propertie' => 'propertie', + 'property' => 'property', 'name' => 'value' ]; @@ -80,7 +80,7 @@ public function testGetPayloadDictionaryReturnsCompletePayloadWithoutBody(): voi $this->class->setMutableContent(true); $this->class->setCategory('something'); $this->class->setThreadId('thisIsAThreadId'); - $this->class->setCustomProperty('propertie', 'propertie'); + $this->class->setCustomProperty('property', 'property'); $this->class->setCustomProperty('name', 'value'); $this->class->setActionLocKey('Button title'); $this->class->setLocKey('localization string'); @@ -105,7 +105,7 @@ public function testGetPayloadDictionaryReturnsCompletePayloadWithoutBody(): voi 'category' => 'something', 'thread-id' => 'thisIsAThreadId' ], - 'propertie' => 'propertie', + 'property' => 'property', 'name' => 'value' ]; diff --git a/ApnsPHP/Push.php b/ApnsPHP/Push.php index ea798420..e32ebd5f 100644 --- a/ApnsPHP/Push.php +++ b/ApnsPHP/Push.php @@ -661,7 +661,7 @@ private function httpSend(Message $message, &$reply): bool * * When a message is successful sent or reached the maximum retry time is removed * from the message queue and inserted in the Errors container. Use the getErrors() - * method to retrive messages with delivery error(s). + * method to retrieve messages with delivery error(s). * * @param bool $empty Empty the message queue (optional). * diff --git a/ApnsPHP/Tests/MessageGetPayloadTest.php b/ApnsPHP/Tests/MessageGetPayloadTest.php index e654b09d..1252ec4e 100644 --- a/ApnsPHP/Tests/MessageGetPayloadTest.php +++ b/ApnsPHP/Tests/MessageGetPayloadTest.php @@ -32,12 +32,12 @@ public function testGetPayloadReturnsCompletePayload(): void $this->class->setMutableContent(true); $this->class->setCategory('something'); $this->class->setThreadId('thisIsAThreadId'); - $this->class->setCustomProperty('propertie', 'propertie'); + $this->class->setCustomProperty('property', 'property'); $this->class->setCustomProperty('name', 'value'); $payload = '{"aps":{"alert":{"title":"Were no strangers to love","body":"You know the rules, and so do I"},' . '"badge":1,"sound":"default","content-available":1,"mutable-content":1,"category":"something",' . - '"thread-id":"thisIsAThreadId"},"propertie":"propertie","name":"value"}'; + '"thread-id":"thisIsAThreadId"},"property":"property","name":"value"}'; $result = $this->class->getPayload(); @@ -126,12 +126,12 @@ public function testCastToStringReturnsCompletePayload(): void $this->class->setMutableContent(true); $this->class->setCategory('something'); $this->class->setThreadId('thisIsAThreadId'); - $this->class->setCustomProperty('propertie', 'propertie'); + $this->class->setCustomProperty('property', 'property'); $this->class->setCustomProperty('name', 'value'); $payload = '{"aps":{"alert":{"title":"Were no strangers to love","body":"You know the rules, and so do I"},' . '"badge":1,"sound":"default","content-available":1,"mutable-content":1,"category":"something",' . - '"thread-id":"thisIsAThreadId"},"propertie":"propertie","name":"value"}'; + '"thread-id":"thisIsAThreadId"},"property":"property","name":"value"}'; $result = (string) $this->class; diff --git a/ApnsPHP/Tests/MessageGetTest.php b/ApnsPHP/Tests/MessageGetTest.php index 43d378c7..fb1408c3 100644 --- a/ApnsPHP/Tests/MessageGetTest.php +++ b/ApnsPHP/Tests/MessageGetTest.php @@ -291,7 +291,7 @@ public function testGetCustomPropertyValueThrowsExceptionWhenNoneSet(): void } /** - * Test that getCustomPropertyValue() successfuly returns an existing property. + * Test that getCustomPropertyValue() successfully returns an existing property. * * @covers \ApnsPHP\Message::getCustomProperty */ @@ -330,7 +330,7 @@ public function testGetCustomPropertyThrowsExceptionWhenNotExists(): void } /** - * Test that getCustomPropertyNames() successfuly returns the names of the set properties. + * Test that getCustomPropertyNames() successfully returns the names of the set properties. * * @covers \ApnsPHP\Message::getCustomPropertyNames */ diff --git a/ApnsPHP/Tests/MessageSetTest.php b/ApnsPHP/Tests/MessageSetTest.php index d3e3bd58..89496f7e 100644 --- a/ApnsPHP/Tests/MessageSetTest.php +++ b/ApnsPHP/Tests/MessageSetTest.php @@ -364,7 +364,7 @@ public function testSetInvalidCustomProperty(string $key): void * @dataProvider validCustomIdentifierProvider * @covers \ApnsPHP\Message::setCustomIdentifier */ - public function testSetValidCustomIndentifier(string $id): void + public function testSetValidCustomIdentifier(string $id): void { $this->class->setCustomIdentifier($id); @@ -376,7 +376,7 @@ public function testSetValidCustomIndentifier(string $id): void * * @covers \ApnsPHP\Message::setCustomIdentifier */ - public function testSetInvalidCustomIndentifier(): void + public function testSetInvalidCustomIdentifier(): void { $this->expectException('ApnsPHP\Message\Exception'); $this->expectExceptionMessage('Identifier must be a UUID'); diff --git a/sample_push_custom.php b/sample_push_custom.php index 1e9b40e7..6994329e 100644 --- a/sample_push_custom.php +++ b/sample_push_custom.php @@ -28,7 +28,7 @@ public function log($level, $message, array $context = []): void } } -// Instanciate a new ApnsPHP_Push object +// Instantiate a new ApnsPHP_Push object $push = new \ApnsPHP\Push( \ApnsPHP\Push::ENVIRONMENT_SANDBOX, 'server_certificates_bundle_sandbox.pem', diff --git a/sample_push_many.php b/sample_push_many.php index 653f515b..d0382a38 100644 --- a/sample_push_many.php +++ b/sample_push_many.php @@ -31,7 +31,7 @@ public function log($level, $message, array $context = []): void } } -// Instanciate a new ApnsPHP_Push object +// Instantiate a new ApnsPHP_Push object $push = new \ApnsPHP\Push( \ApnsPHP\Push::ENVIRONMENT_SANDBOX, 'server_certificates_bundle_sandbox.pem',