Source of file MockDoubleField.php
Size: 0,487 Bytes - Last Modified: 2021-12-23T10:56:24+00:00
/var/www/docs.ssmods.com/process/src/code/fieldtypes/MockDoubleField.php
123456789101112131415161718192021222324252627282930 | <?php /** * Defines the methods that are injected into the {@link Double} class for * generating mock data * * @package silverstripe-mock-data * @author Uncle Cheese <unclecheese@leftandmain.com> */ use Faker\Generator; class MockDoubleField extends DataExtension { /** * Gets a random float value * * @param Faker\Generator * @return float */ public function getFakeData(Generator $faker) { return mt_rand(1, 999)/1000; } } |