Archived video

This video is archived and won't be updated. We're keeping it online for now as a courtesy.

Alternate resources: 

Be Awesome with Type-Hints in Symfony 3

Video loading...

Join Drupalize.Me to watch this video

Join today and gain instant access to our entire video library.

Log in Sign up
  • 0:08
    What type of object is this
  • 0:10
    $markdownParser argument?
  • 0:12
    Oh, you can't tell?
  • 0:14
    Well, neither can I.
  • 0:16
    With no type-hint this could be anything,
  • 0:19
    a MarkdownParser object, a string, an integer, an octopus.
  • 0:24
    We need to add a type-hint to make our code clear
  • 0:28
    and avoid weird errors in case we accidentally pass in something else,
  • 0:33
    like an octopus.
  • 0:36
    Run ./bin/console debug:container and search for markdown.

Be Awesome with Type-Hints in Symfony 3

Loading...

In this lesson you'll learn how use type-hinting to make your code more portable—and readable, too.

Downloads: 
Log in or sign up to download companion files.

Additional resources:
There are no resources for this video. If you believe there should be, please contact us.