Advertisement
Guest User

Untitled

a guest
May 24th, 2019
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. <?php
  2. function Loose(?array $foo) : ?array
  3. {
  4. $localScoped = null;
  5. if ($foo !== null) {
  6. foreach ($foo as $bar) {
  7. $localScoped[] = $bar->stuff();
  8. }
  9. }
  10.  
  11. return $localScoped;
  12. }
  13.  
  14. function LooseCallee(?array $other) : ?array
  15. {
  16. $localScoped = null;
  17. if ($other !== null) {
  18. foreach ($other as $bar) {
  19. $localScoped[] = $bar->stuff();
  20. }
  21. }
  22.  
  23. return $localScoped;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement