<img alt="" src="https://secure.leadforensics.com/150446.png " style="display:none;">

phpDocumentor in Magento 2

Darshan Khatri Sep 18, 2018

Magento 2.0 For Developers phpDocumentor

What is phpDocumentor?

PHPDoc is open source documentation generator written in PHP language. It automatically parses PHP source code and generates readable API and documents, which enables us to provide insights of source code.

Installing on linux

1. System requirements

  • PHP 5.3.3
  • intl extension for PHP
  • Graphviz
Click here to download Graphviz

2. Using PHAR

  • You can download PHAR file by clicking here.
  • After the download, move it to /usr/local/bin and rename it to “phpdoc”.
  • Now use command “phpdoc --version”. You will be able to see the result.
    phpDocumentor version v2.9.0
After successfully installing, you can generate phpDoc for any of your projects.

In order to generate phpDoc, you need to run this command in the terminal:

phpdoc -d “path/to/your/project/folder” -t “path/to/phpdoc/output” --template="responsive-twig" --title="Ezest Sample Project"

There are different types of templates available in phpDoc.

  • check style
  • clean
  • responsive-twig
Below is the output of above command.

Click on “Errors” to see all the errors related to individual class files.

Hope this helps you to implement phpDoc in your project.

e-Zest is a leading digital innovation partner for enterprises and technology companies that utilizes emerging technologies for creating engaging customers experiences. Being a customer-focused and technology-driven company, it always helps clients in crafting holistic business value for their software development efforts. It offers software development and consulting services for cloud computing, enterprise mobility, big data and analytics, user experience and digital commerce.