Skip to content

Commit 4e26bff

Browse files
committed
fixes optoins validator
1 parent ad1d2af commit 4e26bff

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/Services/Validators/Meta.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,11 @@ private function selectMetaParameterMissing(): bool
101101

102102
private function invalidOptions($options): bool
103103
{
104-
return ! $options
105-
|| enum_exists($options) && ! (new ReflectionEnum($options))
104+
return $options
105+
&& (
106+
enum_exists($options) && ! (new ReflectionEnum($options))
106107
->implementsInterface(Select::class)
107-
|| ! is_array($options) && ! method_exists($options, 'toArray');
108+
|| ! class_exists($options) && ! is_array($options) && ! method_exists($options, 'toArray')
109+
);
108110
}
109111
}

0 commit comments

Comments
 (0)