src/SentinelCommand/CommandConfiguration.php
public function getConfigTreeBuilder()
    {
        $builder = new TreeBuilder();
        
        $root = $builder->root('daemon-monitor');
        {
            $commands = $root->children()->arrayNode('commands');
            {
                /** @var ArrayNodeDefinition $command */
                $command = $commands->prototype('array');
                {
                    $normalizer = function ($value) {
                        return $this->replaceParameterInValue($value);
                    };
                    
                    $command->children()->scalarNode('name')->isRequired();
                    $command->children()->variableNode('args')->defaultValue([])->beforeNormalization()->always(
                        function ($array) {
                            if (!is_array($array)) {
                                throw new InvalidConfigurationException("args is not an array!");
                            }
                            foreach ($array as &$value) {
                                $value = $this->replaceParameterInValue($value);
                            }
                            
                            return $array;
                        }
                    );
                    $command->children()->scalarNode('parallel')->defaultValue(1)->beforeNormalization()->always(
                        $normalizer
                    );
                    $command->children()->booleanNode('once')->defaultValue(false)->beforeNormalization()->always(
                        $normalizer
                    );
                    $command->children()->booleanNode('alert')->defaultValue(true)->beforeNormalization()->always(
                        $normalizer
                    );
                    $command->children()->integerNode('interval')->defaultValue(0)->beforeNormalization()->always(
                        $normalizer
                    );
                    $command->children()->integerNode('frequency')->defaultValue(0)->beforeNormalization()->always(
                        $normalizer
                    );
                    $command->children()
                            ->booleanNode('frequency_fixed')
                            ->defaultValue(false)
                            ->beforeNormalization()
                            ->always($normalizer);
                }
            }
        }
        
        return $builder;
    }
public function getConfigTreeBuilder()
    {
        $builder = new TreeBuilder();
        
        $root = $builder->root('daemon-monitor');
        {
            $commands = $root->children()->arrayNode('commands');
            {
                /** @var ArrayNodeDefinition $command */
                $command = $commands->prototype('array');
                {
                    $normalizer = function ($value) {
                        return $this->replaceParameterInValue($value);
                    };
                    
                    $command->children()->scalarNode('name')->isRequired();
                    $command->children()->variableNode('args')->defaultValue([])->beforeNormalization()->always(
                        function ($array) {
                            if (!is_array($array)) {
                                throw new InvalidConfigurationException("args is not an array!");
                            }
                            foreach ($array as &$value) {
                                $value = $this->replaceParameterInValue($value);
                            }
                            
                            return $array;
                        }
                    );
                    $command->children()->scalarNode('parallel')->defaultValue(1)->beforeNormalization()->always(
                        $normalizer
                    );
                    $command->children()->booleanNode('once')->defaultValue(false)->beforeNormalization()->always(
                        $normalizer
                    );
                    $command->children()->booleanNode('alert')->defaultValue(true)->beforeNormalization()->always(
                        $normalizer
                    );
                    $command->children()->integerNode('interval')->defaultValue(0)->beforeNormalization()->always(
                        $normalizer
                    );
                    $command->children()->integerNode('frequency')->defaultValue(0)->beforeNormalization()->always(
                        $normalizer
                    );
                    $command->children()
                            ->booleanNode('frequency_fixed')
                            ->defaultValue(false)
                            ->beforeNormalization()
                            ->always($normalizer);
                }
            }
        }
        
        return $builder;
    }
Generates the configuration tree builder.

@return \Symfony\Component\Config\Definition\Builder\TreeBuilder The tree builder