Closed robhenley closed 6 years ago
That is just for readability. You could have it on the property too but I feel that using a constant is more readable. Any of them would work.
const DEFAULT_TIMEOUT = 30;
private $timeout = self::DEFAULT_TIMEOUT;
vs
private $timeout = 30;
Thanks for explaining. I didn't see constants used elsewhere so was curious why. Updates have been made.
@cristiangrama Thanks for reviewing. Why create a class constant and then assign it the class property
timeout
instead of just setting a default value to thetimeout
class property?