ActiveCampaign / activecampaign-api-php

MIT License
115 stars 76 forks source link

Add the ability to set a optional timeout #78

Closed robhenley closed 6 years ago

robhenley commented 6 years ago

@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 the timeout class property?

cristiangrama commented 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;
robhenley commented 6 years ago

Thanks for explaining. I didn't see constants used elsewhere so was curious why. Updates have been made.