Skip to content

Commit ebfab39

Browse files
author
Sjoerd
authored
Laravel 6+ support
Minor change to isValidKey method to provide support for Laravel 6+ without installing the laravel/helpers composer package.
1 parent be51ce0 commit ebfab39

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/EnvironmentSetCommand.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace ImLiam\EnvironmentSetCommand;
44

5+
use Illuminate\Support\Str;
56
use InvalidArgumentException;
67
use Illuminate\Console\Command;
78

@@ -134,7 +135,7 @@ protected function getKeyValue(): array
134135
*/
135136
protected function isValidKey(string $key): bool
136137
{
137-
if (str_contains($key, '=')) {
138+
if (Str::contains($key, '=')) {
138139
throw new InvalidArgumentException("Environment key should not contain '='");
139140
}
140141

0 commit comments

Comments
 (0)