Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 380e2ba

Browse files
committed
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
2 parents b362c96 + 7b12fe9 commit 380e2ba

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

src/Symfony/Bridge/Twig/Command/DebugCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ private function getMetadata($type, $entity)
150150
return;
151151
}
152152
$refl = new \ReflectionMethod($cb[0], $cb[1]);
153-
} elseif (is_object($cb) && is_callable($cb)) {
153+
} elseif (is_object($cb) && method_exists($cb, '__invoke')) {
154154
$refl = new \ReflectionMethod($cb, '__invoke');
155155
} elseif (function_exists($cb)) {
156156
$refl = new \ReflectionFunction($cb);

src/Symfony/Bundle/FrameworkBundle/Resources/config/debug_prod.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<service id="debug.debug_handlers_listener" class="%debug.debug_handlers_listener.class%">
1515
<tag name="kernel.event_subscriber" />
1616
<tag name="monolog.logger" channel="php" />
17-
<argument /><!-- Exception handler -->
17+
<argument>null</argument><!-- Exception handler -->
1818
<argument type="service" id="logger" on-invalid="null" />
1919
<argument>null</argument><!-- Log levels map for enabled error levels -->
2020
<argument>null</argument>

src/Symfony/Component/Console/Question/Question.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ public function getMaxAttempts()
217217
*
218218
* The normalizer can be a callable (a string), a closure or a class implementing __invoke.
219219
*
220-
* @param string|\Closure $normalizer
220+
* @param callable $normalizer
221221
*
222222
* @return Question The current instance
223223
*/
@@ -233,7 +233,7 @@ public function setNormalizer($normalizer)
233233
*
234234
* The normalizer can ba a callable (a string), a closure or a class implementing __invoke.
235235
*
236-
* @return string|\Closure
236+
* @return callable
237237
*/
238238
public function getNormalizer()
239239
{

src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ public function setCircularReferenceHandler($circularReferenceHandler)
105105
/**
106106
* Set normalization callbacks.
107107
*
108-
* @param array $callbacks help normalize the result
108+
* @param callable[] $callbacks help normalize the result
109109
*
110110
* @return self
111111
*

0 commit comments

Comments
 (0)