@@ -535,7 +535,7 @@ public function addAllowedValues($option, $allowedValues)
535
535
));
536
536
}
537
537
538
- if (!is_array ($ allowedValues )) {
538
+ if (!\ is_array ($ allowedValues )) {
539
539
$ allowedValues = array ($ allowedValues );
540
540
}
541
541
@@ -718,12 +718,12 @@ public function resolve(array $options = array())
718
718
// Make sure that no unknown options are passed
719
719
$ diff = array_diff_key ($ options , $ clone ->defined );
720
720
721
- if (count ($ diff ) > 0 ) {
721
+ if (\ count ($ diff ) > 0 ) {
722
722
ksort ($ clone ->defined );
723
723
ksort ($ diff );
724
724
725
725
throw new UndefinedOptionsException (sprintf (
726
- (count ($ diff ) > 1 ? 'The options "%s" do not exist. ' : 'The option "%s" does not exist. ' ).' Defined options are: "%s". ' ,
726
+ (\ count ($ diff ) > 1 ? 'The options "%s" do not exist. ' : 'The option "%s" does not exist. ' ).' Defined options are: "%s". ' ,
727
727
implode ('", " ' , array_keys ($ diff )),
728
728
implode ('", " ' , array_keys ($ clone ->defined ))
729
729
));
@@ -738,11 +738,11 @@ public function resolve(array $options = array())
738
738
// Check whether any required option is missing
739
739
$ diff = array_diff_key ($ clone ->required , $ clone ->defaults );
740
740
741
- if (count ($ diff ) > 0 ) {
741
+ if (\ count ($ diff ) > 0 ) {
742
742
ksort ($ diff );
743
743
744
744
throw new MissingOptionsException (sprintf (
745
- count ($ diff ) > 1 ? 'The required options "%s" are missing. ' : 'The required option "%s" is missing. ' ,
745
+ \ count ($ diff ) > 1 ? 'The required options "%s" are missing. ' : 'The required option "%s" is missing. ' ,
746
746
implode ('", " ' , array_keys ($ diff ))
747
747
));
748
748
}
@@ -882,7 +882,7 @@ public function offsetGet($option)
882
882
$ this ->formatValue ($ value )
883
883
);
884
884
885
- if (count ($ printableAllowedValues ) > 0 ) {
885
+ if (\ count ($ printableAllowedValues ) > 0 ) {
886
886
$ message .= sprintf (
887
887
' Accepted values are: %s. ' ,
888
888
$ this ->formatValues ($ printableAllowedValues )
@@ -1049,7 +1049,7 @@ public function count()
1049
1049
throw new AccessException ('Counting is only supported within closures of lazy options and normalizers. ' );
1050
1050
}
1051
1051
1052
- return count ($ this ->defaults );
1052
+ return \ count ($ this ->defaults );
1053
1053
}
1054
1054
1055
1055
/**
@@ -1088,7 +1088,7 @@ private function formatTypeOf($value, ?string $type): string
1088
1088
}
1089
1089
}
1090
1090
1091
- return (\is_object ($ value ) ? get_class ($ value ) : gettype ($ value )).$ suffix ;
1091
+ return (\is_object ($ value ) ? \ get_class ($ value ) : \ gettype ($ value )).$ suffix ;
1092
1092
}
1093
1093
1094
1094
/**
@@ -1103,7 +1103,7 @@ private function formatTypeOf($value, ?string $type): string
1103
1103
private function formatValue ($ value ): string
1104
1104
{
1105
1105
if (\is_object ($ value )) {
1106
- return get_class ($ value );
1106
+ return \ get_class ($ value );
1107
1107
}
1108
1108
1109
1109
if (\is_array ($ value )) {
@@ -1152,7 +1152,7 @@ private function formatValues(array $values): string
1152
1152
1153
1153
private static function isValueValidType (string $ type , $ value ): bool
1154
1154
{
1155
- return (function_exists ($ isFunction = 'is_ ' .$ type ) && $ isFunction ($ value )) || $ value instanceof $ type ;
1155
+ return (\ function_exists ($ isFunction = 'is_ ' .$ type ) && $ isFunction ($ value )) || $ value instanceof $ type ;
1156
1156
}
1157
1157
1158
1158
private function getInvalidValues (array $ arrayValues , string $ type ): array
0 commit comments