Improving QA on PHP
projects
Michelangelo van Dam
ZendCon2010, Santa Clara, CA (USA)
Michelangelo van Dam
• Independent Consultant
• Zend Certified Engineer (ZCE)
• President of PHPBenelux
What’s the benefit of QA?
• early detection of issues
• cleaner & consistent code
• knowledge about the codebase
• increase of confidence
Sebastian Bergmann
• QA expert
• wrote the tools
• speaker and inspirer
Usual Suspects
PHP_CodeSniffer
Example Code
• Zend Framework QuickStart app
- http://framework.zend.com/manual/en/learning.quickstart.intro.html
<VirtualHost *:80>
DocumentRoot /srv/www/quickstart/public
ServerName quickstart.local
ServerAdmin root@localhost
<Directory /srv/www/quickstart/public>
Options Indexes FollowSymlinks
AllowOverride All
Order allow,deny
Allow from all
DirectoryIndex index.php
</Directory>
Alias /reports /srv/www/quickstart/reports
<Directory /srv/www/quickstart/reports>
Options Indexes FollowSymlinks
AllowOverride All
Order allow,deny
Allow from all
DirectoryIndex index.php index.html
</Directory>
</VirtualHost>
VirtualHost Settings
Showtime
Syntax Checking
• PHPLint
- comes with PHP binary
- validates code for syntax errors
• Website
- http://www.icosaedro.it/phplint/
Demo PHPLint
Code Documentation
• PHPDocumentator
- creates automated API documentation
- based on inline code blocks
• Installation
- pear install PhpDocumentor
• Website
- http://www.phpdoc.org
Demo PHPDoc
Output PHPDoc
Coding Standards
• PHP_CodeSniffer
- sniffs for coding standard violations
- ensures code is clean and consistent
- using standard and custom coding standards
• Installation
- pear install PHP_CodeSniffer
• Website
- http://pear.php.net/package/PHP_CodeSniffer
Demo PHP_CodeSniffer
PHPCPD
• PHP Copy/Paste Detector
- detects code duplication
• Installation
- pear channel-discover pear.phpunit.de
- pear channel-discover components.ez.no
- pear install --alldeps phpunit/phpcpd
• Website
- http://github.com/sebastianbergmann/phpcpd
Demo PHPCPD
Output
Mess Detection
• PDepend & PHPMD
- detects code mess
• Installation
- pear channel-discover pear.pdepend.org
- pear install pdepend/PHP_Depend
- pear channel-discover pear.phpmd.org
- pear install phpmd/PHP_PMD
• Websites
- http://www.pdepend.org
- http://www.phpmd.org
Demo detecting mess
Output codesize
Output unused code
Unit Testing
• PHPUnit
- tests code on unit level
- includes database tests
- integrates well with many PHP frameworks
• Installation
- pear channel-discover pear.phpunit.de
- pear install phpunit/PHPUnit
• Website
- http://www.phpunit.de
See other presentation
http://slideshare.net/DragonBe/unit-testing-after-zf-18
Packaging
• Phar
- PHP Archive (equivalent of Java jar)
- compresses and collects like
- included in PHP build (as of PHP 5.3.0)
• Installation (before PHP 5.3.0)
- pecl install phar
• Website:
- http://php.net/phar
Code example
<?php
include_once ‘phar://MyApp.phar/path/to/Class.php’;
$application = new Class;
$application->run();
Usage
• libraries
• modules
• images
• plugins
• deployment
Automated builds
• Phing
- automated build tool
- like Apache Ant
- integrates well with other PHP tools
• Installation
- pear channel-discover pear.phing.info
- pear install phing/phing
• Website
- http://phing.info
build.xml
<?xml version="1.0"?>
<project name="zfqs" description="Zend Framework QuickStart" default="build" >
<target name="version">
<version releasetype="Bugfix" file="build.version" property="version.number"/>
</target>
<target name="phplint">
<mkdir dir="./reports/phplint" />
<phplint file="./application/models" haltonfailure="false" tofile="./reports/phplint/errors.txt"/>
</target>
<target name="pdepend">
<mkdir dir="./reports/pdepend" />
<copy file="./build_pdepend.html" tofile="./reports/pdepend/index.html" overwrite="true" />
<exec command="/usr/bin/pdepend
--summary-xml=./reports/pdepend/summary.xml
--jdepend-chart=./reports/pdepend/jdepend.svg
--overview-pyramid=./reports/pdepend/pyramid.svg
./application/models"
dir="./" />
</target>
<target name="phpmd">
<mkdir dir="./reports/phpmd" />
<exec command="/usr/bin/phpmd ./application/models html codesize --reportfile ./reports/phpmd/codesize.html" dir="./" />
<exec command="/usr/bin/phpmd ./application/models html unusedcode --reportfile ./reports/phpmd/unusedcode.html" dir="./" />
</target>
<target name="phpcs">
<mkdir dir="./reports/phpcs" />
<exec command="/usr/bin/phpcs -n --standard=Zend --report=summary ./application/models > ./reports/phpcs/summary.txt" dir="./" />
<exec command="/usr/bin/phpcs -n --standard=Zend --report=source ./application/models > ./reports/phpcs/source.txt" dir="./" />
<exec command="/usr/bin/phpcs -n --standard=Zend --report=checkstyle ./application/models > ./reports/phpcs/checkstyle.xml" dir="./" />
</target>
<target name="phpcpd">
<mkdir dir="./reports/phpcpd" />
<exec command="/usr/bin/phpcpd --log-pmd ./reports/phpcpd/pmd-cpd.xml ./application/models" dir="./" />
</target>
<target name="phpdoc">
<mkdir dir="./reports/phpdoc" />
<exec command="phpdoc -d ./application/models -q -t ./reports/phpdoc -o HTML:frames:earthli" dir="./" />
</target>
<target name="build" depends="version,phplint,pdepend,phpmd,phpcs,phpcpd,phpdoc">
<echo msg="Finishing build process ${version.number}" />
</target>
</project>
project definition
<?xml version="1.0"?>
<project name="zfqs" description="Zend Framework QuickStart" default="build" >
…
</project>
target version
<target name="version">
<version releasetype="Bugfix"
file="build.version" property="version.number"/>
</target>
In file “build.version” we have the version number as the following sequence:
MAJOR.MINOR.BUGFIX (starting at 0.0.0)
target phplint
<target name="phplint">
<mkdir dir="./reports/phplint" />
<phplint file="./application/models"
haltonfailure="false" tofile="./reports/phplint/errors.txt"/>
</target>
target pdepend
<target name="pdepend">
<mkdir dir="./reports/pdepend" />
<copy file="./build_pdepend.html"
tofile="./reports/pdepend/index.html" overwrite="true" />
<exec command="/usr/bin/pdepend
--summary-xml=./reports/pdepend/summary.xml
--jdepend-chart=./reports/pdepend/jdepend.svg
--overview-pyramid=./reports/pdepend/pyramid.svg
./application/models"
dir="./" />
</target>
target phpmd
<target name="phpmd">
<mkdir dir="./reports/phpmd" />
<exec command="/usr/bin/phpmd ./application/models html codesize
--reportfile ./reports/phpmd/codesize.html" dir="./" />
<exec command="/usr/bin/phpmd ./application/models html unusedcode
--reportfile ./reports/phpmd/unusedcode.html" dir="./" />
</target>
target phpcs
<target name="phpcs">
<mkdir dir="./reports/phpcs" />
<exec command="/usr/bin/phpcs -n
--standard=Zend --report=summary
./application/models > ./reports/phpcs/summary.txt"
dir="./" />
<exec command="/usr/bin/phpcs -n
--standard=Zend --report=source
./application/models > ./reports/phpcs/source.txt"
dir="./" />
<exec command="/usr/bin/phpcs -n
--standard=Zend --report=checkstyle
./application/models > ./reports/phpcs/checkstyle.xml"
dir="./" />
</target>
target phpcpd
<target name="phpcpd">
<mkdir dir="./reports/phpcpd" />
<exec command="/usr/bin/phpcpd
--log-pmd ./reports/phpcpd/pmd-cpd.xml ./application/models"
dir="./" />
</target>
target phpdoc
<target name="phpdoc">
<mkdir dir="./reports/phpdoc" />
<exec command="phpdoc -d ./application/models -q
-t ./reports/phpdoc -o HTML:frames:earthli"
dir="./" />
</target>
target build
<target name="build"
depends="version,phplint,pdepend,phpmd,phpcs,phpcpd,phpdoc">
<echo msg="Finishing build process ${version.number}" />
</target>
Demo building all
Demo building target
Our reports section
Summary
PHP offers lots of tools
more consistent and clean code
automated process
• http://slideshare.net/DragonBe/improving-qa-on-php-
projects
• http://twitter.com/DragonBe
• http://facebook.com/DragonBe
• http://joind.in/2279
Questions
http://conference.phpbenelux.eu

