Use class attribute than hard coded string

- Improved #171 fix
This commit is contained in:
japatel
2014-12-08 17:14:19 -06:00
parent 7c4a16ca3d
commit 1406ef91da

View File

@@ -26,7 +26,7 @@ class ModelAccessorValidator
if ($mode != 'disabled') {
//If the mode is disabled, bypass the validation
foreach (array('set' . $attributeName, 'get' . $attributeName) as $methodName) {
if (get_class($class) == "PayPal\\Common\\PPModel") {
if (get_class($class) == PPModel::class) {
// Silently return false on cases where you are using PPModel instance directly
return false;
}