Skip to content

Commit

Permalink
Renaming some classes and methods
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed Dec 2, 2014
1 parent e7ef8ce commit 0f2ee80
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/ORM/DomainChecker.php → src/ORM/RulesChecker.php
Expand Up @@ -22,7 +22,7 @@
* Contains logic for storing and checking domain rules on entities
*
*/
class DomainChecker {
class RulesChecker {

protected $_rules = [];

Expand Down
14 changes: 7 additions & 7 deletions src/ORM/Table.php
Expand Up @@ -29,10 +29,10 @@
use Cake\ORM\Association\HasMany;
use Cake\ORM\Association\HasOne;
use Cake\ORM\BehaviorRegistry;
use Cake\ORM\DomainChecker;
use Cake\ORM\Exception\MissingEntityException;
use Cake\ORM\Exception\RecordNotFoundException;
use Cake\ORM\Marshaller;
use Cake\ORM\RulesChecker;
use Cake\Utility\Inflector;
use Cake\Validation\Validator;
use RuntimeException;
Expand Down Expand Up @@ -185,9 +185,9 @@ class Table implements RepositoryInterface, EventListenerInterface {
/**
* The domain rules to be applied to entities saved by this table
*
* @var \Cake\ORM\DomainChecker
* @var \Cake\ORM\RulesChecker
*/
protected $_domainChecker;
protected $_rulesChecker;

/**
* Initializes a new instance
Expand Down Expand Up @@ -1853,13 +1853,13 @@ public function checkDomainRules($entity) {
}

public function domainRules() {
if ($this->_domainChecker !== null) {
return $this->_domainChecker;
if ($this->_rulesChecker !== null) {
return $this->_rulesChecker;
}
return $this->_domainChecker = $this->buildDomainRules(new DomainChecker(['repository' => $this]));
return $this->_rulesChecker = $this->buildRules(new RulesChecker(['repository' => $this]));
}

public function buildDomainRules(DomainChecker $rules) {
public function buildRules(RulesChecker $rules) {
return $rules;
}

Expand Down
Expand Up @@ -21,7 +21,7 @@
/**
* Tests the integration between the ORM and the doamin rules cheker
*/
class DomainRulesIntegrationTest extends TestCase {
class RulesCheckerIntegrationTest extends TestCase {

/**
* Fixtures to be loaded
Expand Down

0 comments on commit 0f2ee80

Please sign in to comment.