Skip to content

Commit 549a51a

Browse files
fix issues
1 parent f7ac507 commit 549a51a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Faker/Provider/tr_TR/Person.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,8 @@ public static function titleFemale()
104104
*/
105105
public function tcNo()
106106
{
107-
$randomDigits = static::numerify('#########');
107+
$firstDigit = static::randomDigitNotNull();
108+
$randomDigits = $firstDigit . static::numerify('########');
108109
$checksum = self::tcNoChecksum($randomDigits);
109110

110111
return $randomDigits . $checksum;
@@ -139,7 +140,7 @@ public static function tcNoChecksum($identityPrefix)
139140
}
140141
}
141142

142-
$tenthDigit = (7 * $evenSum - $oddSum) % 10;
143+
$tenthDigit = ((7 * $evenSum - $oddSum) % 10 + 10) % 10;
143144
$eleventhDigit = ($evenSum + $oddSum + $tenthDigit) % 10;
144145

145146
return $tenthDigit . $eleventhDigit;

0 commit comments

Comments
 (0)