Skip to content

Commit

Permalink
Use asserts for type safe root config nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
core23 committed Dec 27, 2018
1 parent 6d75c49 commit de2f277
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/DependencyInjection/Configuration.php
Expand Up @@ -24,13 +24,13 @@ public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder('core23_matomo');

/* @var ArrayNodeDefinition $rootNode */
// Keep compatibility with symfony/config < 4.2
if (!\method_exists($treeBuilder, 'getRootNode')) {
$rootNode = $treeBuilder->root('core23_matomo');
} else {
$rootNode = $treeBuilder->getRootNode();
}
\assert($rootNode instanceof ArrayNodeDefinition);

$this->addHttpClientSection($rootNode);

Expand Down

0 comments on commit de2f277

Please sign in to comment.