Skip to content

Commit 0153a66

Browse files
authored
Merge pull request #8175 from kenjis/refactor-param-types
refactor: fix param types
2 parents c4dba01 + c91de98 commit 0153a66

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

system/CLI/CLI.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ public static function prompt(string $field, $options = null, $validation = null
256256
static::fwrite(STDOUT, $field . (trim($field) ? ' ' : '') . $extraOutput . ': ');
257257

258258
// Read the input from keyboard.
259-
$input = trim(static::$io->input()) ?: $default;
259+
$input = trim(static::$io->input()) ?: (string) $default;
260260

261261
if ($validation !== []) {
262262
while (! static::validate('"' . trim($field) . '"', $input, $validation)) {

system/Commands/Database/MigrateStatus.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ public function run(array $params)
127127
continue;
128128
}
129129

130-
$date = date('Y-m-d H:i:s', $row->time);
130+
$date = date('Y-m-d H:i:s', (int) $row->time);
131131
$group = $row->group;
132132
$batch = $row->batch;
133133
// @codeCoverageIgnoreEnd

tests/system/Models/InsertModelTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ public function testInsertBatchSetsIntTimestamps(): void
120120
$this->assertSame(2, $this->model->insertBatch($jobData));
121121

122122
$result = $this->model->where('name', 'Philosopher')->first();
123-
$this->assertCloseEnough(time(), $result->created_at);
123+
$this->assertCloseEnough(time(), (int) $result->created_at);
124124
}
125125

126126
public function testInsertBatchSetsDatetimeTimestamps(): void

0 commit comments

Comments
 (0)