diff --git a/core/modules/comment/src/CommentLinkBuilder.php b/core/modules/comment/src/CommentLinkBuilder.php
index 4725f882379221d7f6eb154d5b26125964e64814..b7a12faab19bafb8dbb5e9dc0f2c0c3a9b7124c7 100644
--- a/core/modules/comment/src/CommentLinkBuilder.php
+++ b/core/modules/comment/src/CommentLinkBuilder.php
@@ -198,7 +198,7 @@ public function buildCommentedEntityLinks(FieldableEntityInterface $entity, arra
           $entity_links['comment__' . $field_name]['#attached']['library'][] = 'comment/drupal.node-new-comments-link';
           // Embed the metadata for the "X new comments" link (if any) on this
           // entity.
-          $entity_links['comment__' . $field_name]['#attached']['drupalSettings']['history']['lastReadTimestamps'][$entity->id()] = (int) history_read($entity->id());
+          $entity_links['comment__' . $field_name]['#attached']['drupalSettings']['history']['lastReadTimestamps'][$entity->id()] = history_read($entity->id());
           $new_comments = $this->commentManager->getCountNewComments($entity);
           if ($new_comments > 0) {
             $page_number = $this->entityTypeManager
diff --git a/core/modules/comment/tests/src/Unit/CommentLinkBuilderTest.php b/core/modules/comment/tests/src/Unit/CommentLinkBuilderTest.php
index 1b00a4ff026e5bba8aa25512fd2828da666382aa..8bfe6f072a9204560bdd29b5343ba65d7b39a70d 100644
--- a/core/modules/comment/tests/src/Unit/CommentLinkBuilderTest.php
+++ b/core/modules/comment/tests/src/Unit/CommentLinkBuilderTest.php
@@ -325,7 +325,7 @@ protected function getMockNode($has_field, $comment_status, $form_location, $com
 
 if (!function_exists('history_read')) {
 
-  function history_read() {
+  function history_read($nid) {
     return 0;
   }
 
diff --git a/core/modules/views/tests/modules/user_batch_action_test/src/Plugin/Action/BatchUserAction.php b/core/modules/views/tests/modules/user_batch_action_test/src/Plugin/Action/BatchUserAction.php
index 9e58ca8abeb501ae5b78b7e0a848dd90b20dd1a8..c494903ecaca3422e47a5fb5949babe9edab1073 100644
--- a/core/modules/views/tests/modules/user_batch_action_test/src/Plugin/Action/BatchUserAction.php
+++ b/core/modules/views/tests/modules/user_batch_action_test/src/Plugin/Action/BatchUserAction.php
@@ -48,7 +48,8 @@ public function executeMultiple(array $entities) {
   /**
    * {@inheritdoc}
    */
-  public function execute(ContentEntityInterface $entity = NULL) {
+  public function execute($entity = NULL) {
+    assert($entity instanceof ContentEntityInterface);
     $this->executeMultiple([$entity]);
   }
 
diff --git a/core/modules/views/tests/src/Unit/Plugin/Block/ViewsBlockTest.php b/core/modules/views/tests/src/Unit/Plugin/Block/ViewsBlockTest.php
index 796c3c87a3774a6c8c3bf9a8134fc5d76fb28039..ed0deb1868a13f3e91ceab4e2b7688eb66074725 100644
--- a/core/modules/views/tests/src/Unit/Plugin/Block/ViewsBlockTest.php
+++ b/core/modules/views/tests/src/Unit/Plugin/Block/ViewsBlockTest.php
@@ -205,7 +205,7 @@ public function testBuildFailed() {
 
 if (!function_exists('views_add_contextual_links')) {
 
-  function views_add_contextual_links() {
+  function views_add_contextual_links(&$render_element, $location, $display_id, array $view_element = NULL) {
   }
 
 }
diff --git a/core/modules/views/tests/src/Unit/Routing/ViewPageControllerTest.php b/core/modules/views/tests/src/Unit/Routing/ViewPageControllerTest.php
index 935fd655b897049e62cb6291fab620c26d32705d..841fe19c477271b999974ca5af3168baae2e404c 100644
--- a/core/modules/views/tests/src/Unit/Routing/ViewPageControllerTest.php
+++ b/core/modules/views/tests/src/Unit/Routing/ViewPageControllerTest.php
@@ -188,7 +188,7 @@ public function testHandleWithArgumentsOnOverriddenRouteWithUpcasting() {
 
 if (!function_exists('views_add_contextual_links')) {
 
-  function views_add_contextual_links() {
+  function views_add_contextual_links(&$render_element, $location, $display_id, array $view_element = NULL) {
   }
 
 }
diff --git a/core/phpstan-baseline.neon b/core/phpstan-baseline.neon
index f0059260781cf0e02a12368b7fd7ca2ed8d58bd4..7b72c276ebb1d70c7ede68a69220d7ae4b29da39 100644
--- a/core/phpstan-baseline.neon
+++ b/core/phpstan-baseline.neon
@@ -68,11 +68,6 @@ parameters:
 			count: 1
 			path: lib/Drupal/Component/Datetime/DateTimePlus.php
 
-		-
-			message: "#^Function Drupal\\\\Component\\\\Datetime\\\\microtime invoked with 1 parameter, 0 required\\.$#"
-			count: 1
-			path: lib/Drupal/Component/Datetime/Time.php
-
 		-
 			message: """
 				#^Usage of deprecated trait Drupal\\\\Component\\\\DependencyInjection\\\\ServiceIdHashTrait in class Drupal\\\\Component\\\\DependencyInjection\\\\Container\\:
@@ -984,16 +979,6 @@ parameters:
 			count: 1
 			path: modules/comment/src/CommentForm.php
 
-		-
-			message: "#^Function Drupal\\\\comment\\\\history_read invoked with 1 parameter, 0 required\\.$#"
-			count: 1
-			path: modules/comment/src/CommentLinkBuilder.php
-
-		-
-			message: "#^Function Drupal\\\\comment\\\\history_read invoked with 1 parameter, 0 required\\.$#"
-			count: 1
-			path: modules/comment/src/CommentManager.php
-
 		-
 			message: "#^Call to deprecated constant REQUEST_TIME\\: Deprecated in drupal\\:8\\.3\\.0 and is removed from drupal\\:11\\.0\\.0\\. Use \\\\Drupal\\:\\:time\\(\\)\\-\\>getRequestTime\\(\\); $#"
 			count: 2
@@ -2345,11 +2330,6 @@ parameters:
 			count: 1
 			path: modules/views/src/Form/ViewsFormMainForm.php
 
-		-
-			message: "#^Function Drupal\\\\views\\\\Plugin\\\\Block\\\\views_add_contextual_links invoked with 3 parameters, 0 required\\.$#"
-			count: 1
-			path: modules/views/src/Plugin/Block/ViewsBlockBase.php
-
 		-
 			message: "#^Variable \\$display in isset\\(\\) always exists and is not nullable\\.$#"
 			count: 1
@@ -2600,11 +2580,6 @@ parameters:
 			count: 1
 			path: modules/views/src/Plugin/views/wizard/WizardPluginBase.php
 
-		-
-			message: "#^Function Drupal\\\\views\\\\Routing\\\\views_add_contextual_links invoked with 4 parameters, 0 required\\.$#"
-			count: 1
-			path: modules/views/src/Routing/ViewPageController.php
-
 		-
 			message: "#^Call to deprecated constant REQUEST_TIME\\: Deprecated in drupal\\:8\\.3\\.0 and is removed from drupal\\:11\\.0\\.0\\. Use \\\\Drupal\\:\\:time\\(\\)\\-\\>getRequestTime\\(\\); $#"
 			count: 1
diff --git a/core/tests/Drupal/Tests/Component/Datetime/TimeTest.php b/core/tests/Drupal/Tests/Component/Datetime/TimeTest.php
index b9aa801655072595e20cb09ea63e64e76fab1c03..f5de7d9708207dfbe20db95ece1c1983075e00f6 100644
--- a/core/tests/Drupal/Tests/Component/Datetime/TimeTest.php
+++ b/core/tests/Drupal/Tests/Component/Datetime/TimeTest.php
@@ -141,6 +141,6 @@ function time() {
  *
  * @return float
  */
-function microtime() {
+function microtime(bool $as_float = FALSE) {
   return 1234567.89;
 }