More Related Content

KEY
Improving QA on PHP projects - confoo 2011
PDF
Best Practices in PHP Application Deployment
PDF
Web-Performance
PDF
Expressive Microservice Framework Blastoff
PDF
Building and deploying PHP applications with Phing
PDF
Intro to PhoneGap
PPT
Build Automation of PHP Applications
PDF
Diagnosing WordPress: What to do when things go wrong
Improving QA on PHP projects - confoo 2011
Best Practices in PHP Application Deployment
Web-Performance
Expressive Microservice Framework Blastoff
Building and deploying PHP applications with Phing
Intro to PhoneGap
Build Automation of PHP Applications
Diagnosing WordPress: What to do when things go wrong

What's hot (20)

KEY
Ant vs Phing
PDF
Zend Framework 2, What's new, Confoo 2011
PDF
Phing: Building with PHP
PPT
Django, What is it, Why is it cool?
PDF
Building and Deploying PHP Apps Using phing
PDF
Best practices-wordpress-enterprise
PDF
Zend con what-i-learned-about-mobile-first
PDF
Deploying PHP applications with Phing
PDF
Putting Phing to Work for You
ODP
Phing - A PHP Build Tool (An Introduction)
PDF
Hey My Web App is Slow Where is the Problem
PDF
Php 7 evolution
PDF
Building and Deploying PHP apps with Phing
PDF
Phing
PDF
Django Documentation
PDF
Nightwatch at Tilt
PDF
淺談 Geb 網站自動化測試(JCConf 2014)
PDF
Continuous Integration Testing in Django
PDF
Chrome Devtools Protocol via Selenium/Appium (Japanese)
PPTX
Automated Deployment With Phing
Ant vs Phing
Zend Framework 2, What's new, Confoo 2011
Phing: Building with PHP
Django, What is it, Why is it cool?
Building and Deploying PHP Apps Using phing
Best practices-wordpress-enterprise
Zend con what-i-learned-about-mobile-first
Deploying PHP applications with Phing
Putting Phing to Work for You
Phing - A PHP Build Tool (An Introduction)
Hey My Web App is Slow Where is the Problem
Php 7 evolution
Building and Deploying PHP apps with Phing
Phing
Django Documentation
Nightwatch at Tilt
淺談 Geb 網站自動化測試(JCConf 2014)
Continuous Integration Testing in Django
Chrome Devtools Protocol via Selenium/Appium (Japanese)
Automated Deployment With Phing
Ad

