mirror of
https://github.com/fzaninotto/Faker.git
synced 2025-03-24 09:19:50 +01:00
parent
4a1e258d06
commit
b502129bd1
@ -92,7 +92,7 @@ class Company extends \Faker\Provider\Company
|
||||
$format = static::randomElement(static::$catchPhraseFormats);
|
||||
$catchPhrase = ucfirst($this->generator->parse($format));
|
||||
|
||||
if (static::isCatchPhraseValid($catchPhrase)) {
|
||||
if ($this->isCatchPhraseValid($catchPhrase)) {
|
||||
break;
|
||||
}
|
||||
} while (true);
|
||||
@ -204,7 +204,7 @@ class Company extends \Faker\Provider\Company
|
||||
*
|
||||
* @return boolean (true if valid, false otherwise)
|
||||
*/
|
||||
public static function isCatchPhraseValid($catchPhrase)
|
||||
protected static function isCatchPhraseValid($catchPhrase)
|
||||
{
|
||||
foreach (static::$wordsWhichShouldNotAppearTwice as $word) {
|
||||
// Fastest way to check if a piece of word does not appear twice.
|
||||
|
Loading…
x
Reference in New Issue
Block a user