This repository has been archived by the owner on Jan 29, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 195
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Provides more robust is_callable logic
Provides a new method, `IsCallableInteropMiddlewareTrait::isCallable()`, which runs its argument through `is_callable()`. If the value passes, it then checks to see if it is an array, and, if so, if: - the first argument is an object or valid class name, AND - the second argument is a valid method of the first argument. This is done because `is_callable()` returns a false positive when a two-element array is passed where the first argument is an object and the second a string; the function does not verify that the second element is a valid method of the first.
- Loading branch information
1 parent
b404854
commit 63fe808
Showing
3 changed files
with
55 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters