Skip to content

Commit

Permalink
Merge pull request #4 from stylers-llc/develop
Browse files Browse the repository at this point in the history
Version upgrade for Laravel 5.8
  • Loading branch information
balazsbencs authored Apr 1, 2021
2 parents 9377ba2 + ad3fcc7 commit 50d4cbe
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@
}
],
"require": {
"php": ">=7.1.3",
"illuminate/database": "~5",
"illuminate/support": "~5"
"php": ">=7.2.5",
"illuminate/database": "~6",
"illuminate/support": "~6"
},
"require-dev": {
"mockery/mockery": "^1.1",
"orchestra/testbench": "~3.0|~3.6|~3.7",
"phpmd/phpmd": "^2.6",
"phpunit/phpunit": "^7.3"
"orchestra/testbench": "~3.0|~3.6|~3.7|~4.0",
"phpmd/phpmd": "^2.6|^2.7|^2.8|^2.9",
"phpunit/phpunit": "^7.3|^8.0|^9.0"
},
"autoload": {
"classmap": [
Expand Down
3 changes: 2 additions & 1 deletion src/Enums/AbstractEnum.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace Stylers\Address\Enums;

use Illuminate\Support\Arr;
use Stylers\Address\Contracts\Enums\EnumInterface;
use \ReflectionClass;

Expand All @@ -13,6 +14,6 @@ public static function getConstants(): array
$reflection = new ReflectionClass($class);
$constants = $reflection->getConstants();

return array_sort($constants);
return Arr::sort($constants);
}
}
3 changes: 2 additions & 1 deletion tests/fixtures/database/factories/AddressFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
use Faker\Generator as Faker;
use Stylers\Address\Models\Address;
use Stylers\Address\Enums\AddressTypeEnum;
use Illuminate\Support\Arr;

/*
|--------------------------------------------------------------------------
Expand All @@ -18,7 +19,7 @@
/** @var \Illuminate\Database\Eloquent\Factory $factory */
$factory->define(Address::class, function (Faker $faker) {
return [
'type' => array_random(AddressTypeEnum::getConstants()),
'type' => Arr::random(AddressTypeEnum::getConstants()),
'country' => $faker->country,
'country_code' => $faker->countryCode,
'zip_code' => $faker->postcode,
Expand Down

0 comments on commit 50d4cbe

Please sign in to comment.