Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/github_actions/dependabot/fetch-m…
Browse files Browse the repository at this point in the history
…etadata-2.1.0
  • Loading branch information
claudemyburgh authored Jun 8, 2024
2 parents 71e91ea + 9bb2dd5 commit 7489769
Show file tree
Hide file tree
Showing 11 changed files with 563 additions and 110 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ psalm.xml
vendor
.php-cs-fixer.cache
index.php
generate.php
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,21 @@

All notable changes to `business-name-generator` will be documented in this file.

## v1.2.1 - 2024-06-08

**Full Changelog**: https://github.com/designbycode/business-name-generator/compare/v1.2.0...v1.2.1

- Update test and name

## v1.2.0 - 2024-06-08

**Full Changelog**: https://github.com/designbycode/business-name-generator/compare/v1.1.0...v1.2.0

- Added method for creating multiple names at once

## v1.1.0 - 2024-06-08

**Full Changelog**: https://github.com/designbycode/business-name-generator/commits/v1.1.0

- Splite code into seperate classes
- Added test
110 changes: 103 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
# This is my package business-name-generator
# Business Name Generator

[![Latest Version on Packagist](https://img.shields.io/packagist/v/designbycode/business-name-generator.svg?style=flat-square)](https://packagist.org/packages/designbycode/business-name-generator)
[![Tests](https://img.shields.io/github/actions/workflow/status/designbycode/business-name-generator/run-tests.yml?branch=main&label=tests&style=flat-square)](https://github.com/designbycode/business-name-generator/actions/workflows/run-tests.yml)
[![Total Downloads](https://img.shields.io/packagist/dt/designbycode/business-name-generator.svg?style=flat-square)](https://packagist.org/packages/designbycode/business-name-generator)

This is where your description should go. Try and limit it to a paragraph or two. Consider adding a small example.


We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on [our contact page](https://spatie.be/about-us). We publish all received postcards on [our virtual postcard wall](https://spatie.be/open-source/postcards).
The BusinessNameGenerator package is designed to help you generate creative and unique business names by combining adjectives and nouns from various categories. The package provides default, funny, playful, and color-related lists for both adjectives and nouns, giving you plenty of options to create a memorable business name.

## Installation

Expand All @@ -18,12 +15,111 @@ composer require designbycode/business-name-generator
```

## Usage
### Basic Usage

```php
$skeleton = new Designbycode\BusinessNameGenerator();
echo $skeleton->echoPhrase('Hello, Designbycode!');
require 'vendor/autoload.php';

use Designbycode\BusinessNameGenerator\BusinessNameGenerator;
use Designbycode\BusinessNameGenerator\Nouns;
use Designbycode\BusinessNameGenerator\Adjectives;

// Create a new BusinessNameGenerator instance
$generator = new BusinessNameGenerator();

// Generate a business name using default adjectives and funny nouns
$businessName = $generator->generate('default', 'funny');
echo $businessName; // Example output: "Innovative Banana"
```

### Custom Adjectives and Nouns
You can also provide your own lists of adjectives and nouns:

```php
$customAdjectives = ["Cool", "Amazing", "Super"];
$customNouns = ["Shop", "Hub", "Center"];

$generator = new BusinessNameGenerator($customAdjectives, $customNouns);

$businessName = $generator->generate();
echo $businessName; // Example output: "Super Shop"

```
### Using Specific Categories
You can generate business names based on specific categories of adjectives and nouns:

```php
$generator = new BusinessNameGenerator();

// Generate a business name using playful adjectives and color-related nouns
$businessName = $generator->generate('playful', 'color');
echo $businessName; // Example output: "Cheerful Blue"
```

## Adjective and Noun Categories
### Adjective Categories
- default: Standard business-related adjectives.
- funny: Whimsical and humorous adjectives.
- playful: Light-hearted and playful adjectives.
- color: Color-related adjectives.
- all: A combination of all the above categories.

### Noun Categories
- default: Standard business-related nouns.
- funny: Whimsical and humorous nouns.
- playful: Light-hearted and playful nouns.
- color: Color-related nouns.
- all: A combination of all the above categories.

### Extending the Lists
If you want to extend the list of adjectives or nouns, you can create your own classes that implement the HasGeneratorLists interface.

```php
namespace YourNamespace;

use Designbycode\BusinessNameGenerator\HasGeneratorLists;

class CustomAdjectives implements HasGeneratorLists
{
public function default(): array
{
return ["Energetic", "Bold", "Brilliant"];
}

public function funny(): array
{
return ["Zany", "Wacky", "Goofy"];
}

public function playful(): array
{
return ["Bouncy", "Jovial", "Perky"];
}

public function color(): array
{
return ["Crimson", "Amber", "Sapphire"];
}
}

```

Then use your custom class with the BusinessNameGenerator:

```php

use Designbycode\BusinessNameGenerator\BusinessNameGenerator;
use YourNamespace\CustomAdjectives;
use Designbycode\BusinessNameGenerator\Nouns;

$generator = new BusinessNameGenerator((new CustomAdjectives())->default(), (new Nouns())->default());

$businessName = $generator->generate('default', 'default');
echo $businessName; // Example output: "Energetic Solutions"


````

## Testing

```bash
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
}
],
"require": {
"php": "^8.1"
"php": "^8.1|^8.2|^8.3"
},
"require-dev": {
"pestphp/pest": "^2.20",
Expand All @@ -34,7 +34,7 @@
},
"scripts": {
"test": "vendor/bin/pest",
"test-coverage": "vendor/bin/pest --coverage",
"test-coverage": "vendor/bin/pest --coverage",
"format": "vendor/bin/pint"
},
"config": {
Expand Down
100 changes: 100 additions & 0 deletions src/Adjectives.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
<?php

namespace Designbycode\BusinessNameGenerator;

class Adjectives implements HasGeneratorLists
{
public function custom(array $array): array
{
return $array;
}

public function default(): array
{
return [
'Innovative', 'Creative', 'Dynamic', 'Strategic', 'Global',
'Agile', 'Efficient', 'Robust', 'Scalable', 'Intuitive',
'Advanced', 'Leading', 'Reliable', 'Custom', 'Smart',
'Visionary', 'Pioneering', 'Cutting-edge', 'Groundbreaking', 'Revolutionary',
'Trailblazing', 'Futuristic', 'Ingenious', 'Resourceful', 'Versatile',
'Proactive', 'Progressive', 'Synergistic', 'Transformative', 'Impactful',
'Elegant', 'Sophisticated', 'Sleek', 'Streamlined', 'User-friendly',
'High-performance', 'Next-gen', 'State-of-the-art', 'Premier', 'Premium',
'Elite', 'Exclusive', 'Exceptional', 'Top-tier', 'Outstanding',
'Remarkable', 'Impressive', 'Phenomenal', 'Astounding', 'Extraordinary',
'Superior', 'Unparalleled', 'Unmatched', 'Distinctive', 'Unique',
'Original', 'Inventive', 'Nimble', 'Flexible', 'Adaptable',
'Energetic', 'Enthusiastic', 'Passionate', 'Driven', 'Ambitious',
'Motivated', 'Committed', 'Dedicated', 'Focused', 'Persistent',
'Tenacious', 'Resilient', 'Sturdy', 'Strong', 'Powerful',
'Mighty', 'Formidable', 'Tough', 'Dependable', 'Consistent',
'Steady', 'Trustworthy', 'Honest', 'Ethical', 'Principled',
'Fair', 'Just', 'Responsible', 'Accountable', 'Transparent',
'Open', 'Direct', 'Straightforward', 'Clear', 'Plain',
'Simple', 'Uncomplicated', 'Productive', 'Proficient', 'Skilled',
'Competent', 'Capable', 'Experienced', 'Knowledgeable', 'Expert',
'Masterful', 'Accomplished', 'Talented', 'Gifted', 'Amazing',
'Incredible', 'Fantastic', 'Fabulous', 'Wonderful', 'Marvelous',
'Magnificent', 'Brilliant', 'Radiant', 'Luminous', 'Dazzling',
'Glowing', 'Shining', 'Sparkling', 'Gleaming', 'Bright',
'Vivid', 'Vibrant', 'Colorful',
];
}

/**
* @return string[]
*/
public function funny(): array
{
return [
'Goofy', 'Silly', 'Whimsical', 'Zany', 'Wacky',
'Quirky', 'Offbeat', 'Eccentric', 'Bizarre', 'Kooky',
'Absurd', 'Farcical', 'Ridiculous', 'Amusing', 'Humorous',
'Comical', 'Laughable', 'Hilarious', 'Mirthful', 'Jocular',
'Jocund', 'Jolly', 'Cheerful', 'Lively', 'Giddy',
'Witty', 'Droll', 'Clownish', 'Buffoonish', 'Waggish',
'Capricious', 'Frivolous', 'Madcap', 'Peculiar', 'Unusual',
'Strange', 'Weird', 'Odd', 'Crazy', 'Nonsensical',
'Surreal', 'Baffling', 'Puzzling', 'Bewildering', 'Confounding',
'Mind-boggling', 'Outlandish', 'Preposterous', 'Absurd', 'Fantastical',
];
}

/**
* @return string[]
*/
public function playful(): array
{
return [
'Whimsical', 'Cheerful', 'Lively', 'Giddy', 'Jovial',
'Merry', 'Mirthful', 'Jocular', 'Jocund', 'Jolly',
'Joyful', 'Playful', 'Fun-loving', 'Bubbly', 'Bouncy',
'Carefree', 'Animated', 'Energetic', 'Sprightly', 'Vivacious',
'Perky', 'Peppy', 'Chipper', 'Upbeat', 'Buoyant',
'Zesty', 'Spirited', 'High-spirited', 'Zingy', 'Zippy',
'Witty', 'Amusing', 'Entertaining', 'Mischievous', 'Impish',
'Rascally', 'Trickish', 'Sportive', 'Frisky', 'Frolicsome',
'Jestful', 'Sporty', 'Fancy-free', 'Light-hearted', 'Uninhibited',
'Carefree', 'Free-spirited', 'Wild', 'Reckless', 'Irrepressible',
'Boisterous', 'Rambunctious', 'Exuberant', 'Radiant', 'Sunny',
'Blithe', 'Blithesome', 'Debonair', 'Airy', 'Light',
'Breezy', 'Untroubled', 'Jaunty', 'Happy-go-lucky', 'Ebullient',
'Bouncing', 'Zappy', 'Full of beans', 'Bustling', 'Effervescent',
];
}

public function color(): array
{
return Colors::getList();
}

public function all(): array
{
return array_merge(
$this->default(),
$this->funny(),
$this->playful(),
$this->color()
);
}
}
Loading

0 comments on commit 7489769

Please sign in to comment.