Skip to content

Commit d09e6b1

Browse files
authored
Replace "is_callable" check with Closure type check
1 parent ad3b3e6 commit d09e6b1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ResponseFactory.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function version($version)
4343

4444
public function getVersion()
4545
{
46-
return is_callable($this->version) ? App::call($this->version) : $this->version;
46+
return $this->version instanceof Closure ? App::call($this->version) : $this->version;
4747
}
4848

4949
public function render($component, $props = [])
@@ -55,7 +55,7 @@ public function render($component, $props = [])
5555
}
5656

5757
array_walk_recursive($props, function (&$prop) {
58-
if (is_callable($prop)) {
58+
if ($prop instanceof Closure) {
5959
$prop = App::call($prop);
6060
}
6161
});

0 commit comments

Comments
 (0)