Skip to content

Commit

Permalink
Removing unused line of code. Fixing style issue
Browse files Browse the repository at this point in the history
  • Loading branch information
mylux committed Oct 18, 2015
1 parent ebb2e8c commit f458bc2
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/ORM/Association/HasMany.php
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,6 @@ public function link(EntityInterface $sourceEntity, array $targetEntities, array
{
$saveStrategy = $this->saveStrategy();
$this->saveStrategy(self::SAVE_APPEND);
$source = $this->source();
$property = $this->property();

$currentEntities = (new Collection((array)$sourceEntity->get($property)))->append($targetEntities);
Expand Down Expand Up @@ -268,11 +267,11 @@ public function unlink(EntityInterface $sourceEntity, array $targetEntities, $cl
$property = $this->property();

$conditions = [
'OR' => (new Collection($targetEntities) )
->map(function ($entity) use ($targetPrimaryKey) {
return $entity->extract($targetPrimaryKey);
})
->toList()
'OR' => (new Collection($targetEntities))
->map(function ($entity) use ($targetPrimaryKey) {
return $entity->extract($targetPrimaryKey);
})
->toList()
];

$this->_unlink($foreignKey, $target, $conditions);
Expand Down

0 comments on commit f458bc2

Please sign in to comment.