|
@@ 180-182 (lines=3) @@
|
| 177 |
|
protected function insureSingleEntity($entity, $step) |
| 178 |
|
{ |
| 179 |
|
if ($entity instanceof AbstractCollection) { |
| 180 |
|
if (count($entity) > 1) { |
| 181 |
|
throw new \InvalidArgumentException($this->getSelfName() . ' does not support setting references for multiple ' . $this->getCollectionName($entity) . 's'); |
| 182 |
|
} |
| 183 |
|
if (count($entity) == 0) { |
| 184 |
|
throw new \InvalidArgumentException($this->getSelfName() . ' does not support setting references for no ' . $this->getCollectionName($entity). 's'); |
| 185 |
|
} |
|
@@ 183-185 (lines=3) @@
|
| 180 |
|
if (count($entity) > 1) { |
| 181 |
|
throw new \InvalidArgumentException($this->getSelfName() . ' does not support setting references for multiple ' . $this->getCollectionName($entity) . 's'); |
| 182 |
|
} |
| 183 |
|
if (count($entity) == 0) { |
| 184 |
|
throw new \InvalidArgumentException($this->getSelfName() . ' does not support setting references for no ' . $this->getCollectionName($entity). 's'); |
| 185 |
|
} |
| 186 |
|
|
| 187 |
|
$entity = reset($entity); |
| 188 |
|
} |