<?php


namespace Symfony\Component\Config\Tests\Fixtures\Configuration;

use Symfony\Component\Config\Definition\NodeInterface;
use Symfony\Component\Config\Definition\Builder\NodeDefinition;

class CustomNodeDefinition extends NodeDefinition
{
    protected function createNode(): NodeInterface
    {
        return new CustomNode();
    }
}

<?php


namespace Symfony\Component\Config\Tests\Fixtures\Configuration;

use Symfony\Component\Config\Definition\Builder\NodeDefinition;

class CustomNodeDefinition extends NodeDefinition
{
    protected function createNode()
    {
        return new CustomNode();
    }
}

--- 
+++ 
@@ -3,11 +3,12 @@
 
 namespace Symfony\Component\Config\Tests\Fixtures\Configuration;
 
+use Symfony\Component\Config\Definition\NodeInterface;
 use Symfony\Component\Config\Definition\Builder\NodeDefinition;
 
 class CustomNodeDefinition extends NodeDefinition
 {
-    protected function createNode()
+    protected function createNode(): NodeInterface
     {
         return new CustomNode();
     }
Add missing return types to tests/internal/final methods

