@@ -62,7 +62,7 @@ public function build(ContainerBuilder $container)
6262 *
6363 * @throws \LogicException
6464 */
65- public function getContainerExtension ()
65+ public function getContainerExtension (): ? ExtensionInterface
6666 {
6767 if (null === $ this ->extension ) {
6868 $ extension = $ this ->createContainerExtension ();
@@ -92,7 +92,7 @@ public function getContainerExtension()
9292 /**
9393 * {@inheritdoc}
9494 */
95- public function getNamespace ()
95+ public function getNamespace (): string
9696 {
9797 if (null === $ this ->namespace ) {
9898 $ this ->parseClassName ();
@@ -104,7 +104,7 @@ public function getNamespace()
104104 /**
105105 * {@inheritdoc}
106106 */
107- public function getPath ()
107+ public function getPath (): string
108108 {
109109 if (null === $ this ->path ) {
110110 $ reflected = new \ReflectionObject ($ this );
@@ -132,10 +132,8 @@ public function registerCommands(Application $application)
132132
133133 /**
134134 * Returns the bundle's container extension class.
135- *
136- * @return string
137135 */
138- protected function getContainerExtensionClass ()
136+ protected function getContainerExtensionClass (): string
139137 {
140138 $ basename = preg_replace ('/Bundle$/ ' , '' , $ this ->getName ());
141139
@@ -144,10 +142,8 @@ protected function getContainerExtensionClass()
144142
145143 /**
146144 * Creates the bundle's container extension.
147- *
148- * @return ExtensionInterface|null
149145 */
150- protected function createContainerExtension ()
146+ protected function createContainerExtension (): ? ExtensionInterface
151147 {
152148 return class_exists ($ class = $ this ->getContainerExtensionClass ()) ? new $ class () : null ;
153149 }
0 commit comments