@@ -478,7 +478,7 @@ public function addAllowedValues($option, $allowedValues)
478478 ));
479479 }
480480
481- if (!is_array ($ allowedValues )) {
481+ if (!\ is_array ($ allowedValues )) {
482482 $ allowedValues = array ($ allowedValues );
483483 }
484484
@@ -660,12 +660,12 @@ public function resolve(array $options = array())
660660 // Make sure that no unknown options are passed
661661 $ diff = array_diff_key ($ options , $ clone ->defined );
662662
663- if (count ($ diff ) > 0 ) {
663+ if (\ count ($ diff ) > 0 ) {
664664 ksort ($ clone ->defined );
665665 ksort ($ diff );
666666
667667 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". ' ,
669669 implode ('", " ' , array_keys ($ diff )),
670670 implode ('", " ' , array_keys ($ clone ->defined ))
671671 ));
@@ -680,11 +680,11 @@ public function resolve(array $options = array())
680680 // Check whether any required option is missing
681681 $ diff = array_diff_key ($ clone ->required , $ clone ->defaults );
682682
683- if (count ($ diff ) > 0 ) {
683+ if (\ count ($ diff ) > 0 ) {
684684 ksort ($ diff );
685685
686686 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. ' ,
688688 implode ('", " ' , array_keys ($ diff ))
689689 ));
690690 }
@@ -824,7 +824,7 @@ public function offsetGet($option)
824824 $ this ->formatValue ($ value )
825825 );
826826
827- if (count ($ printableAllowedValues ) > 0 ) {
827+ if (\ count ($ printableAllowedValues ) > 0 ) {
828828 $ message .= sprintf (
829829 ' Accepted values are: %s. ' ,
830830 $ this ->formatValues ($ printableAllowedValues )
@@ -988,7 +988,7 @@ public function count()
988988 throw new AccessException ('Counting is only supported within closures of lazy options and normalizers. ' );
989989 }
990990
991- return count ($ this ->defaults );
991+ return \ count ($ this ->defaults );
992992 }
993993
994994 /**
@@ -1030,7 +1030,7 @@ private function formatTypeOf($value, $type)
10301030 }
10311031 }
10321032
1033- return (\is_object ($ value ) ? get_class ($ value ) : gettype ($ value )).$ suffix ;
1033+ return (\is_object ($ value ) ? \ get_class ($ value ) : \ gettype ($ value )).$ suffix ;
10341034 }
10351035
10361036 /**
@@ -1047,7 +1047,7 @@ private function formatTypeOf($value, $type)
10471047 private function formatValue ($ value )
10481048 {
10491049 if (\is_object ($ value )) {
1050- return get_class ($ value );
1050+ return \ get_class ($ value );
10511051 }
10521052
10531053 if (\is_array ($ value )) {
@@ -1100,7 +1100,7 @@ private function formatValues(array $values)
11001100
11011101 private static function isValueValidType ($ type , $ value )
11021102 {
1103- return (function_exists ($ isFunction = 'is_ ' .$ type ) && $ isFunction ($ value )) || $ value instanceof $ type ;
1103+ return (\ function_exists ($ isFunction = 'is_ ' .$ type ) && $ isFunction ($ value )) || $ value instanceof $ type ;
11041104 }
11051105
11061106 /**
0 commit comments