QafooLabs/php-refactoring-browser — pull request #25 by pscheit (2013-06-29 07:49:11+00:00)
Title: [OptimizeUse] Implemented feature optimize use

Hi there,

this is my first try at the "optimize use" (-statements) from the roadmap.
I had to extend the Namescanner to collect informations about the parent, because I had to differentiate between PhpNames that are in use statements and are just somewhere in the (class-)file. I wasn't quite sure to extend it here, or create another name scanner function or collector.
Thats why I added a parent property to the PhpName and had to adjust the tests.

While contributing some questions came up, that I can't find a guideline for:
- when do i need to prefix get*** for getters an when not? (`PhpClass::getDeclaredNamespaceLine` vs `PhpName::fullyQualifiedName()`)
- do you write `"constant" === $variable` like in Symfony or does it matter at all?
- should file and line/line-range in objects of the model domain always be optional in constructor?
- i had to adjust the behat test after creating it, because of the diff @@ @@ notation. Because of this it's a little bit tricky to write expected patches for behat. Is it possible to work around it a little nicer?

Best regards
Philipp