Skip to content

Commit 5af4875

Browse files
Fix typo
1 parent 60bcdb6 commit 5af4875

File tree

13 files changed

+57
-57
lines changed

13 files changed

+57
-57
lines changed

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
blank_issues_enabled: false
22
contact_links:
33
- name: Ask a question
4-
url: https://github.com/gearbox-solutions/enum-convertor-laravel/discussions/new?category=q-a
4+
url: https://github.com/gearbox-solutions/enum-converter-laravel/discussions/new?category=q-a
55
about: Ask the community for help
66
- name: Request a feature
7-
url: https://github.com/gearbox-solutions/enum-convertor-laravel/discussions/new?category=ideas
7+
url: https://github.com/gearbox-solutions/enum-converter-laravel/discussions/new?category=ideas
88
about: Share ideas for new features
99
- name: Report a security issue
10-
url: https://github.com/gearbox-solutions/enum-convertor-laravel/security/policy
10+
url: https://github.com/gearbox-solutions/enum-converter-laravel/security/policy
1111
about: Learn how to notify us for sensitive bugs

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Changelog
22

3-
All notable changes to `enum-convertor-laravel` will be documented in this file.
3+
All notable changes to `enum-converter-laravel` will be documented in this file.

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
# Enum Convertor for Laravel
1+
# Enum Converter for Laravel
22

