Skip to content

Commit 0419901

Browse files
authored
Add generateCzechPassword method
1 parent 59efb4e commit 0419901

1 file changed

Lines changed: 38 additions & 0 deletions

File tree

src/Lib.php

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,44 @@ public static function generateRandomString($lenght = 40, $safeChars = false)
205205
return static::generateShortLink($lenght, $safeChars);
206206
}
207207

208+
/**
209+
* @return string
210+
*/
211+
public static function generateCzechPassword()
212+
{
213+
$fruit = [
214+
'Angrešt',
215+
'Bluma',
216+
'Borůvka',
217+
'Broskev',
218+
'Brusinka',
219+
'Bílý rybíz',
220+
'Hrozny',
221+
'Hruška',
222+
'Jablko',
223+
'Jahoda',
224+
'Jeřabiny',
225+
'Kaštan jedlý',
226+
'Lískový ořech',
227+
'Malina',
228+
'Mandle',
229+
'Meruňka',
230+
'Mirabelka',
231+
'Oskeruše',
232+
'Ostružina',
233+
'Rybíz červený',
234+
'Slíva',
235+
'Trnka',
236+
'Třešně',
237+
'Višně',
238+
'Vlašský ořech',
239+
'Černý rybíz',
240+
'Švestka',
241+
];
242+
243+
return self::idize(str_replace(" ", null, $fruit[array_rand($fruit)]) . rand(1000, 9999));
244+
}
245+
208246
/**
209247
* @param $string
210248
* @param int $length

0 commit comments

Comments
 (0)