mirror of
https://github.com/archtechx/tenancy.git
synced 2026-05-06 14:24:04 +00:00
Make validateFilename accept string instead of ?string
This commit is contained in:
parent
2bdda23a56
commit
1a01164b87
1 changed files with 1 additions and 5 deletions
|
|
@ -107,14 +107,10 @@ trait ValidatesDatabaseParameters
|
|||
* @throws InvalidArgumentException
|
||||
* @see Stancl\Tenancy\Database\TenantDatabaseManagers\SQLiteDatabaseManager
|
||||
*/
|
||||
protected function validateFilename(string|null $filename): void
|
||||
protected function validateFilename(string $filename): void
|
||||
{
|
||||
$this->validateParameter($filename, static::allowedFilenameCharacters());
|
||||
|
||||
if (! is_string($filename)) {
|
||||
throw new InvalidArgumentException("Filename has to be a string.");
|
||||
}
|
||||
|
||||
if ($filename === '') {
|
||||
throw new InvalidArgumentException("Filename cannot be empty.");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue