* @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ namespace PrestaShop\PrestaShop\Core\Util; use Doctrine\Inflector\Inflector as DoctrineInflector; use Doctrine\Inflector\InflectorFactory; /** * Utility class to get an Inflector as singleton */ class Inflector { private static $inflector; public static function getInflector(): DoctrineInflector { if (null === self::$inflector) { self::$inflector = InflectorFactory::create()->build(); } return self::$inflector; } }