Skip to content

Commit a010329

Browse files
mpajunennicolas-grekas
authored andcommitted
Replace is_callable checks with type hints
Also removes tests checking the exceptions thrown from the removed is_callable checks.
1 parent 3d0a2ec commit a010329

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

Normalizer/AbstractNormalizer.php

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -86,15 +86,9 @@ public function setCircularReferenceLimit($circularReferenceLimit)
8686
* @param callable $circularReferenceHandler
8787
*
8888
* @return self
89-
*
90-
* @throws InvalidArgumentException
9189
*/
92-
public function setCircularReferenceHandler($circularReferenceHandler)
90+
public function setCircularReferenceHandler(callable $circularReferenceHandler)
9391
{
94-
if (!is_callable($circularReferenceHandler)) {
95-
throw new InvalidArgumentException('The given circular reference handler is not callable.');
96-
}
97-
9892
$this->circularReferenceHandler = $circularReferenceHandler;
9993

10094
return $this;

0 commit comments

Comments
 (0)