Codeception/Codeception — pull request #555 by guilhermeFranco (2013-09-13 18:05:43+00:00)
Title: Improving Step class code design

Hey guys !

Here I am again to suggest some design improvements (I truly hope I can suggest some features soon =P)

This time I've looked the Step class, and found some long methods, unnecessary else statements, temp variables and stuff.

My major modification was the getArguments() method that was very long and hard to read. I've extracted it in some minor other helper methods that could easily be overridden by a subclass. I think we get some advantages with the approach that I came up:

-> Readability
-> Code Style
-> Open / Closes Principle improvement in a way that if in the future, any subclass of Step want to change the behavior of parseArgumentAsString() for example, it will be just a matter of override a method instead of some modification on the Step class.

I'm sending the pull request to the current stable branch because I haven't changed any behavior or added new features. It's just a refactor to get things a little more clean and easy to change. Please let me know if I made any mistakes, or if the code isn't good enough !

Thanks !!