Skip to content

Commit 2ad6fd5

Browse files
committedDec 3, 2021
fix: flag type check error
1 parent 3227051 commit 2ad6fd5

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed
 

‎src/Concern/RuleParserTrait.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
namespace Toolkit\PFlag\Concern;
44

5-
use InvalidArgumentException;
65
use Toolkit\PFlag\Exception\FlagException;
76
use Toolkit\PFlag\FlagsParser;
87
use Toolkit\PFlag\FlagType;
@@ -11,7 +10,6 @@
1110
use function array_shift;
1211
use function array_unshift;
1312
use function is_array;
14-
use function is_callable;
1513
use function is_int;
1614
use function is_numeric;
1715
use function ltrim;
@@ -208,7 +206,7 @@ protected function parseRule($rule, string $name = '', int $index = 0, bool $isO
208206
// not found sep char.
209207
if (!str_contains($rule, $sep)) {
210208
// has multi words, is an desc string.
211-
if (strpos($rule, ' ') > 1) {
209+
if (strpos($rule, ' ') > 0) {
212210
$item['desc'] = $rule;
213211
} else { // only type name.
214212
$item['type'] = $rule;

0 commit comments

Comments
 (0)