kitetail / zttp

A developer-experience focused HTTP client, optimized for most common use cases.
MIT License
1.68k stars 120 forks source link

Move useless property definitions #65

Closed ntzm closed 6 years ago

adamwathan commented 6 years ago

Hey @ntzm! This actually was intentional (see our absurd style guide 😄)

The argument is that any type of initialization can be done in a constructor (like $this->beforeSendingCallbacks = collect()) but only simple scalar initialization can be done in property definitions, so instead of spreading out initialization to multiple locations, just do it all in the constructor where there aren't any limitations.