[2.7] Fix docblocks about callables

This commit is contained in:
Nicolas Grekas 2015-10-05 19:39:38 +02:00
parent d657834bd0
commit 7b12fe982b
4 changed files with 5 additions and 5 deletions

View File

@ -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);

View File

@ -14,7 +14,7 @@
<service id="debug.debug_handlers_listener" class="%debug.debug_handlers_listener.class%">
<tag name="kernel.event_subscriber" />
<tag name="monolog.logger" channel="php" />
<argument /><!-- Exception handler -->
<argument>null</argument><!-- Exception handler -->
<argument type="service" id="logger" on-invalid="null" />
<argument>null</argument><!-- Log levels map for enabled error levels -->
<argument>null</argument>

View File

@ -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()
{

View File

@ -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
*