3-
[![Latest Version on Packagist](https://img.shields.io/packagist/v/likeadeckofcards/enum-convertor-laravel.svg?style=flat-square)](https://packagist.org/packages/likeadeckofcards/enum-convertor-laravel)
4-
[![GitHub Tests Action Status](https://img.shields.io/github/actions/workflow/status/likeadeckofcards/enum-convertor-laravel/run-tests.yml?branch=main&label=tests&style=flat-square)](https://github.com/likeadeckofcards/enum-convertor-laravel/actions?query=workflow%3Arun-tests+branch%3Amain)
5-
[![GitHub Code Style Action Status](https://img.shields.io/github/actions/workflow/status/likeadeckofcards/enum-convertor-laravel/fix-php-code-style-issues.yml?branch=main&label=code%20style&style=flat-square)](https://github.com/likeadeckofcards/enum-convertor-laravel/actions?query=workflow%3A"Fix+PHP+code+style+issues"+branch%3Amain)
6-
[![Total Downloads](https://img.shields.io/packagist/dt/likeadeckofcards/enum-convertor-laravel.svg?style=flat-square)](https://packagist.org/packages/likeadeckofcards/enum-convertor-laravel)
3+
[![Latest Version on Packagist](https://img.shields.io/packagist/v/gearbox-solutions/enum-converter-laravel.svg?style=flat-square)](https://packagist.org/packages/gearbox-solutions/enum-converter-laravel)
4+
[![GitHub Tests Action Status](https://img.shields.io/github/actions/workflow/status/gearbox-solutions/enum-converter-laravel/run-tests.yml?branch=main&label=tests&style=flat-square)](https://github.com/gearbox-solutions/enum-converter-laravel/actions?query=workflow%3Arun-tests+branch%3Amain)
5+
[![GitHub Code Style Action Status](https://img.shields.io/github/actions/workflow/status/gearbox-solutions/enum-converter-laravel/fix-php-code-style-issues.yml?branch=main&label=code%20style&style=flat-square)](https://github.com/gearbox-solutions/enum-converter-laravel/actions?query=workflow%3A"Fix+PHP+code+style+issues"+branch%3Amain)
6+
[![Total Downloads](https://img.shields.io/packagist/dt/gearbox-solutions/enum-converter-laravel.svg?style=flat-square)](https://packagist.org/packages/gearbox-solutions/enum-converter-laravel)
77

88
This package adds a command that will take PHP enums and turn them into TS/JS enums for use in frontend development.
99

@@ -12,13 +12,13 @@ This package adds a command that will take PHP enums and turn them into TS/JS en
1212
You can install the package via composer:
1313

1414
```bash
15-
composer require --dev gearbox-solutions/enum-convertor-laravel
15+
composer require --dev gearbox-solutions/enum-converter-laravel
1616
```
1717

1818
You can publish the config file with:
1919

2020
```bash
21-
php artisan vendor:publish --tag="enum-convertor-laravel-config"
21+
php artisan vendor:publish --tag="enum-converter-laravel-config"
2222
```
2323

2424
This is the contents of the published config file:

composer.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
2-
"name": "gearbox-solutions/enum-convertor-laravel",
3-
"description": "This is my package enum-convertor-laravel",
2+
"name": "gearbox-solutions/enum-converter-laravel",
3+
"description": "This is my package enum-converter-laravel",
44
"keywords": [
55
"GearboxSolutions",
66
"laravel",
7-
"enum-convertor-laravel"
7+
"enum-converter-laravel"
88
],
9-
"homepage": "https://github.com/gearbox-solutions/enum-convertor-laravel",
9+
"homepage": "https://github.com/gearbox-solutions/enum-converter-laravel",
1010
"license": "MIT",
1111
"authors": [
1212
{
@@ -30,13 +30,13 @@
3030
},
3131
"autoload": {
3232
"psr-4": {
33-
"GearboxSolutions\\EnumConvertor\\": "src/",
34-
"GearboxSolutions\\EnumConvertor\\Database\\Factories\\": "database/factories/"
33+
"GearboxSolutions\\EnumConverter\\": "src/",
34+
"GearboxSolutions\\EnumConverter\\Database\\Factories\\": "database/factories/"
3535
}
3636
},
3737
"autoload-dev": {
3838
"psr-4": {
39-
"GearboxSolutions\\EnumConvertor\\Tests\\": "tests/",
39+
"GearboxSolutions\\EnumConverter\\Tests\\": "tests/",
4040
"Workbench\\App\\": "workbench/app/"
4141
}
4242
},
@@ -58,10 +58,10 @@
5858
"extra": {
5959
"laravel": {
6060
"providers": [
61-
"GearboxSolutions\\EnumConvertor\\EnumConvertorServiceProvider"
61+
"GearboxSolutions\\EnumConverter\\EnumConverterServiceProvider"
6262
],
6363
"aliases": {
64-
"EnumConvertor": "GearboxSolutions\\EnumConvertor\\Facades\\EnumConvertor"
64+
"EnumConverter": "GearboxSolutions\\EnumConverter\\Facades\\EnumConverter"
6565
}
6666
}
6767
},
File renamed without changes.

src/Commands/EnumConvertorCommand.php renamed to src/Commands/EnumConverterCommand.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
<?php
22

3-
namespace GearboxSolutions\EnumConvertor\Commands;
3+
namespace GearboxSolutions\EnumConverter\Commands;
44

55
use Illuminate\Console\Command;
66
use Illuminate\Support\Facades\Cache;
77
use Illuminate\Support\Facades\File;
88
use Illuminate\Support\Str;
99

10-
class EnumConvertorCommand extends Command
10+
class EnumConverterCommand extends Command
1111
{
1212
public $signature = 'convert-enums {--js} {--force : Force processing of enums}';
1313

1414
public $description = 'Convert PHP enums to JS/TS enums';
1515

1616
public function handle(): int
1717
{
18-
collect(config('enum-convertor-laravel.enum_paths'))
18+
collect(config('enum-converter-laravel.enum_paths'))
1919
->each(function ($outputPath, $path) {
2020
$files = File::allFiles(base_path($path));
2121

@@ -42,7 +42,7 @@ public function handle(): int
4242
}
4343

4444
$outputFile = Str::of($file->getFilename())
45-
->replace('.php', config('enum-convertor-laravel.enum_extension'));
45+
->replace('.php', config('enum-converter-laravel.enum_extension'));
4646

4747
$name = class_basename($class);
4848

@@ -95,13 +95,13 @@ private function convertValue($item)
9595

9696
private function hasFileChanged($file)
9797
{
98-
if (! config('enum-convertor-laravel.enable_file_hash_check', false)) {
98+
if (! config('enum-converter-laravel.enable_file_hash_check', false)) {
9999
return true;
100100
}
101101

102102
$fileHash = hash_file('sha256', $file->getPathname());
103103

104-
$cacheKey = 'enum-convertor-'.hash('sha256', $file->getPathname());
104+
$cacheKey = 'enum-converter-'.hash('sha256', $file->getPathname());
105105

106106
$previousHash = Cache::get($cacheKey, '');
107107

src/EnumConverter.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?php
2+
3+
namespace GearboxSolutions\EnumConverter;
4+
5+
class EnumConverter {}
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<?php
22

3-
namespace GearboxSolutions\EnumConvertor;
3+
namespace GearboxSolutions\EnumConverter;
44

5-
use GearboxSolutions\EnumConvertor\Commands\EnumConvertorCommand;
5+
use GearboxSolutions\EnumConverter\Commands\EnumConverterCommand;
66
use Spatie\LaravelPackageTools\Package;
77
use Spatie\LaravelPackageTools\PackageServiceProvider;
88

9-
class EnumConvertorServiceProvider extends PackageServiceProvider
9+
class EnumConverterServiceProvider extends PackageServiceProvider
1010
{
1111
public function configurePackage(Package $package): void
1212
{
@@ -16,8 +16,8 @@ public function configurePackage(Package $package): void
1616
* More info: https://github.com/spatie/laravel-package-tools
1717
*/
1818
$package
19-
->name('enum-convertor-laravel')
19+
->name('enum-converter-laravel')
2020
->hasConfigFile()
21-
->hasCommand(EnumConvertorCommand::class);
21+
->hasCommand(EnumConverterCommand::class);
2222
}
2323
}

src/EnumConvertor.php

Lines changed: 0 additions & 5 deletions
This file was deleted.

src/Facades/EnumConverter.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php
2+
3+
namespace GearboxSolutions\EnumConverter\Facades;
4+
5+
use Illuminate\Support\Facades\Facade;
6+
7+
/**
8+
* @see \GearboxSolutions\EnumConverter\EnumConverter
9+
*/
10+
class EnumConverter extends Facade
11+
{
12+
protected static function getFacadeAccessor(): string
13+
{
14+
return \GearboxSolutions\EnumConverter\EnumConverter::class;
15+
}
16+
}

0 commit comments

Comments
 (0)