Skip to content
Permalink
Browse files

Fixed spelling error in method name

  • Loading branch information...
lorenzo committed Dec 25, 2013
1 parent d745bbf commit 4d2d5379471df35c8a4f926506a9d05ed0ec2b62
Showing with 3 additions and 3 deletions.
  1. +3 −3 Cake/ORM/Association/BelongsToMany.php
@@ -500,7 +500,7 @@ protected function _saveLinks(Entity $sourceEntity, $targetEntities, $options) {
* @return boolean true on success, false otherwise
*/
public function link(Entity $sourceEntity, array $targetEntities, array $options = []) {
$this->_checkPersitenceStatus($sourceEntity, $targetEntities);
$this->_checkPersistenceStatus($sourceEntity, $targetEntities);
$property = $this->property();
$links = $sourceEntity->get($property) ?: [];
$links = array_merge($links, $targetEntities);
@@ -542,7 +542,7 @@ function() use ($sourceEntity, $targetEntities, $options) {
* @return void
*/
public function unlink(Entity $sourceEntity, array $targetEntities, $cleanProperty = true) {
$this->_checkPersitenceStatus($sourceEntity, $targetEntities);
$this->_checkPersistenceStatus($sourceEntity, $targetEntities);
$property = $this->property();
$this->junction()->connection()->transactional(
@@ -730,7 +730,7 @@ protected function _diffLinks($existing, $jointEntities, $targetEntities) {
* @throws \InvalidArgumentException
* @return boolean
*/
protected function _checkPersitenceStatus($sourceEntity, array $targetEntities) {
protected function _checkPersistenceStatus($sourceEntity, array $targetEntities) {
if ($sourceEntity->isNew() !== false) {
$error = __d('cake_dev', 'Source entity needs to be persisted before proceeding');
throw new \InvalidArgumentException($error);

0 comments on commit 4d2d537

Please sign in to comment.
You can’t perform that action at this time.