@@ -478,7 +478,7 @@ public function addAllowedValues($option, $allowedValues)
478
478
));
479
479
}
480
480
481
- if (!is_array ($ allowedValues )) {
481
+ if (!\ is_array ($ allowedValues )) {
482
482
$ allowedValues = array ($ allowedValues );
483
483
}
484
484
@@ -660,12 +660,12 @@ public function resolve(array $options = array())
660
660
// Make sure that no unknown options are passed
661
661
$ diff = array_diff_key ($ options , $ clone ->defined );
662
662
663
- if (count ($ diff ) > 0 ) {
663
+ if (\ count ($ diff ) > 0 ) {
664
664
ksort ($ clone ->defined );
665
665
ksort ($ diff );
666
666
667
667
throw new UndefinedOptionsException (sprintf (
668
- (count ($ diff ) > 1 ? 'The options "%s" do not exist. ' : 'The option "%s" does not exist. ' ).' Defined options are: "%s". ' ,
668
+ (\ count ($ diff ) > 1 ? 'The options "%s" do not exist. ' : 'The option "%s" does not exist. ' ).' Defined options are: "%s". ' ,
669
669
implode ('", " ' , array_keys ($ diff )),
670
670
implode ('", " ' , array_keys ($ clone ->defined ))
671
671
));
@@ -680,11 +680,11 @@ public function resolve(array $options = array())
680
680
// Check whether any required option is missing
681
681
$ diff = array_diff_key ($ clone ->required , $ clone ->defaults );
682
682
683
- if (count ($ diff ) > 0 ) {
683
+ if (\ count ($ diff ) > 0 ) {
684
684
ksort ($ diff );
685
685
686
686
throw new MissingOptionsException (sprintf (
687
- count ($ diff ) > 1 ? 'The required options "%s" are missing. ' : 'The required option "%s" is missing. ' ,
687
+ \ count ($ diff ) > 1 ? 'The required options "%s" are missing. ' : 'The required option "%s" is missing. ' ,
688
688
implode ('", " ' , array_keys ($ diff ))
689
689
));
690
690
}
@@ -824,7 +824,7 @@ public function offsetGet($option)
824
824
$ this ->formatValue ($ value )
825
825
);
826
826
827
- if (count ($ printableAllowedValues ) > 0 ) {
827
+ if (\ count ($ printableAllowedValues ) > 0 ) {
828
828
$ message .= sprintf (
829
829
' Accepted values are: %s. ' ,
830
830
$ this ->formatValues ($ printableAllowedValues )
@@ -988,7 +988,7 @@ public function count()
988
988
throw new AccessException ('Counting is only supported within closures of lazy options and normalizers. ' );
989
989
}
990
990
991
- return count ($ this ->defaults );
991
+ return \ count ($ this ->defaults );
992
992
}
993
993
994
994
/**
@@ -1030,7 +1030,7 @@ private function formatTypeOf($value, $type)
1030
1030
}
1031
1031
}
1032
1032
1033
- return (\is_object ($ value ) ? get_class ($ value ) : gettype ($ value )).$ suffix ;
1033
+ return (\is_object ($ value ) ? \ get_class ($ value ) : \ gettype ($ value )).$ suffix ;
1034
1034
}
1035
1035
1036
1036
/**
@@ -1047,7 +1047,7 @@ private function formatTypeOf($value, $type)
1047
1047
private function formatValue ($ value )
1048
1048
{
1049
1049
if (\is_object ($ value )) {
1050
- return get_class ($ value );
1050
+ return \ get_class ($ value );
1051
1051
}
1052
1052
1053
1053
if (\is_array ($ value )) {
@@ -1100,7 +1100,7 @@ private function formatValues(array $values)
1100
1100
1101
1101
private static function isValueValidType ($ type , $ value )
1102
1102
{
1103
- return (function_exists ($ isFunction = 'is_ ' .$ type ) && $ isFunction ($ value )) || $ value instanceof $ type ;
1103
+ return (\ function_exists ($ isFunction = 'is_ ' .$ type ) && $ isFunction ($ value )) || $ value instanceof $ type ;
1104
1104
}
1105
1105
1106
1106
/**
0 commit comments