Back to the Learning!

Laracasts is packed full with over 1,000 lessons just like this one.

Sign up to get full access or log in to your account and sit back.

Published On Nov. 18th 2014

Simple Rules for Simpler Code: Limit Your Instance Variables

Episode 4 Run Time 10:00

Download

As we work in PHP, we'll need to tweak this next guideline a bit. Jeff Bay, the creator of these exercises, recommends that, at most, your classes should contain two instance variables. Let's talk about that a bit!