Advertisement
Guest User

Untitled

a guest
Apr 24th, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. <?php
  2.  
  3. // interface BasicContract
  4. interface BasicContract
  5. {
  6. public function save(): bool;
  7. }
  8.  
  9. // class Basic
  10. final class Basic implements BasicContract
  11. {
  12. final public function save(): bool
  13. {
  14. return true;
  15. }
  16. }
  17.  
  18. // function resolve
  19. function resolve(BasicContract $basic)
  20. {
  21. return $basic->save();
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement