Generate Documentations For PHP Projects Through Sami
read more

Generate Documentations For PHP Projects Through Sami

Developers regularly create large blocks of code that form parts of API’s and other mid to large level projects. While there is a (more or less) agreed upon convention for code writing, every developer has a personal comment and documentation writing standards. Some add small cryptic notes while others attach full-length Google Docs that document the method or class in painful details. This problem becomes very severe when the number of end users increases and there is a need for proper documentation of the project.

Now I will start with an example of a  well formed code:

<?php namespace SearchElastic; use SearchElasticSearchAbstractSearchAbstract; /** * Class to perform basic search extends from SearchElasticSearchAbstractSearchAbstract */ class Search extends SearchAbstract { /** * Search in Elasticsearch. * * @param string $query * @return Result from elasticsearch */ public function search($query) { $this->validate($query); $client = $this->client->getClient(); $result = array(); // Change the match column name with the column name you want to search in