for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* OpauthValidator
* Merges with a custom validator to bring to the user some super error messages
* @author Will Morgan <@willmorgan>
*/
class OpauthValidator extends RequiredFields {
You can fix this by adding a namespace to your class:
namespace YourVendor; class YourClass { }
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.
public function php($data) {
$customValid = true;
$requiredValid = parent::php($data);
// If there's a custom validator set, validate with that too
if($validatorClass = self::config()->custom_validator) {
$custom = new $validatorClass();
$custom->setForm($this->form);
$customValid = $custom->php($data);
if(!$customValid) {
if($requiredValid) {
$this->errors = array();
}
$this->errors = array_merge($this->errors, $custom->errors);
return $customValid && $requiredValid;
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.