Skip to content

Commit

Permalink
Merge branch 'release/3.0.x'
Browse files Browse the repository at this point in the history
  • Loading branch information
pprkut committed Jul 12, 2024
2 parents 4fe4686 + dff6de3 commit 1ca2a01
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 17 deletions.
14 changes: 13 additions & 1 deletion .github/workflows/reuse.yml → .github/workflows/general.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SPDX-FileCopyrightText: Copyright 2023 Move Agency Group B.V., Zwolle, The Netherlands
# SPDX-License-Identifier: CC0-1.0

name: REUSE Compliance Check
name: General Tests
on: [push, pull_request]

jobs:
Expand All @@ -16,3 +16,15 @@ jobs:
uses: fsfe/reuse-action@v1
with:
args: --include-submodules lint
typos:
runs-on: ubuntu-latest
continue-on-error: false
name: "Spellcheck (typos)"
steps:
- name: Checkout
uses: actions/checkout@v4

- name: typos-action
uses: crate-ci/typos@master
with:
config: typos.toml
2 changes: 1 addition & 1 deletion ApnsPHP/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -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]];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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' ]);
Expand All @@ -56,7 +56,7 @@ public function testGetPayloadDictionaryReturnsCompletePayloadWithoutLocKey(): v
'category' => 'something',
'thread-id' => 'thisIsAThreadId'
],
'propertie' => 'propertie',
'property' => 'property',
'name' => 'value'
];

Expand All @@ -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');
Expand All @@ -105,7 +105,7 @@ public function testGetPayloadDictionaryReturnsCompletePayloadWithoutBody(): voi
'category' => 'something',
'thread-id' => 'thisIsAThreadId'
],
'propertie' => 'propertie',
'property' => 'property',
'name' => 'value'
];

Expand Down
2 changes: 1 addition & 1 deletion ApnsPHP/Push.php
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,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).
*
Expand Down
8 changes: 4 additions & 4 deletions ApnsPHP/Tests/MessageGetPayloadTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down Expand Up @@ -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;

Expand Down
4 changes: 2 additions & 2 deletions ApnsPHP/Tests/MessageGetTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down Expand Up @@ -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
*/
Expand Down
4 changes: 2 additions & 2 deletions ApnsPHP/Tests/MessageSetTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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');
Expand Down
2 changes: 1 addition & 1 deletion sample_push_custom.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion sample_push_many.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
Empty file added typos.toml
Empty file.

0 comments on commit 1ca2a01

Please sign in to comment.