Tools to suggest improved OO and design pattern approaches?
I'm working on a PHP OO application and I am wondering whether the inheritance I've implemented is optimal (specifically, I'm wondering if I've enough of it). It occurs to me that there may be lexical tools available that scan a codebase and create a network analysis of what-method-calls-what, and suggest potential refactorings based on tried-and-tested design patterns.

That said, I wonder if I am asking too much of software here - just because code might be simplified by having one class inherit from another doesn't mean it is conceptually appropriate, of course.

Side note, for interest: I see from SO that there *are* tools to [detect copy and paste code](http://stackoverflow.com/questions/2053319/what-tools-are-there-for-suggesting-potential-refactorings).
Tools to suggest improved OO and design pattern approaches?
===

I'm working on a PHP OO application and I am wondering whether the inheritance I've implemented is optimal (specifically, I'm wondering if I've enough of it). It occurs to me that there may be lexical tools available that scan a codebase and create a network analysis of what-method-calls-what, and suggest potential refactorings based on tried-and-tested design patterns.

That said, I wonder if I am asking too much of software here - just because code might be simplified by having one class inherit from another doesn't mean it is conceptually appropriate, of course.

Side note, for interest: I see from SO that there *are* tools to [detect copy and paste code](http://stackoverflow.com/questions/2053319/what-tools-are-there-for-suggesting-potential-refactorings).