I’m curious as to what the best practice for passing multiple parameters to a method is. Specifically, I’m wondering wether or not calling methods with comments and parameters on new lines would be considered bad practice or not.
// get json from database
$json = $this->mysql->get_json_from_entries($this->table, // data table
$foo, // column
$bar, // column value
$this->limit); // maximum rows to retrieve
as opposed to
// get json from database
$json = $this->mysql->get_json_from_entries($this->table, $foo, $bar, $this->limit);
Its a matter of taste but normally from what I have seen its all on one line and then you use your DOC blocks like so: