1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-06-21 01:54:03 +00:00

Use Arr::wrap instead of (array)

This commit is contained in:
lukinovec 2026-06-08 11:08:01 +02:00
parent 9ea085ef05
commit f9636b15cf

View file

@ -4,6 +4,7 @@ declare(strict_types=1);
namespace Stancl\Tenancy\Database\Concerns;
use Illuminate\Support\Arr;
use InvalidArgumentException;
/**
@ -62,7 +63,7 @@ trait ValidatesDatabaseParameters
{
$allowedCharacters ??= $this->allowedParameterCharacters();
foreach ((array) $parameters as $parameter) {
foreach (Arr::wrap($parameters) as $parameter) {
if (is_null($parameter)) {
// Skip if there's nothing to validate
// (e.g. when $tenant->database()->getUsername() of an