While I was digging through how a certain framework was implementing some code, I came across a class that had a class property called $input
. There was a method that what returning a function from a class parent class and it looks something like this: return parent::run($this->input = $input, $this->output);
My personal opinion is, I think it is a cool way of setting it for sure, but I truly would prefer to see the code written with $this->input = $input;
being set on a different line above, then returning that function and just passing one of them back in. The reason why I prefer that over the way they did it is that I feel like it reads better. What do you guys think?
submitted by /u/beeboobop91
[link] [comments]