芝麻web文件管理V1.00
编辑当前文件:/home2/sdektunc/xmintal-back/vendor/fakerphp/faker/src/Faker/Provider/ru_RU/Company.php
generator->parse($format); } public static function companyPrefix() { return static::randomElement(static::$companyPrefixes); } public static function companyNameElement() { return static::randomElement(static::$companyElements); } public static function companyNameSuffix() { return static::randomElement(static::$companyNameSuffixes); } /** * Generates a Russian Taxpayer Personal Identification Number * * @param string $area_code * * @return string * * @deprecated use {@link \Faker\Provider\ru_RU\Company::inn10()} instead * @see \Faker\Provider\ru_RU\Company::inn10() */ public static function inn($area_code = '') { return self::inn10($area_code); } /** * Generates a Russian Taxpayer Personal Identification Number * * @param string $area_code * * @return string */ public static function inn10($area_code = '') { if ($area_code === '' || (int) $area_code === 0) { //Simple generation code for areas in Russian without check for valid $area_code = self::numberBetween(1, 91); } else { $area_code = (int) $area_code; } $area_code = str_pad($area_code, 2, '0', STR_PAD_LEFT); $inn_base = $area_code . static::numerify('#######'); return $inn_base . self::inn10Checksum($inn_base); } public static function kpp($inn = '') { if ($inn === '' || strlen($inn) < 4) { $inn = self::inn10(); } return substr($inn, 0, 4) . '01001'; } /** * Generates INN Checksum * * @see https://ru.wikipedia.org/wiki/%D0%98%D0%B4%D0%B5%D0%BD%D1%82%D0%B8%D1%84%D0%B8%D0%BA%D0%B0%D1%86%D0%B8%D0%BE%D0%BD%D0%BD%D1%8B%D0%B9_%D0%BD%D0%BE%D0%BC%D0%B5%D1%80_%D0%BD%D0%B0%D0%BB%D0%BE%D0%B3%D0%BE%D0%BF%D0%BB%D0%B0%D1%82%D0%B5%D0%BB%D1%8C%D1%89%D0%B8%D0%BA%D0%B0 * * @param string $inn * * @return string Checksum (one digit) */ public static function inn10Checksum($inn) { $multipliers = [2, 4, 10, 3, 5, 9, 4, 6, 8]; $sum = 0; for ($i = 0; $i < 9; ++$i) { $sum += (int) $inn[$i] * $multipliers[$i]; } return (string) (($sum % 11) % 10); } /** * Checks whether an INN has a valid checksum * * @param string $inn * * @return bool */ public static function inn10IsValid($inn) { return strlen($inn) === 10 && self::inn10Checksum($inn) === $inn[9]; } }