FAQ

GraphViz ? DOT files ? WAT ?

Well, I admit it's not very popular but it's the tool for managing digraph. It was build for that. More than that, there are plugin for Eclipse and many converters to SVG or PDF.

Bitches don't know 'bout my protected

That's right, I only scan public methods. Why ? Because 'inner' refactor and 'outer' refactor are two different process'. This tool focuses on outer, therefore public. Despite my willingness to keep this tool K.I.S.S, it grows above 1k NCLOC, it's more than I've expected.

This is damned slow !

Unfortunatly yes. I thought about porting some algorithms to Java but it's difficult to explain to a PHP developer he has to install a JVM for a PHP tool. That's seems weird. Beside, this tool is for PHP community, and I hope maintained by PHP community. If there is Java, the community becomes too narrow.

Y U NO use an abstract format for digraph ?

This to prevent to parse over and over the same code. Yeah, that could be cool. But since you have to lauch commands sequence, over and over, I try to limit this number. Usually, for each digraph, you change the code and need to re-generate the graph (or another), therefore : re-parsing.

This tool does not verify your guidances

That's partly true. As I said, to comply SOLID principles can become difficult when memory concerns or simple design are involved. Don't push too far these principles, they are not "Sacred Stone-Carved Laws". It is rather a tourist map. But from my experience, the over-used of SOLID has rarely drawbacks, except a little too- complicated API. DIP and LSP can never be over-used. For SRP and ISP, try to keep it simple. For OCP, well, you can never expect what new idea will pop in the customer's head.

I have memory limit error

Try to increase the memory_limit config in php.ini or try to work on a smaller package. Don't expect to refactor an app in one pass. Working with 50 to 200 files seems to be a good range.

I have parsing error

Your code has a flaw. The good part of this tool is you could find parsing error in dead code even if your app is working.

My digraph is too messy to find something relevant

Use other algorithms like spaghetti coupling and liskov violations. Work with smaller package. This tool is even useful with 10 poorly-coded files. With a good refactoring, these 10 files can become 30 or 60 files !

What about special treatment of static item ?

Static => Global => Evil => Kill'em all
Yes it is absolute but from my experience, "static" means "cannot evolve" means "future problem". That's why I don't use anymore singleton. And that's why modern frameworks don't use it anymore. Symfony 1.4 was full of singletons, Symfony2 has none. Static is the Dark Side of efferent coupling : easy, quick and if you follow this path you're doomed forever.