Skip to content

Commit 9830f90

Browse files
author
Kevin Buchholz
committed
Merge branch 'release/3.1.0'
2 parents 7491e65 + 8f4748f commit 9830f90

18 files changed

+1073
-76
lines changed

.github/dependabot.yml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "composer"
4+
directory: "/"
5+
schedule:
6+
interval: "daily"
7+
reviewers:
8+
- NeroAzure
9+
assignees:
10+
- NeroAzure

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ before_script:
2222
script:
2323
- vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover
2424
- vendor/bin/phpcs -s
25-
- vendor/bin/phpmd src,tests text phpmd.xml
25+
# - vendor/bin/phpmd src,tests text phpmd.xml temporarily disabled, because of false positives

README.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ Enum implementation for Laravel. Based on [eloquent/enumeration](https://github.
3333

3434
## Requirements
3535

36-
* eloquent/enumeration 6.0 or newer
3736
* Laravel 8.0 or newer;
3837
* PHP 7.3 or newer
3938

@@ -468,7 +467,7 @@ UserType::Moderator()->config('permissions', ['thread.foreign.archive']); // you
468467

469468
## License information
470469

471-
Much of the functionality in this Package is inspired by [bensampo/laravel-enum](https://github.com/bensampo/laravel-enum) and some code has been taken from it and modified, for example the `MakeEnumCommand.php`, the `EnumServiceProvider.php` and this readme.
470+
Much of the functionality in this Package is inspired by [bensampo/laravel-enum](https://github.com/bensampo/laravel-enum) and some code has been taken from it and modified, for example the `MakeEnumCommand.php`, the `EnumServiceProvider.php` and this readme. Some code has been copied from [eloquent/enumeration](https://github.com/eloquent/enumeration), as at first this package build upon it, but due to depending only on a fraction of functionality we concluded it would be better to internalize the code that we used.
472471

473472
- [bensampo/laravel-enum](https://github.com/bensampo/laravel-enum) is licensed under MIT
474473
- [eloquent/enumeration](https://github.com/eloquent/enumeration) is licensed under MIT

composer.json

+1-3
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,15 @@
2828
],
2929
"require": {
3030
"php": ">=7.3",
31-
"eloquent/enumeration": "^6.0",
3231
"illuminate/console": "^8.0",
3332
"illuminate/contracts": "^8.0",
3433
"illuminate/support": "^8.0"
3534
},
3635
"require-dev": {
37-
"consistence/coding-standard": "3.10.1",
3836
"orchestra/testbench": "^6.0",
3937
"phpmd/phpmd": "^2.6",
4038
"phpunit/phpunit": "9.*",
41-
"slevomat/coding-standard": "6.4.0",
39+
"slevomat/coding-standard": "6.4.1",
4240
"squizlabs/php_codesniffer": "^3.5"
4341
},
4442
"autoload": {

phpcs.xml

+323-60
Large diffs are not rendered by default.

src/Casts/Enum.php

+8
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,16 @@
66

77
class Enum implements CastsAttributes
88
{
9+
/**
10+
* @var string
11+
* @phpcsSuppress SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingNativeTypeHint
12+
*/
913
private $enumClass;
1014

15+
/**
16+
* @var bool
17+
* @phpcsSuppress SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingNativeTypeHint
18+
*/
1119
private $nullable;
1220

1321
public function __construct(string $enumClass, bool $nullable = true)

src/Commands/MakeEnumerationCommand.php

+3
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,23 @@ class MakeEnumerationCommand extends GeneratorCommand
1010
* The console command name.
1111
*
1212
* @var string
13+
* @phpcsSuppress SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingNativeTypeHint
1314
*/
1415
protected $name = 'make:enum';
1516

1617
/**
1718
* The console command description.
1819
*
1920
* @var string
21+
* @phpcsSuppress SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingNativeTypeHint
2022
*/
2123
protected $description = 'Create a new enum class';
2224

2325
/**
2426
* The type of class being generated.
2527
*
2628
* @var string
29+
* @phpcsSuppress SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingNativeTypeHint
2730
*/
2831
protected $type = 'Enum';
2932

0 commit comments

Comments
 (0)