robocoder/php-webdriver — Issue #6: Class refactoring
Author: robocoder
Created: 2011-12-02 14:46:35+00:00
State: open

BrowserName.php, CapabilityType.php, and Keys.php are class files that only contain constants. Basically, this acts as a namespace wrapper.

However, a fundamental concept is that classes encapsulate behaviour., but here, there are no methods. Also, there's a code smell here with the class naming (where a constant lives, vs where it is used).

Choices:

1. merge Keys.php into Element.php; merge BrowserName.php into WebDriver.php; merge CapabilityType.php into Sessions.php, or

2. rename Keys.php to WebDriver/Element/Interface.php, BrowserName.php to WebDriver/Interface.php, and CapabilityType.php into WebDriver/Sessions/Interface.php

(I'm leaning towards option 1 as it's simpler and lighter)