From 7b12fe982b2aefef25410a0845db48d4aaaba390 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Mon, 5 Oct 2015 19:39:38 +0200 Subject: [PATCH] [2.7] Fix docblocks about callables --- src/Symfony/Bridge/Twig/Command/DebugCommand.php | 2 +- .../Bundle/FrameworkBundle/Resources/config/debug_prod.xml | 2 +- src/Symfony/Component/Console/Question/Question.php | 4 ++-- .../Component/Serializer/Normalizer/AbstractNormalizer.php | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Symfony/Bridge/Twig/Command/DebugCommand.php b/src/Symfony/Bridge/Twig/Command/DebugCommand.php index dea7c4834e..4bf52c5dd3 100644 --- a/src/Symfony/Bridge/Twig/Command/DebugCommand.php +++ b/src/Symfony/Bridge/Twig/Command/DebugCommand.php @@ -150,7 +150,7 @@ EOF return; } $refl = new \ReflectionMethod($cb[0], $cb[1]); - } elseif (is_object($cb) && is_callable($cb)) { + } elseif (is_object($cb) && method_exists($cb, '__invoke')) { $refl = new \ReflectionMethod($cb, '__invoke'); } elseif (function_exists($cb)) { $refl = new \ReflectionFunction($cb); diff --git a/src/Symfony/Bundle/FrameworkBundle/Resources/config/debug_prod.xml b/src/Symfony/Bundle/FrameworkBundle/Resources/config/debug_prod.xml index 9d70124fbe..36347eccb2 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Resources/config/debug_prod.xml +++ b/src/Symfony/Bundle/FrameworkBundle/Resources/config/debug_prod.xml @@ -14,7 +14,7 @@ - + null null null diff --git a/src/Symfony/Component/Console/Question/Question.php b/src/Symfony/Component/Console/Question/Question.php index 01702b208f..ffe9417117 100644 --- a/src/Symfony/Component/Console/Question/Question.php +++ b/src/Symfony/Component/Console/Question/Question.php @@ -217,7 +217,7 @@ class Question * * The normalizer can be a callable (a string), a closure or a class implementing __invoke. * - * @param string|\Closure $normalizer + * @param callable $normalizer * * @return Question The current instance */ @@ -233,7 +233,7 @@ class Question * * The normalizer can ba a callable (a string), a closure or a class implementing __invoke. * - * @return string|\Closure + * @return callable */ public function getNormalizer() { diff --git a/src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php b/src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php index 8cc85e5b61..55c60c0f95 100644 --- a/src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php +++ b/src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php @@ -105,7 +105,7 @@ abstract class AbstractNormalizer extends SerializerAwareNormalizer implements N /** * Set normalization callbacks. * - * @param array $callbacks help normalize the result + * @param callable[] $callbacks help normalize the result * * @return self *