pai-sklep/app/Faker/ProductNameProvider.php

94 lines
1.7 KiB
PHP
Raw Permalink Normal View History

2021-09-05 02:22:17 +02:00
<?php
2021-11-14 14:51:49 +01:00
2021-09-05 02:22:17 +02:00
namespace App\Faker;
2021-11-14 14:51:49 +01:00
2021-09-05 02:22:17 +02:00
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 ❤️",
2021-09-05 02:22:17 +02:00
"computer"
];
public function adjective(): string
{
return static::randomElement(static::$adjectives);
}
2021-11-14 14:51:49 +01:00
public function productName(): string
2021-09-05 02:22:17 +02:00
{
$owner = ucfirst(static::randomElement(static::$owners));
$noun = static::randomElement(static::$nouns);
$adj = static::randomElement(static::$adjectives);
return "$owner $adj $noun";
}
}