本文整理汇总了PHP中Faker\Factory::randomFloat方法的典型用法代码示例。如果您正苦于以下问题:PHP Factory::randomFloat方法的具体用法?PHP Factory::randomFloat怎么用?PHP Factory::randomFloat使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Faker\Factory
的用法示例。
在下文中一共展示了Factory::randomFloat方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: pretendIdentifyLanguage
/**
* Mock a response for identify language
*
* @return GuzzleHttp\Psr7\Response
*/
public function pretendIdentifyLanguage()
{
//Build a new successful response for identify languages
return new Response(202, ['Content-Type' => 'application/json'], collect(['languages' => [['language' => 'af', 'confidence' => $this->faker->randomFloat(null, 0.0001, 0.9999)], ['language' => 'ar', 'confidence' => $this->faker->randomFloat(null, 0.0001, 0.9999)], ['language' => 'az', 'confidence' => $this->faker->randomFloat(null, 0.0001, 0.9999)], ['language' => 'en', 'confidence' => $this->faker->randomFloat(null, 0.0001, 0.9999)], ['language' => 'fr', 'confidence' => $this->faker->randomFloat(null, 0.0001, 0.9999)]]])->toJson());
}