pai-sklep/app/Faker/ProductNameProvider.php
2021-11-14 14:51:49 +01:00

93 lines
1.7 KiB
PHP

<?php
namespace App\Faker;
use Faker\Provider\Base;
class ProductNameProvider extends Base
{
protected static $adjectives = [
'flying',
'fishy',
'queer',
'doggy',
'slim',
'magic',
'gay',
'programming',
'rainbow',
'cute',
'ugly',
'wooly',
'hairy',
'killer',
'powerful',
'best',
'colorful',
'fancy',
'bald',
'gigantic',
'tiny',
'slimy',
'slim',
'hot pink',
'gaming',
'fast',
'sexual',
'furryious',
'sharp',
'dangerous',
'bold',
''
];
protected static $owners = [
"lukasz's",
"kacper's",
"my",
"please help i'm trapped in a product name factory's",
"your",
"programmer's",
"gamer's",
"your mom's",
"dog's",
"duda's",
"oracle's",
"",
];
protected static $nouns = [
"noun",
"pants",
"something",
"black hole",
"gender",
"ants",
"cure for cancer",
"void",
"penguin",
"dog",
"cat",
"dogtag",
"drugs",
"pizza",
"teacher",
"love",
"computer"
];
public function adjective(): string
{
return static::randomElement(static::$adjectives);
}
public function productName(): string
{
$owner = ucfirst(static::randomElement(static::$owners));
$noun = static::randomElement(static::$nouns);
$adj = static::randomElement(static::$adjectives);
return "$owner $adj $noun";
}
}