From bc6a55a8ce2aa6b10ec1b565aadf315d0f65b5d6 Mon Sep 17 00:00:00 2001 From: Chris Burke Date: Thu, 29 Jan 2015 22:21:59 +0000 Subject: [PATCH] Rename default validation constant to read better --- src/ORM/Table.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ORM/Table.php b/src/ORM/Table.php index a420f10a442..0565c9f3371 100644 --- a/src/ORM/Table.php +++ b/src/ORM/Table.php @@ -125,7 +125,7 @@ class Table implements RepositoryInterface, EventListenerInterface * * @var string */ - const VALIDATOR_DEFAULT = 'default'; + const DEFAULT_VALIDATOR = 'default'; /** * Name of the table as it can be found in the database @@ -255,7 +255,7 @@ public function __construct(array $config = []) } if (!empty($config['validator'])) { if (!is_array($config['validator'])) { - $this->validator(self::VALIDATOR_DEFAULT, $config['validator']); + $this->validator(self::DEFAULT_VALIDATOR, $config['validator']); } else { foreach ($config['validator'] as $name => $validator) { $this->validator($name, $validator); @@ -1149,7 +1149,7 @@ public function updateAll($fields, $conditions) * use null to get a validator. * @return \Cake\Validation\Validator */ - public function validator($name = self::VALIDATOR_DEFAULT, Validator $validator = null) + public function validator($name = self::DEFAULT_VALIDATOR, Validator $validator = null) { if ($validator === null && isset($this->_validators[$name])) { return $this->_validators[$name];