From 39c4cc387d899c534675b875acd85eda13dfd4c1 Mon Sep 17 00:00:00 2001 From: Jakub Kulhan Date: Sun, 24 Aug 2014 23:36:12 +0200 Subject: [PATCH] [DependencyInjection] fix @return anno created by PhpDumper --- .../DependencyInjection/Dumper/PhpDumper.php | 2 +- .../Tests/Fixtures/php/services10.php | 2 +- .../Tests/Fixtures/php/services11.php | 2 +- .../Tests/Fixtures/php/services9.php | 16 ++++++++-------- .../Tests/Fixtures/php/services9_compiled.php | 18 +++++++++--------- 5 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php b/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php index ddcfe2a8f848..7e18a52022db 100644 --- a/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php +++ b/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php @@ -508,7 +508,7 @@ private function addService($id, $definition) if ($definition->isSynthetic()) { $return[] = '@throws RuntimeException always since this service is expected to be injected dynamically'; } elseif ($class = $definition->getClass()) { - $return[] = sprintf("@return %s A %s instance.", 0 === strpos($class, '%') ? 'object' : $class, $class); + $return[] = sprintf("@return %s A %s instance.", 0 === strpos($class, '%') ? 'object' : "\\".$class, $class); } elseif ($definition->getFactoryClass()) { $return[] = sprintf('@return object An instance returned by %s::%s().', $definition->getFactoryClass(), $definition->getFactoryMethod()); } elseif ($definition->getFactoryService()) { diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services10.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services10.php index ca9695adca9f..37927a6e7021 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services10.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services10.php @@ -44,7 +44,7 @@ public function __construct() * This service is shared. * This method always returns the same instance of the service. * - * @return stdClass A stdClass instance. + * @return \stdClass A stdClass instance. */ protected function getTestService() { diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services11.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services11.php index 58697423f696..0dcd83845a58 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services11.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services11.php @@ -42,7 +42,7 @@ public function __construct() * This service is shared. * This method always returns the same instance of the service. * - * @return stdClass A stdClass instance. + * @return \stdClass A stdClass instance. */ protected function getFooService() { diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9.php index 8bbea0e01219..a4b42d78adc8 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9.php @@ -47,7 +47,7 @@ public function __construct() * This service is shared. * This method always returns the same instance of the service. * - * @return FooClass A FooClass instance. + * @return \FooClass A FooClass instance. */ protected function getBarService() { @@ -64,7 +64,7 @@ protected function getBarService() * This service is shared. * This method always returns the same instance of the service. * - * @return Baz A Baz instance. + * @return \Baz A Baz instance. */ protected function getBazService() { @@ -81,7 +81,7 @@ protected function getBazService() * This service is shared. * This method always returns the same instance of the service. * - * @return stdClass A stdClass instance. + * @return \stdClass A stdClass instance. */ protected function getDependsOnRequestService() { @@ -98,7 +98,7 @@ protected function getDependsOnRequestService() * This service is shared. * This method always returns the same instance of the service. * - * @return Bar A Bar instance. + * @return \Bar A Bar instance. */ protected function getFactoryServiceService() { @@ -111,7 +111,7 @@ protected function getFactoryServiceService() * This service is shared. * This method always returns the same instance of the service. * - * @return FooClass A FooClass instance. + * @return \FooClass A FooClass instance. */ protected function getFooService() { @@ -164,7 +164,7 @@ protected function getFooBarService() * This service is shared. * This method always returns the same instance of the service. * - * @return Foo A Foo instance. + * @return \Foo A Foo instance. */ protected function getFooWithInlineService() { @@ -181,7 +181,7 @@ protected function getFooWithInlineService() * This service is shared. * This method always returns the same instance of the service. * - * @return FooClass A FooClass instance. + * @return \FooClass A FooClass instance. */ protected function getMethodCall1Service() { @@ -234,7 +234,7 @@ protected function synchronizeRequestService() * If you want to be able to request this service from the container directly, * make it public, otherwise you might end up with broken code. * - * @return Bar A Bar instance. + * @return \Bar A Bar instance. */ protected function getInlinedService() { diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9_compiled.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9_compiled.php index 629499a60824..b881b5e3004a 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9_compiled.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9_compiled.php @@ -55,7 +55,7 @@ public function __construct() * This service is shared. * This method always returns the same instance of the service. * - * @return FooClass A FooClass instance. + * @return \FooClass A FooClass instance. */ protected function getBarService() { @@ -72,7 +72,7 @@ protected function getBarService() * This service is shared. * This method always returns the same instance of the service. * - * @return Baz A Baz instance. + * @return \Baz A Baz instance. */ protected function getBazService() { @@ -89,7 +89,7 @@ protected function getBazService() * This service is shared. * This method always returns the same instance of the service. * - * @return stdClass A stdClass instance. + * @return \stdClass A stdClass instance. */ protected function getDependsOnRequestService() { @@ -106,7 +106,7 @@ protected function getDependsOnRequestService() * This service is shared. * This method always returns the same instance of the service. * - * @return Bar A Bar instance. + * @return \Bar A Bar instance. */ protected function getFactoryServiceService() { @@ -119,7 +119,7 @@ protected function getFactoryServiceService() * This service is shared. * This method always returns the same instance of the service. * - * @return FooClass A FooClass instance. + * @return \FooClass A FooClass instance. */ protected function getFooService() { @@ -143,7 +143,7 @@ protected function getFooService() * This service is shared. * This method always returns the same instance of the service. * - * @return BazClass A BazClass instance. + * @return \BazClass A BazClass instance. */ protected function getFoo_BazService() { @@ -157,7 +157,7 @@ protected function getFoo_BazService() /** * Gets the 'foo_bar' service. * - * @return FooClass A FooClass instance. + * @return \FooClass A FooClass instance. */ protected function getFooBarService() { @@ -170,7 +170,7 @@ protected function getFooBarService() * This service is shared. * This method always returns the same instance of the service. * - * @return Foo A Foo instance. + * @return \Foo A Foo instance. */ protected function getFooWithInlineService() { @@ -192,7 +192,7 @@ protected function getFooWithInlineService() * This service is shared. * This method always returns the same instance of the service. * - * @return FooClass A FooClass instance. + * @return \FooClass A FooClass instance. */ protected function getMethodCall1Service() {