Skip to content

Commit

Permalink
Merge pull request #106 from htto/main
Browse files Browse the repository at this point in the history
Fix PHP 7.4 and test issues
  • Loading branch information
freekmurze authored Jan 25, 2023
2 parents c66514d + 8e6f14d commit 9db2b38
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,7 @@
<log type="coverage-text" target="build/coverage.txt"/>
<log type="coverage-clover" target="build/logs/clover.xml"/>
</logging>
<php>
<ini name="date.timezone" value="UTC"/>
</php>
</phpunit>
4 changes: 2 additions & 2 deletions src/Components/Event.php
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ public function attachment(string $url, ?string $mediaType = null): Event
public function embeddedAttachment(
string $data,
?string $mediaType = null,
bool $needsEncoding = true,
bool $needsEncoding = true
): Event {
$this->attachments[] = new BinaryValue($data, $mediaType, $needsEncoding);

Expand Down Expand Up @@ -461,7 +461,7 @@ private function resolveProperties(ComponentPayload $payload): self
)
->multiple(
$this->attachments,
function (array|BinaryValue $attachment) {
function ($attachment) {
if ($attachment instanceof BinaryValue) {
return BinaryProperty::create('ATTACH', $attachment);
}
Expand Down

0 comments on commit 9db2b38

Please sign in to comment.