Conditions | 5 |
Paths | 4 |
Total Lines | 22 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
10 | public static function verify(int $citizen_number, int $birth_year, string $name, string $surname): bool |
||
11 | { |
||
12 | if (!TrCitizenNumberValidation::validate($citizen_number)) { |
||
13 | return false; |
||
14 | } |
||
15 | |||
16 | if ($birth_year < 1900 || $birth_year > date('Y')) { |
||
17 | return false; |
||
18 | } |
||
19 | |||
20 | if (static::$client === null) { |
||
|
|||
21 | static::$client = new \SoapClient(static::API_URL); |
||
22 | } |
||
23 | |||
24 | $response = static::$client->TCKimlikNoDogrula([ |
||
25 | 'TCKimlikNo' => $citizen_number, |
||
26 | 'Ad' => tr_strtoupper($name), |
||
27 | 'Soyad' => tr_strtoupper($surname), |
||
28 | 'DogumYili' => $birth_year |
||
29 | ]); |
||
30 | |||
31 | return $response->TCKimlikNoDogrulaResult; |
||
32 | } |
||
34 |