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:
commit
380e2ba103
@ -150,7 +150,7 @@ EOF
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$refl = new \ReflectionMethod($cb[0], $cb[1]);
|
$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');
|
$refl = new \ReflectionMethod($cb, '__invoke');
|
||||||
} elseif (function_exists($cb)) {
|
} elseif (function_exists($cb)) {
|
||||||
$refl = new \ReflectionFunction($cb);
|
$refl = new \ReflectionFunction($cb);
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
<service id="debug.debug_handlers_listener" class="%debug.debug_handlers_listener.class%">
|
<service id="debug.debug_handlers_listener" class="%debug.debug_handlers_listener.class%">
|
||||||
<tag name="kernel.event_subscriber" />
|
<tag name="kernel.event_subscriber" />
|
||||||
<tag name="monolog.logger" channel="php" />
|
<tag name="monolog.logger" channel="php" />
|
||||||
<argument /><!-- Exception handler -->
|
<argument>null</argument><!-- Exception handler -->
|
||||||
<argument type="service" id="logger" on-invalid="null" />
|
<argument type="service" id="logger" on-invalid="null" />
|
||||||
<argument>null</argument><!-- Log levels map for enabled error levels -->
|
<argument>null</argument><!-- Log levels map for enabled error levels -->
|
||||||
<argument>null</argument>
|
<argument>null</argument>
|
||||||
|
@ -217,7 +217,7 @@ class Question
|
|||||||
*
|
*
|
||||||
* The normalizer can be a callable (a string), a closure or a class implementing __invoke.
|
* 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
|
* @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.
|
* The normalizer can ba a callable (a string), a closure or a class implementing __invoke.
|
||||||
*
|
*
|
||||||
* @return string|\Closure
|
* @return callable
|
||||||
*/
|
*/
|
||||||
public function getNormalizer()
|
public function getNormalizer()
|
||||||
{
|
{
|
||||||
|
@ -105,7 +105,7 @@ abstract class AbstractNormalizer extends SerializerAwareNormalizer implements N
|
|||||||
/**
|
/**
|
||||||
* Set normalization callbacks.
|
* Set normalization callbacks.
|
||||||
*
|
*
|
||||||
* @param array $callbacks help normalize the result
|
* @param callable[] $callbacks help normalize the result
|
||||||
*
|
*
|
||||||
* @return self
|
* @return self
|
||||||
*
|
*
|
||||||
|
Reference in New Issue
Block a user