Working with PHP_Depend

This topic explains how to configure and work with the PHP_Depend plugin.

Prerequisites

How do I install the PHP Depend plugin?

For more details on PHP_Depend, click here.

Configuring PHP_Depend

This procedure describes how to configure PHP_Depend options and metrics.

 

 

Instructions on how to complete a procedure

To configure PHP_Depend:

  1. From the menu-bar, select Window | Preferences | PHP Tools | PHP Depend.

  1. Configure the PHP_Depend preferences as follows:

    • PHP Executable- Select a PHP Executable for running PHP_Depend.
    • PEAR Library- You may choose to use your own PEAR library or the internal library.

      Note:

      The internal library is always within the include path, missing packages are used from there.

  • Debug- If you wish to print PHP output to the console for the purpose of debugging, select the print PHP output to console checkbox.

  • Options- Select the check-boxes to analyze code without annotations and identify bad documentation.
  • Optimization- Select an optimization option (None, Best).
  • Filter- Enter PHP file extensions, or folder names, to be excluded from the code analysis.
  1. Click OK.
  2. From the menu-bar, select Window | Preferences | PHP Tools | PHP Depend | Metrics.

  1. Configure the metrics you wish PHP_Depend to measure, by selecting and unselecting the check-boxes in the list. Click New to a metric of your own.
  2. Click OK.

 

Analyzing Code with PHP_Depend

This procedure describes how to measure metrics for a specific file or folder using PHP_Depend.

 

 

Instructions on how to complete a procedure

To measure metrics using PHP_Depend:

  1. From the menu-bar, select Window | Show View | PHP Tools | PHP Depend.
    The PHP Depend view is displayed. This view is used to display the measured metrics.
  2. In the PHP Explorer, right-click the file or folder you wish to measure metrics for, and select PHP Tools | PHP Depend.
    -OR-
    In the tool-bar, click the Run PHP Depend icon .
    PHP Depend will parse the source code and measure the configured metrics. The results are displayed in the PHP Depend view.