@@ -535,7 +535,7 @@ public function addAllowedValues($option, $allowedValues)
535535 ));
536536 }
537537
538- if (!is_array ($ allowedValues )) {
538+ if (!\ is_array ($ allowedValues )) {
539539 $ allowedValues = array ($ allowedValues );
540540 }
541541
@@ -718,12 +718,12 @@ public function resolve(array $options = array())
718718 // Make sure that no unknown options are passed
719719 $ diff = array_diff_key ($ options , $ clone ->defined );
720720
721- if (count ($ diff ) > 0 ) {
721+ if (\ count ($ diff ) > 0 ) {
722722 ksort ($ clone ->defined );
723723 ksort ($ diff );
724724
725725 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". ' ,
727727 implode ('", " ' , array_keys ($ diff )),
728728 implode ('", " ' , array_keys ($ clone ->defined ))
729729 ));
@@ -738,11 +738,11 @@ public function resolve(array $options = array())
738738 // Check whether any required option is missing
739739 $ diff = array_diff_key ($ clone ->required , $ clone ->defaults );
740740
741- if (count ($ diff ) > 0 ) {
741+ if (\ count ($ diff ) > 0 ) {
742742 ksort ($ diff );
743743
744744 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. ' ,
746746 implode ('", " ' , array_keys ($ diff ))
747747 ));
748748 }
@@ -882,7 +882,7 @@ public function offsetGet($option)
882882 $ this ->formatValue ($ value )
883883 );
884884
885- if (count ($ printableAllowedValues ) > 0 ) {
885+ if (\ count ($ printableAllowedValues ) > 0 ) {
886886 $ message .= sprintf (
887887 ' Accepted values are: %s. ' ,
888888 $ this ->formatValues ($ printableAllowedValues )
@@ -1049,7 +1049,7 @@ public function count()
10491049 throw new AccessException ('Counting is only supported within closures of lazy options and normalizers. ' );
10501050 }
10511051
1052- return count ($ this ->defaults );
1052+ return \ count ($ this ->defaults );
10531053 }
10541054
10551055 /**
@@ -1088,7 +1088,7 @@ private function formatTypeOf($value, ?string $type): string
10881088 }
10891089 }
10901090
1091- return (\is_object ($ value ) ? get_class ($ value ) : gettype ($ value )).$ suffix ;
1091+ return (\is_object ($ value ) ? \ get_class ($ value ) : \ gettype ($ value )).$ suffix ;
10921092 }
10931093
10941094 /**
@@ -1103,7 +1103,7 @@ private function formatTypeOf($value, ?string $type): string
11031103 private function formatValue ($ value ): string
11041104 {
11051105 if (\is_object ($ value )) {
1106- return get_class ($ value );
1106+ return \ get_class ($ value );
11071107 }
11081108
11091109 if (\is_array ($ value )) {
@@ -1152,7 +1152,7 @@ private function formatValues(array $values): string
11521152
11531153 private static function isValueValidType (string $ type , $ value ): bool
11541154 {
1155- return (function_exists ($ isFunction = 'is_ ' .$ type ) && $ isFunction ($ value )) || $ value instanceof $ type ;
1155+ return (\ function_exists ($ isFunction = 'is_ ' .$ type ) && $ isFunction ($ value )) || $ value instanceof $ type ;
11561156 }
11571157
11581158 private function getInvalidValues (array $ arrayValues , string $ type ): array
0 commit comments