@@ -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 )
@@ -978,7 +978,7 @@ public function count()
978978 throw new AccessException ('Counting is only supported within closures of lazy options and normalizers. ' );
979979 }
980980
981- return count ($ this ->defaults );
981+ return \ count ($ this ->defaults );
982982 }
983983
984984 /**
@@ -1017,7 +1017,7 @@ private function formatTypeOf($value, ?string $type): string
10171017 }
10181018 }
10191019
1020- return (\is_object ($ value ) ? get_class ($ value ) : gettype ($ value )).$ suffix ;
1020+ return (\is_object ($ value ) ? \ get_class ($ value ) : \ gettype ($ value )).$ suffix ;
10211021 }
10221022
10231023 /**
@@ -1032,7 +1032,7 @@ private function formatTypeOf($value, ?string $type): string
10321032 private function formatValue ($ value ): string
10331033 {
10341034 if (\is_object ($ value )) {
1035- return get_class ($ value );
1035+ return \ get_class ($ value );
10361036 }
10371037
10381038 if (\is_array ($ value )) {
@@ -1081,7 +1081,7 @@ private function formatValues(array $values): string
10811081
10821082 private static function isValueValidType (string $ type , $ value ): bool
10831083 {
1084- return (function_exists ($ isFunction = 'is_ ' .$ type ) && $ isFunction ($ value )) || $ value instanceof $ type ;
1084+ return (\ function_exists ($ isFunction = 'is_ ' .$ type ) && $ isFunction ($ value )) || $ value instanceof $ type ;
10851085 }
10861086
10871087 private function getInvalidValues (array $ arrayValues , string $ type ): array
0 commit comments