![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/old/vendor/magento/magento2-base/setup/src/Magento/Setup/Fixtures/ |
<?php /** * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ namespace Magento\Setup\Fixtures; /** * Random price provider for fixtures */ class PriceProvider { /** * Get random price for product * * @param int $productIndex * @return float */ public function getPrice($productIndex) { // phpcs:disable mt_srand($productIndex); switch (mt_rand(0, 3)) { case 0: return 9.99; case 1: return 5; case 2: return 1; case 3: return mt_rand(1, 10000) / 10; } // phpcs:enable } }