Use the random_int function

This commit is contained in:
Graham Campbell
2015-11-22 20:05:39 +00:00
parent dab47820e0
commit 4b668a83ef
3 changed files with 3 additions and 3 deletions

View File

@@ -72,7 +72,7 @@ class DemoMetricPointSeederCommand extends Command
MetricPoint::create([
'metric_id' => 1,
'value' => rand(1, 10),
'value' => random_int(1, 10),
'created_at' => $metricTime,
'updated_at' => $metricTime,
]);

View File

@@ -210,7 +210,7 @@ class DemoSeederCommand extends Command
MetricPoint::create([
'metric_id' => 1,
'value' => rand(1, 10),
'value' => random_int(1, 10),
'created_at' => $metricTime,
'updated_at' => $metricTime,
]);

View File

@@ -62,7 +62,7 @@ $factory->define('CachetHQ\Cachet\Models\Metric', function ($faker) {
$factory->define('CachetHQ\Cachet\Models\MetricPoint', function ($faker) {
return [
'metric_id' => 1,
'value' => rand(1, 100),
'value' => random_int(1, 100),
];
});