diff --git a/core/lib/Drupal/Core/Cron.php b/core/lib/Drupal/Core/Cron.php
index 096ba8f814bcd9e624d67ccd66df277c2f1daf18..ef5d33793439e59f40278f85321e8daffd462d93 100644
--- a/core/lib/Drupal/Core/Cron.php
+++ b/core/lib/Drupal/Core/Cron.php
@@ -226,7 +226,7 @@ protected function processQueues() {
       // Each queue will be processed immediately when it is reached for the
       // first time, as zero > currentTime will never be true.
       if ($process_from > $this->time->getCurrentMicroTime()) {
-        $this->usleep(round($process_from - $this->time->getCurrentMicroTime(), 3) * 1000000);
+        $this->usleep((int) round($process_from - $this->time->getCurrentMicroTime(), 3) * 1000000);
       }
 
       try {
diff --git a/core/modules/text/src/Plugin/Field/FieldType/TextItemBase.php b/core/modules/text/src/Plugin/Field/FieldType/TextItemBase.php
index 398c115da30ccc3799378e29d10b7566b9560c99..83a3ce1521c8e9e4d76338415fa3ef60898c8000 100644
--- a/core/modules/text/src/Plugin/Field/FieldType/TextItemBase.php
+++ b/core/modules/text/src/Plugin/Field/FieldType/TextItemBase.php
@@ -138,7 +138,7 @@ public static function generateSampleValue(FieldDefinitionInterface $field_defin
     }
     else {
       // Textfield handling.
-      $max = ceil($settings['max_length'] / 3);
+      $max = (int) ceil($settings['max_length'] / 3);
       $value = substr($random->sentences(mt_rand(1, $max), FALSE), 0, $settings['max_length']);
     }
 
diff --git a/core/scripts/run-tests.sh b/core/scripts/run-tests.sh
index 3bf9277e6f1be7272bf0bdb2409c65e30ae0e2f9..b90ef0cd3484da780ab7e5619aad60fb4ca266da 100755
--- a/core/scripts/run-tests.sh
+++ b/core/scripts/run-tests.sh
@@ -1030,8 +1030,8 @@ function simpletest_script_get_test_list() {
   }
 
   if ((int) $args['ci-parallel-node-total'] > 1) {
-    $slow_tests_per_job = ceil(count($slow_tests) / $args['ci-parallel-node-total']);
-    $tests_per_job = ceil(count($test_list) / $args['ci-parallel-node-total']);
+    $slow_tests_per_job = (int) ceil(count($slow_tests) / $args['ci-parallel-node-total']);
+    $tests_per_job = (int) ceil(count($test_list) / $args['ci-parallel-node-total']);
     $test_list = array_merge(array_slice($slow_tests, ($args['ci-parallel-node-index'] -1) * $slow_tests_per_job, $slow_tests_per_job), array_slice($test_list, ($args['ci-parallel-node-index'] - 1) * $tests_per_job, $tests_per_job));
   }