protected function configureEnvironmentProperty(OptionsResolver $resolver)
    {
        $resolver
            ->setDefined('environment')
            ->setAllowedTypes('environment', ['array', 'string'])
            ->setNormalizer('environment', function (Options $options, $value) {
                if (is_array($value)) {
                    $normalized = [];

                    foreach ($value as $key => $val) {
                        is_string($key) and $normalized[] = sprintf('%s="%s"', strtoupper($key), $val);
                    }

                    $value = implode(',', $normalized);
                }

                return $value;
            });
    }
protected function configureEnvironmentProperty(OptionsResolver $resolver)
    {
        $resolver
            ->setDefined('environment')
            ->setAllowedTypes('environment', ['array', 'string'])
            ->setNormalizer('environment', function (Options $options, $value) {
                if (is_array($value)) {
                    $normalized = [];

                    foreach ($value as $key => $val) {
                        is_string($key) and $normalized[] = sprintf('%s="%s"', strtoupper($key), $val);
                    }

                    $value = implode(',', $normalized);
                }

                return $value;
            });
    }
protected function configureEnvironmentProperty ( OptionsResolver $ resolver ) { $ resolver -> setDefined ( 'environment' ) -> setAllowedTypes ( 'environment' , [ 'array' , 'string' ] ) -> setNormalizer ( 'environment' , function ( Options $ options , $ value ) { if ( is_array ( $ value ) ) { $ normalized = [ ] ; foreach ( $ value as $ key => $ val ) { is_string ( $ key ) and $ normalized [ ] = sprintf ( '%s="%s"' , strtoupper ( $ key ) , $ val ) ; } $ value = implode ( ',' , $ normalized ) ; } return $ value ; } ) ; }
Configures an environment property for OptionsResolver.

@param OptionsResolver $resolver
Configures an environment property for OptionsResolver .