|
@@ 183-188 (lines=6) @@
|
| 180 |
|
*/ |
| 181 |
|
private function calculateSurname(){ |
| 182 |
|
$consonants = str_replace($this->vowels, '', $this->subject->getSurname()); |
| 183 |
|
if(strlen($consonants) > 2){ |
| 184 |
|
$result = substr($consonants, 0, 3); |
| 185 |
|
} else { |
| 186 |
|
$vowels = str_replace(str_split($consonants), '', $this->subject->getSurname()); |
| 187 |
|
$result = substr($consonants . $vowels . 'XXX', 0, 3); |
| 188 |
|
} |
| 189 |
|
return $result; |
| 190 |
|
} |
| 191 |
|
|
|
@@ 200-205 (lines=6) @@
|
| 197 |
|
$consonants = str_replace($this->vowels, '', $this->subject->getName()); |
| 198 |
|
if(strlen($consonants) > 3){ |
| 199 |
|
$result = $consonants[0] . $consonants[2] . $consonants[3]; |
| 200 |
|
} else if(strlen($consonants) == 3){ |
| 201 |
|
$result = join($consonants); |
| 202 |
|
} else{ |
| 203 |
|
$vowels = str_replace(str_split($consonants), '', $this->subject->getName()); |
| 204 |
|
$result = substr($consonants . $vowels . 'XXX', 0, 3); |
| 205 |
|
} |
| 206 |
|
return $result; |
| 207 |
|
} |
| 208 |
|
|