File tree Expand file tree Collapse file tree 3 files changed +15
-7
lines changed Expand file tree Collapse file tree 3 files changed +15
-7
lines changed Original file line number Diff line number Diff line change 99use Illuminate \Pagination \LengthAwarePaginator ;
1010use Illuminate \Pagination \Paginator ;
1111use MongoDB \BSON \ObjectID ;
12+ use MongoDB \Laravel \Eloquent \Model as MongoDBModel ;
1213
1314use function array_key_exists ;
1415use function array_values ;
@@ -195,9 +196,11 @@ public function destroy($ids = [])
195196 /**
196197 * Delete all embedded models.
197198 *
199+ * @param null $id
200+ *
198201 * @return int
199202 */
200- public function delete ()
203+ public function delete ($ id = null )
201204 {
202205 // Overwrite the local key with an empty array.
203206 $ result = $ this ->query ->update ([$ this ->localKey => []]);
@@ -224,9 +227,9 @@ public function detach($ids = [])
224227 /**
225228 * Save alias.
226229 *
227- * @return Model
230+ * @return MongoDBModel
228231 */
229- public function attach (Model $ model )
232+ public function attach (MongoDBModel $ model )
230233 {
231234 return $ this ->save ($ model );
232235 }
Original file line number Diff line number Diff line change @@ -133,9 +133,11 @@ public function dissociate()
133133 /**
134134 * Delete all embedded models.
135135 *
136+ * @param ?string $id
137+ *
136138 * @return int
137139 */
138- public function delete ()
140+ public function delete ($ id = null )
139141 {
140142 return $ this ->performDelete ();
141143 }
Original file line number Diff line number Diff line change 88use Illuminate \Database \Eloquent \Collection ;
99use Illuminate \Database \Eloquent \Model as EloquentModel ;
1010use Illuminate \Database \Eloquent \Relations \Relation ;
11+ use Illuminate \Database \Query \Expression ;
1112use MongoDB \Laravel \Eloquent \Model ;
1213
1314use function array_merge ;
@@ -99,9 +100,11 @@ public function get($columns = ['*'])
99100 /**
100101 * Get the number of embedded models.
101102 *
103+ * @param Expression|string $columns
104+ *
102105 * @return int
103106 */
104- public function count ()
107+ public function count ($ columns = ' * ' )
105108 {
106109 return count ($ this ->getEmbedded ());
107110 }
@@ -392,8 +395,8 @@ public function getQualifiedForeignKeyName()
392395 /**
393396 * Get the name of the "where in" method for eager loading.
394397 *
395- * @param \Illuminate\Database\Eloquent\Model $model
396- * @param string $key
398+ * @param EloquentModel $model
399+ * @param string $key
397400 *
398401 * @return string
399402 */
You can’t perform that action at this time.
0 commit comments