PHP Tools

Install some PHP tools:

  1. PHP Coding Standards Fixer (http://cs.sensiolabs.org/)
    Installation: (Globally (Composer))

    Then make sure you have ~/.composer/vendor/bin in your PATH and you’re good to go:

    To find out the location of php-cs-fixer

    I can use the location for the netbeans plugins needed.
    Another reference: https://mattstauffer.co/blog/using-php-cs-fixer-to-fix-up-your-php-code
  2. PHP CodeSniffer
    Ref: http://purencool.com/install-and-test-phpcodesniffer-on-ubuntu
    http://askubuntu.com/questions/572956/adding-a-standard-to-php-codesniffer
    Installation:

    To find out the location

    To verify PHP_CodeSniffer is already installed, check like this:

    Ref: https://wisdmlabs.com/blog/how-to-format-php-code-to-wordpress-coding-standards-in-netbeans/
    To use it in netbeans, click: Source > Inspect…
  3. PHP Mess Detector & PDepend
    Ref: https://phpmd.org/download/index.html
    http://stackoverflow.com/questions/27958289/what-is-phpmd-and-how-to-use-it
    Installation: (Same way with php cs fixer to use composer globally)

    To find out the location for PHPMD and PDepend:



     
  4. PHP Copy/Paste Detector (PHPCPD)
    Ref: https://github.com/sebastianbergmann/phpcpd
    NOTE: DONT INSTALL FROM PEAR!
    Installation: (Use composer globally)

    To find out the location:

    Please read this: Installation of PHP Code Review Tools
    For integrating all the above tools in Netbeans!

Leave a Reply

Your email address will not be published. Required fields are marked *