Answer the question
In order to leave comments, you need to log in
Combine logger and comments. What do you think about this?
Hello!
In order to improve the readability of the code, I often invent all sorts of bicycles. In my practice (and from smart books) I developed a style of writing self-documenting code. Now I want to add not only the readability of the code separately, but also add the readability of the business logic. To do this, I would like to cross comments and logging. Something like that:
...
public function executeSomeBusinessProcess() {
$this->logger('Start executing some business process');
$this->logger('Create something in database');
$someData = $this->_buildSomeData();
$this->someRepository->add($someData);
$this->logger('Send some events');
$this->events->sendSomeEvents($someData);
$this->logger('End of some business process');
}
...
Answer the question
In order to leave comments, you need to log in
Why reinvent the wheel? If it's java, then https://www.tutorialspoint.com/java/java_documenta... , for php there are some stray things, for other languages there are their own.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question