Skip to content

Commit ae1f973

Browse files
committed
fix: added missing typings
1 parent af9e760 commit ae1f973

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

phpmyfaq/src/phpMyFAQ/Controller/Frontend/CommentController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,12 +110,12 @@ public function create(Request $request): JsonResponse
110110
$session->userTracking('save_comment', $commentId);
111111
$commentEntity = new Comment();
112112
$commentEntity
113-
->setRecordId($commentId)
113+
->setRecordId((int) $commentId)
114114
->setType($type)
115115
->setUsername($username)
116116
->setEmail($email)
117117
->setComment(nl2br(strip_tags((string) $commentText)))
118-
->setDate($request->server->get('REQUEST_TIME'));
118+
->setDate((string) $request->server->get('REQUEST_TIME'));
119119

120120
if ($comment->create($commentEntity)) {
121121
$notification = $this->container->get('phpmyfaq.notification');

phpmyfaq/src/phpMyFAQ/Mail.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ public function send(): int
430430
$this->configuration->get('mail.remoteSMTPServer'),
431431
$this->configuration->get('mail.remoteSMTPUsername'),
432432
$this->configuration->get('mail.remoteSMTPPassword'),
433-
$this->configuration->get('mail.remoteSMTPPort'),
433+
(int) $this->configuration->get('mail.remoteSMTPPort'),
434434
$this->configuration->get('mail.remoteSMTPDisableTLSPeerVerification'),
435435
);
436436
}

phpmyfaq/src/phpMyFAQ/Notification.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ public function sendFaqCommentNotification(Faq $faq, Comment $comment): void
146146
$faqUrl = sprintf(
147147
'%s?action=faq&cat=%d&id=%d&artlang=%s',
148148
$this->configuration->getDefaultUrl(),
149-
$category->getCategoryIdFromFaq($faq->faqRecord['id']),
149+
$category->getCategoryIdFromFaq((int) $faq->faqRecord['id']),
150150
$faq->faqRecord['id'],
151151
$faq->faqRecord['lang'],
152152
);
@@ -177,7 +177,7 @@ public function sendFaqCommentNotification(Faq $faq, Comment $comment): void
177177

178178
// Let the category owner of a FAQ get a copy of the message
179179
$category = new Category($this->configuration);
180-
$categories = $category->getCategoryIdsFromFaq($faq->faqRecord['id']);
180+
$categories = $category->getCategoryIdsFromFaq((int) $faq->faqRecord['id']);
181181
foreach ($categories as $_category) {
182182
$userId = $category->getOwner($_category);
183183
$catUser = new User($this->configuration);

0 commit comments

Comments
 (0)