minor #16131 [2.7] Fix docblocks about callables (nicolas-grekas)

This PR was merged into the 2.7 branch.

Discussion
----------

[2.7] Fix docblocks about callables

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Commits
-------

7b12fe9 [2.7] Fix docblocks about callables
This commit is contained in:
Fabien Potencier 2015-10-06 17:07:22 +02:00
commit 380e2ba103
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
*