Book Image

Learning Yii Testing

Book Image

Learning Yii Testing

Overview of this book

Table of Contents (16 chapters)
Learning Yii Testing
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Improving our code with the aid of additional tools


In addition to code coverage and test reports, we have a range of additional tools, which we can use for improving the quality of our code.

The two tools that we're going to talk about are the check style and the cyclomatic complexity through the C.R.A.P. index.

We are going to add more examples and tools to these in Chapter 9, Eliminating Stress with the Help of Automation, as each command would require too much knowledge from the developer's side, and it is something that can be automated and triggered by the flick of a switch.

PHP Checkstyle (PHPCS) is a great tool, albeit it is rather complex at first . This will help us in maintaining a style of code that is uniform for all developers. You might care too much about this, and I've seen situations where decisions on which style to use have resulted in a big fight. However, the benefits of this are quite evident, as it forces the developers to control their style of coding. When used with...