mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2026-03-16 19:07:48 +00:00
Fix phpstan issues
This commit is contained in:
@@ -12,6 +12,7 @@ declare(strict_types=1);
|
||||
namespace Chill\MainBundle\DependencyInjection;
|
||||
|
||||
use Chill\MainBundle\DependencyInjection\Widget\AddWidgetConfigurationTrait;
|
||||
use Symfony\Component\Config\Definition\Builder\ParentNodeDefinitionInterface;
|
||||
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
|
||||
use Symfony\Component\Config\Definition\ConfigurationInterface;
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
@@ -31,11 +32,16 @@ class Configuration implements ConfigurationInterface
|
||||
$this->setWidgetFactories($widgetFactories);
|
||||
}
|
||||
|
||||
public function getConfigTreeBuilder()
|
||||
public function getConfigTreeBuilder(): TreeBuilder
|
||||
{
|
||||
$treeBuilder = new TreeBuilder('chill_main');
|
||||
$rootNode = $treeBuilder->getRootNode();
|
||||
|
||||
if ($rootNode instanceof ParentNodeDefinitionInterface) {
|
||||
throw new \LogicException('unexpected type');
|
||||
}
|
||||
|
||||
/* @phpstan-ignore-next-line */
|
||||
$rootNode
|
||||
->children()
|
||||
->scalarNode('installation_name')
|
||||
@@ -315,6 +321,7 @@ class Configuration implements ConfigurationInterface
|
||||
->end() // end of root
|
||||
;
|
||||
|
||||
/* @phpstan-ignore-next-line */
|
||||
$rootNode->children()
|
||||
->arrayNode('add_address')->addDefaultsIfNotSet()->children()
|
||||
->scalarNode('default_country')->cannotBeEmpty()->defaultValue('BE')->end()
|
||||
@@ -325,6 +332,7 @@ class Configuration implements ConfigurationInterface
|
||||
->end()
|
||||
->end();
|
||||
|
||||
/* @phpstan-ignore-next-line */
|
||||
$rootNode->children()
|
||||
->arrayNode('audit_trail')->addDefaultsIfNotSet()->children()
|
||||
->scalarNode('delete_after')->cannotBeEmpty()->defaultValue('P6M')->info('The duration (a valid interval) before deleting the audit trail. Will be run by a cronjob.')->end()
|
||||
|
||||
Reference in New Issue
Block a user