@@ -183,7 +183,7 @@ The ``Configuration`` class to handle the sample configuration looks like::
183183
184184 class Configuration implements ConfigurationInterface
185185 {
186- public function getConfigTreeBuilder()
186+ public function getConfigTreeBuilder(): TreeBuilder
187187 {
188188 $treeBuilder = new TreeBuilder('acme_social');
189189
@@ -217,7 +217,7 @@ force validation (e.g. if an additional option was passed, an exception will be
217217thrown)::
218218
219219 // src/Acme/SocialBundle/DependencyInjection/AcmeSocialExtension.php
220- public function load(array $configs, ContainerBuilder $container)
220+ public function load(array $configs, ContainerBuilder $container): void
221221 {
222222 $configuration = new Configuration();
223223
@@ -259,7 +259,7 @@ In your extension, you can load this and dynamically set its arguments::
259259 use Symfony\Component\Config\FileLocator;
260260 use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
261261
262- public function load(array $configs, ContainerBuilder $container)
262+ public function load(array $configs, ContainerBuilder $container): void
263263 {
264264 $loader = new XmlFileLoader($container, new FileLocator(dirname(__DIR__).'/Resources/config'));
265265 $loader->load('services.xml');
@@ -288,7 +288,7 @@ In your extension, you can load this and dynamically set its arguments::
288288 class AcmeHelloExtension extends ConfigurableExtension
289289 {
290290 // note that this method is called loadInternal and not load
291- protected function loadInternal(array $mergedConfig, ContainerBuilder $container)
291+ protected function loadInternal(array $mergedConfig, ContainerBuilder $container): void
292292 {
293293 // ...
294294 }
@@ -304,7 +304,7 @@ In your extension, you can load this and dynamically set its arguments::
304304 (e.g. by overriding configurations and using :phpfunction: `isset ` to check
305305 for the existence of a value). Be aware that it'll be very hard to support XML::
306306
307- public function load(array $configs, ContainerBuilder $container)
307+ public function load(array $configs, ContainerBuilder $container): void
308308 {
309309 $config = [];
310310 // let resources override the previous set value
@@ -458,7 +458,7 @@ the extension. You might want to change this to a more professional URL::
458458 {
459459 // ...
460460
461- public function getNamespace()
461+ public function getNamespace(): string
462462 {
463463 return 'http://acme_company.com/schema/dic/hello';
464464 }
@@ -490,7 +490,7 @@ can place it anywhere you like. You should return this path as the base path::
490490 {
491491 // ...
492492
493- public function getXsdValidationBasePath()
493+ public function getXsdValidationBasePath(): string
494494 {
495495 return __DIR__.'/../Resources/config/schema';
496496 }
0 commit comments