Posts

Showing posts from May, 2009

Phing

Image
One of the best Phing resources I have come across is the blog of Raphael Stolt . I have used Phing based scripts for backup and code generation, but that is not all you can do with it. As Raphael is showing in its blog, you can use it for unit testing, phplocing (see my post on phploc), refactoring, code sniffing, database generation and so on.

phploc

phploc is cool tool, by Sebastian Bergmann , to check the size of your php project. You can install it with PEAR. The short version of the installation goes like this: // add PEAR channel user@host ~ % pear channel-discover pear.phpunit.de // install phploc user@host ~ % pear install phpunit/phploc // run user@host ~ % phploc /path/to/your/project/code/folder For more detailed instructions and system requirements, here is the link. Now we are going to play a little honesty game: Run the tool against your php project library code [user@host] phploc ./library/Zend/ phploc 1.0.0 by Sebastian Bergmann. Directories: 285 Files: 1372 Lines of Code (LOC): 275436 Comment Lines of Code (CLOC): 130251 Non-Comment Lines of Code (NCLOC): 145185 Interfaces: 53 Classes: 1321 Functions/Methods: 9170 Run the tool against your php project own code: [user@host] phploc ./my_application/my_modules/ phploc 1.0.0 by Sebastian Bergmann. Directories: 30 Files: 85 Lines of Code (LOC): 6644 Comment Lines of Cod