* @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\Import; /** * Class CsvValueSeparatorNormalizer normalizes import separator before usage. */ final class CsvValueSeparatorNormalizer implements StringNormalizerInterface { /** * {@inheritdoc} */ public function normalize($value) { $value = trim($value); $value = substr($value, 0, 1); return $value ?: ImportSettings::DEFAULT_SEPARATOR; } }