Answer the question
In order to leave comments, you need to log in
What is the best way to organize methods?
Which of the following entries would be more convenient for you to use and why?
$request->get();
$request->get('id');
$request->get('id', 0);
$request->getAll();
$request->getRequired('id');
$request->get('id', 0);
Answer the question
In order to leave comments, you need to log in
Read about programming styles. Read about variable and method naming conventions. Read what it's for.
It doesn't matter how long the code in the backend is, as long as it's easier to read. a couple of bytes back and forth, but if you postpone the project for a month and then you have to pick it up, you won’t remember what kind of get it is and what kind of get it is.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question