mirror of
https://github.com/archtechx/tenancy.git
synced 2026-06-21 03:04:04 +00:00
Use Arr::wrap instead of (array)
This commit is contained in:
parent
9ea085ef05
commit
f9636b15cf
1 changed files with 2 additions and 1 deletions
|
|
@ -4,6 +4,7 @@ declare(strict_types=1);
|
||||||
|
|
||||||
namespace Stancl\Tenancy\Database\Concerns;
|
namespace Stancl\Tenancy\Database\Concerns;
|
||||||
|
|
||||||
|
use Illuminate\Support\Arr;
|
||||||
use InvalidArgumentException;
|
use InvalidArgumentException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -62,7 +63,7 @@ trait ValidatesDatabaseParameters
|
||||||
{
|
{
|
||||||
$allowedCharacters ??= $this->allowedParameterCharacters();
|
$allowedCharacters ??= $this->allowedParameterCharacters();
|
||||||
|
|
||||||
foreach ((array) $parameters as $parameter) {
|
foreach (Arr::wrap($parameters) as $parameter) {
|
||||||
if (is_null($parameter)) {
|
if (is_null($parameter)) {
|
||||||
// Skip if there's nothing to validate
|
// Skip if there's nothing to validate
|
||||||
// (e.g. when $tenant->database()->getUsername() of an
|
// (e.g. when $tenant->database()->getUsername() of an
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue