- 
  Notifications
 
You must be signed in to change notification settings  - Fork 545
 
Add stringable-object pseudo type #1905
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
ff9a025
 64685be
 40777bd
 d407bc2
 649313f
 File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
 
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | 
|---|---|---|
| 
 
 
 
  | 
 @@ -11,3 +11,14 @@ function foo($object) | |
| { | ||
| assertType('Stringable', $object); | ||
  
  | 
||
| } | ||
| 
  | 
||
| /** | ||
| * @param object $object | ||
| */ | ||
| function bar($object) | ||
| { | ||
| assertType('object', $object); | ||
| if (method_exists($object, '__toString')) { | ||
| assertType('Stringable', $object); | ||
| } | ||
| } | ||