src/Collection/LazyModelCollection.php 1 location
|
@@ 114-123 (lines=10) @@
|
111 |
|
* |
112 |
|
* @return ModelCollectionInterface |
113 |
|
*/ |
114 |
|
public function removeModel(ModelInterface $model): ModelCollectionInterface |
115 |
|
{ |
116 |
|
$this->resolveModels(); |
117 |
|
|
118 |
|
if (isset($this->models[$model->getId()])) { |
119 |
|
unset($this->models[$model->getId()]); |
120 |
|
} |
121 |
|
|
122 |
|
return $this; |
123 |
|
} |
124 |
|
|
125 |
|
/** |
126 |
|
* @param ModelInterface[]|array $models |
src/Collection/ModelCollection.php 1 location
|
@@ 76-83 (lines=8) @@
|
73 |
|
* |
74 |
|
* @return ModelCollectionInterface |
75 |
|
*/ |
76 |
|
public function removeModel(ModelInterface $model): ModelCollectionInterface |
77 |
|
{ |
78 |
|
if (isset($this->models[$model->getId()])) { |
79 |
|
unset($this->models[$model->getId()]); |
80 |
|
} |
81 |
|
|
82 |
|
return $this; |
83 |
|
} |
84 |
|
|
85 |
|
/** |
86 |
|
* @param ModelInterface[]|array $models |