Similar to Improving qa on php projects (20)

KEY
Php Power Tools
PDF
Workshop quality assurance for php projects - phpbelfast
PDF
Workshop quality assurance for php projects - ZendCon 2013
PDF
Professional PHP: an open-source alternative for enterprise development [Kort...
KEY
An introduction to Phing the PHP build system (PHPDay, May 2012)
PDF
Joomla Code Quality Control and Automation Testing
PDF
Profiling PHP with Xdebug / Webgrind
PDF
Workshop quality assurance for php projects - phpdublin
ODP
Professional PHP: an open-source alternative for enterprise development [Antw...
KEY
An introduction to Phing the PHP build system
KEY
PHP Industrialization
PDF
PHP QA Tools
PDF
20 PHP Static Analysis and Documentation Generators #burningkeyboards
PDF
Best Practices with Zend Framework - Matthew Weier O'Phinney
 
ODP
PHP Quality Assurance Workshop PHPBenelux
PPTX
Some Very Useful PHP Tools
PPT
Microsoft TechDays 2011 - PHP on Windows
KEY
Workshop quality assurance for php projects tek12
PDF
DPC2007 Zend Framework (Gaylord Aulke)
 
PDF
Enterprise PHP Development - ZendCon 2008
Php Power Tools
Workshop quality assurance for php projects - phpbelfast
Workshop quality assurance for php projects - ZendCon 2013
Professional PHP: an open-source alternative for enterprise development [Kort...
An introduction to Phing the PHP build system (PHPDay, May 2012)
Joomla Code Quality Control and Automation Testing
Profiling PHP with Xdebug / Webgrind
Workshop quality assurance for php projects - phpdublin
Professional PHP: an open-source alternative for enterprise development [Antw...
An introduction to Phing the PHP build system
PHP Industrialization
PHP QA Tools
20 PHP Static Analysis and Documentation Generators #burningkeyboards
Best Practices with Zend Framework - Matthew Weier O'Phinney
 
PHP Quality Assurance Workshop PHPBenelux
Some Very Useful PHP Tools
Microsoft TechDays 2011 - PHP on Windows
Workshop quality assurance for php projects tek12
DPC2007 Zend Framework (Gaylord Aulke)
 
Enterprise PHP Development - ZendCon 2008
Ad

More from Michelangelo van Dam (20)

PDF
GDPR Art. 25 - Privacy by design and default
PDF
Moving from app services to azure functions
PDF
Privacy by design
PDF
DevOps or DevSecOps
PDF
Privacy by design
PDF
Continuous deployment 2.0
PDF
Let your tests drive your code
PDF
General Data Protection Regulation, a developer's story
PDF
Leveraging a distributed architecture to your advantage
PDF
The road to php 7.1
PDF
Open source for a successful business
PDF
Decouple your framework now, thank me later
PDF
Deploy to azure in less then 15 minutes
PDF
Azure and OSS, a match made in heaven
PDF
Getting hands dirty with php7
PDF
Zf2 how arrays will save your project
PDF
Create, test, secure, repeat
PDF
The Continuous PHP Pipeline
PDF
PHPUnit Episode iv.iii: Return of the tests
PDF
Easily extend your existing php app with an api
GDPR Art. 25 - Privacy by design and default
Moving from app services to azure functions
Privacy by design
DevOps or DevSecOps
Privacy by design
Continuous deployment 2.0
Let your tests drive your code
General Data Protection Regulation, a developer's story
Leveraging a distributed architecture to your advantage
The road to php 7.1
Open source for a successful business
Decouple your framework now, thank me later
Deploy to azure in less then 15 minutes
Azure and OSS, a match made in heaven
Getting hands dirty with php7
Zf2 how arrays will save your project
Create, test, secure, repeat
The Continuous PHP Pipeline
PHPUnit Episode iv.iii: Return of the tests
Easily extend your existing php app with an api

Recently uploaded (20)

PDF
Taming the Chaos: How to Turn Unstructured Data into Decisions
PPTX
2018-HIPAA-Renewal-Training for executives
PPTX
Chapter 5: Probability Theory and Statistics
PPTX
Custom Battery Pack Design Considerations for Performance and Safety
PDF
Developing a website for English-speaking practice to English as a foreign la...
PPT
Galois Field Theory of Risk: A Perspective, Protocol, and Mathematical Backgr...
PPTX
Final SEM Unit 1 for mit wpu at pune .pptx
PDF
Getting started with AI Agents and Multi-Agent Systems
PPTX
The various Industrial Revolutions .pptx
PDF
Hybrid horned lizard optimization algorithm-aquila optimizer for DC motor
PDF
A review of recent deep learning applications in wood surface defect identifi...
PDF
A contest of sentiment analysis: k-nearest neighbor versus neural network
PDF
Architecture types and enterprise applications.pdf
PDF
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
PDF
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
PDF
UiPath Agentic Automation session 1: RPA to Agents
PDF
A comparative study of natural language inference in Swahili using monolingua...
PDF
Consumable AI The What, Why & How for Small Teams.pdf
PDF
CloudStack 4.21: First Look Webinar slides
PDF
Five Habits of High-Impact Board Members
Taming the Chaos: How to Turn Unstructured Data into Decisions
2018-HIPAA-Renewal-Training for executives
Chapter 5: Probability Theory and Statistics
Custom Battery Pack Design Considerations for Performance and Safety
Developing a website for English-speaking practice to English as a foreign la...
Galois Field Theory of Risk: A Perspective, Protocol, and Mathematical Backgr...
Final SEM Unit 1 for mit wpu at pune .pptx
Getting started with AI Agents and Multi-Agent Systems
The various Industrial Revolutions .pptx
Hybrid horned lizard optimization algorithm-aquila optimizer for DC motor
A review of recent deep learning applications in wood surface defect identifi...
A contest of sentiment analysis: k-nearest neighbor versus neural network
Architecture types and enterprise applications.pdf
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
UiPath Agentic Automation session 1: RPA to Agents
A comparative study of natural language inference in Swahili using monolingua...
Consumable AI The What, Why & How for Small Teams.pdf
CloudStack 4.21: First Look Webinar slides
Five Habits of High-Impact Board Members

Improving qa on php projects

  • 1. Improving QA on PHP projects Michelangelo van Dam ZendCon2010, Santa Clara, CA (USA)
  • 2. Michelangelo van Dam • Independent Consultant • Zend Certified Engineer (ZCE) • President of PHPBenelux
  • 3. What’s the benefit of QA? • early detection of issues • cleaner & consistent code • knowledge about the codebase • increase of confidence
  • 4. Sebastian Bergmann • QA expert • wrote the tools • speaker and inspirer
  • 6. Example Code • Zend Framework QuickStart app - http://framework.zend.com/manual/en/learning.quickstart.intro.html
  • 7. <VirtualHost *:80> DocumentRoot /srv/www/quickstart/public ServerName quickstart.local ServerAdmin root@localhost <Directory /srv/www/quickstart/public> Options Indexes FollowSymlinks AllowOverride All Order allow,deny Allow from all DirectoryIndex index.php </Directory> Alias /reports /srv/www/quickstart/reports <Directory /srv/www/quickstart/reports> Options Indexes FollowSymlinks AllowOverride All Order allow,deny Allow from all DirectoryIndex index.php index.html </Directory> </VirtualHost> VirtualHost Settings
  • 9. Syntax Checking • PHPLint - comes with PHP binary - validates code for syntax errors • Website - http://www.icosaedro.it/phplint/
  • 11. Code Documentation • PHPDocumentator - creates automated API documentation - based on inline code blocks • Installation - pear install PhpDocumentor • Website - http://www.phpdoc.org
  • 14. Coding Standards • PHP_CodeSniffer - sniffs for coding standard violations - ensures code is clean and consistent - using standard and custom coding standards • Installation - pear install PHP_CodeSniffer • Website - http://pear.php.net/package/PHP_CodeSniffer
  • 16. PHPCPD • PHP Copy/Paste Detector - detects code duplication • Installation - pear channel-discover pear.phpunit.de - pear channel-discover components.ez.no - pear install --alldeps phpunit/phpcpd • Website - http://github.com/sebastianbergmann/phpcpd
  • 19. Mess Detection • PDepend & PHPMD - detects code mess • Installation - pear channel-discover pear.pdepend.org - pear install pdepend/PHP_Depend - pear channel-discover pear.phpmd.org - pear install phpmd/PHP_PMD • Websites - http://www.pdepend.org - http://www.phpmd.org
  • 23. Unit Testing • PHPUnit - tests code on unit level - includes database tests - integrates well with many PHP frameworks • Installation - pear channel-discover pear.phpunit.de - pear install phpunit/PHPUnit • Website - http://www.phpunit.de
  • 25. Packaging • Phar - PHP Archive (equivalent of Java jar) - compresses and collects like - included in PHP build (as of PHP 5.3.0) • Installation (before PHP 5.3.0) - pecl install phar • Website: - http://php.net/phar
  • 27. Usage • libraries • modules • images • plugins • deployment
  • 28. Automated builds • Phing - automated build tool - like Apache Ant - integrates well with other PHP tools • Installation - pear channel-discover pear.phing.info - pear install phing/phing • Website - http://phing.info
  • 29. build.xml <?xml version="1.0"?> <project name="zfqs" description="Zend Framework QuickStart" default="build" > <target name="version"> <version releasetype="Bugfix" file="build.version" property="version.number"/> </target> <target name="phplint"> <mkdir dir="./reports/phplint" /> <phplint file="./application/models" haltonfailure="false" tofile="./reports/phplint/errors.txt"/> </target> <target name="pdepend"> <mkdir dir="./reports/pdepend" /> <copy file="./build_pdepend.html" tofile="./reports/pdepend/index.html" overwrite="true" /> <exec command="/usr/bin/pdepend --summary-xml=./reports/pdepend/summary.xml --jdepend-chart=./reports/pdepend/jdepend.svg --overview-pyramid=./reports/pdepend/pyramid.svg ./application/models" dir="./" /> </target> <target name="phpmd"> <mkdir dir="./reports/phpmd" /> <exec command="/usr/bin/phpmd ./application/models html codesize --reportfile ./reports/phpmd/codesize.html" dir="./" /> <exec command="/usr/bin/phpmd ./application/models html unusedcode --reportfile ./reports/phpmd/unusedcode.html" dir="./" /> </target> <target name="phpcs"> <mkdir dir="./reports/phpcs" /> <exec command="/usr/bin/phpcs -n --standard=Zend --report=summary ./application/models > ./reports/phpcs/summary.txt" dir="./" /> <exec command="/usr/bin/phpcs -n --standard=Zend --report=source ./application/models > ./reports/phpcs/source.txt" dir="./" /> <exec command="/usr/bin/phpcs -n --standard=Zend --report=checkstyle ./application/models > ./reports/phpcs/checkstyle.xml" dir="./" /> </target> <target name="phpcpd"> <mkdir dir="./reports/phpcpd" /> <exec command="/usr/bin/phpcpd --log-pmd ./reports/phpcpd/pmd-cpd.xml ./application/models" dir="./" /> </target> <target name="phpdoc"> <mkdir dir="./reports/phpdoc" /> <exec command="phpdoc -d ./application/models -q -t ./reports/phpdoc -o HTML:frames:earthli" dir="./" /> </target> <target name="build" depends="version,phplint,pdepend,phpmd,phpcs,phpcpd,phpdoc"> <echo msg="Finishing build process ${version.number}" /> </target> </project>
  • 30. project definition <?xml version="1.0"?> <project name="zfqs" description="Zend Framework QuickStart" default="build" > … </project>
  • 31. target version <target name="version"> <version releasetype="Bugfix" file="build.version" property="version.number"/> </target> In file “build.version” we have the version number as the following sequence: MAJOR.MINOR.BUGFIX (starting at 0.0.0)
  • 32. target phplint <target name="phplint"> <mkdir dir="./reports/phplint" /> <phplint file="./application/models" haltonfailure="false" tofile="./reports/phplint/errors.txt"/> </target>
  • 33. target pdepend <target name="pdepend"> <mkdir dir="./reports/pdepend" /> <copy file="./build_pdepend.html" tofile="./reports/pdepend/index.html" overwrite="true" /> <exec command="/usr/bin/pdepend --summary-xml=./reports/pdepend/summary.xml --jdepend-chart=./reports/pdepend/jdepend.svg --overview-pyramid=./reports/pdepend/pyramid.svg ./application/models" dir="./" /> </target>
  • 34. target phpmd <target name="phpmd"> <mkdir dir="./reports/phpmd" /> <exec command="/usr/bin/phpmd ./application/models html codesize --reportfile ./reports/phpmd/codesize.html" dir="./" /> <exec command="/usr/bin/phpmd ./application/models html unusedcode --reportfile ./reports/phpmd/unusedcode.html" dir="./" /> </target>
  • 35. target phpcs <target name="phpcs"> <mkdir dir="./reports/phpcs" /> <exec command="/usr/bin/phpcs -n --standard=Zend --report=summary ./application/models > ./reports/phpcs/summary.txt" dir="./" /> <exec command="/usr/bin/phpcs -n --standard=Zend --report=source ./application/models > ./reports/phpcs/source.txt" dir="./" /> <exec command="/usr/bin/phpcs -n --standard=Zend --report=checkstyle ./application/models > ./reports/phpcs/checkstyle.xml" dir="./" /> </target>
  • 36. target phpcpd <target name="phpcpd"> <mkdir dir="./reports/phpcpd" /> <exec command="/usr/bin/phpcpd --log-pmd ./reports/phpcpd/pmd-cpd.xml ./application/models" dir="./" /> </target>
  • 37. target phpdoc <target name="phpdoc"> <mkdir dir="./reports/phpdoc" /> <exec command="phpdoc -d ./application/models -q -t ./reports/phpdoc -o HTML:frames:earthli" dir="./" /> </target>
  • 42. Summary PHP offers lots of tools more consistent and clean code automated process
  • 43. • http://slideshare.net/DragonBe/improving-qa-on-php- projects • http://twitter.com/DragonBe • http://facebook.com/DragonBe • http://joind.in/2279 Questions