Skip to content

Commit

Permalink
Merge pull request #29 from yoeunes/callable
Browse files Browse the repository at this point in the history
use is_callable instead of method_exists
  • Loading branch information
rdohms authored Apr 5, 2017
2 parents 2b846ad + 3744d03 commit 22ce6b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/DMS/Bundle/FilterBundle/Filter/ContainerFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function apply(Rule $rule, $value)

$service = $this->container->get($rule->service);

if (! method_exists($service, $rule->method)) {
if (! is_callable([$service, $rule->method])) {
throw new \Exception("Unable to find the method '{$rule->method}' in service '{$rule->service}'.");
}

Expand Down

0 comments on commit 22ce6b2

Please sign in to comment.