@@ -57,8 +57,6 @@ public function generate(): void
5757 // the recommendations advanced filter
5858 Filter::filter ($ query , $ recommendation ->advanced_filter );
5959
60- dump ($ query ->count ());
61-
6260 // Set up the RecommendationUser query
6361 $ recommendationUsersQuery = $ recommendation ->recommendationUsers ()->where ('user_id ' , '= ' , $ this ->user ->id );
6462
@@ -67,7 +65,8 @@ public function generate(): void
6765
6866 // Check if there are enough results to satisfy the
6967 // minimum matches required by the recommendation
70- $ minimumMatchesMet = ($ count = $ query ->count ()) < $ recommendation ->min_matches ;
68+ $ count = $ query ->count ();
69+ $ minimumMatchesMet = $ count >= $ recommendation ->min_matches ;
7170
7271 // If we find the RecommendationUser records, we need
7372 // to make sure they're up-to-date
@@ -86,15 +85,11 @@ public function generate(): void
8685
8786 // Persist the updates
8887 $ recommendationUser ->save ();
89-
90- dump (['RecommendationUserUpdated ' => $ recommendationUser ]);
9188 } else {
9289 // Otherwise, if the minimum matches are not met, we
9390 // need to delete the existing RecommendationUser
9491 // rows since they are now invalid
9592 $ recommendationUsersQuery ->delete ();
96-
97- dump (['RecommendationUserDeleted ' => $ recommendationUser ]);
9893 }
9994 }
10095 } else if ($ minimumMatchesMet ) {
@@ -107,10 +102,6 @@ public function generate(): void
107102 ]);
108103
109104 $ recommendationUser ->save ();
110-
111- dump (['RecommendationUserCreated ' => $ recommendationUser ]);
112- } else {
113- dump (['NoRecommendationsForUser ' => false ]);
114105 }
115106 }
116107 }
0 commit comments