Before I wrote Laravel, I used several other PHP frameworks. While using them, I came across a variety of methods that accepted boolean arguments to change their behavior. For example, perhaps a method accepts a boolean argument to determine if a given task runs in the background. Or, maybe it even accepts three or four boolean arguments to change various aspects of the method's behavior. The method call ends up looking something like this:
$this->perform_task($job, true, false, false);
I still see code written like this today. However, it should be avoided. When I wrote Laravel, I made an internal promise to myself that I would attempt to never force a user to pass a boolean argument for any method throughout the entire framework.
The problem with defining your method signatures in this way is that the behavior that the booleans modify is impossible to discern from the consumer's point of view. You must always refer to the component's internal code or documentation to dete