@@ -13,9 +13,6 @@ trait FilterByPopularityTimeFrame
1313{
1414 /**
1515 * Get the total visit count
16- *
17- * @param Builder $builder
18- * @return \Illuminate\Database\Eloquent\Builder
1916 */
2017 public function scopeWithTotalVisitCount (Builder $ builder ): Builder
2118 {
@@ -24,21 +21,15 @@ public function scopeWithTotalVisitCount(Builder $builder): Builder
2421
2522 /**
2623 * Get the popular visits all time
27- *
28- * @param Builder $builder
29- * @return \Illuminate\Database\Eloquent\Builder
3024 */
3125 public function scopePopularAllTime (Builder $ builder ): Builder
3226 {
3327 return $ builder ->withTotalVisitCount ()
34- ->orderBy ('visit_count_total ' , 'desc ' );
28+ ->orderBy ('visit_count_total ' , 'desc ' );
3529 }
3630
3731 /**
3832 * Get the popular visits today
39- *
40- * @param Builder $builder
41- * @return \Illuminate\Database\Eloquent\Builder
4233 */
4334 public function scopePopularToday (Builder $ builder ): Builder
4435 {
@@ -50,10 +41,6 @@ public function scopePopularToday(Builder $builder): Builder
5041
5142 /**
5243 * Get the popular visits last given days
53- *
54- * @param Builder $builder
55- * @param int $days
56- * @return \Illuminate\Database\Eloquent\Builder
5744 */
5845 public function scopePopularLastDays (Builder $ builder , int $ days ): Builder
5946 {
@@ -65,9 +52,6 @@ public function scopePopularLastDays(Builder $builder, int $days): Builder
6552
6653 /**
6754 * Get the popular visits this week
68- *
69- * @param Builder $builder
70- * @return \Illuminate\Database\Eloquent\Builder
7155 */
7256 public function scopePopularThisWeek (Builder $ builder ): Builder
7357 {
@@ -79,9 +63,6 @@ public function scopePopularThisWeek(Builder $builder): Builder
7963
8064 /**
8165 * Get the popular visits last week
82- *
83- * @param Builder $builder
84- * @return \Illuminate\Database\Eloquent\Builder
8566 */
8667 public function scopePopularLastWeek (Builder $ builder ): Builder
8768 {
@@ -93,9 +74,6 @@ public function scopePopularLastWeek(Builder $builder): Builder
9374
9475 /**
9576 * Get the popular visits this month
96- *
97- * @param Builder $builder
98- * @return \Illuminate\Database\Eloquent\Builder
9977 */
10078 public function scopePopularThisMonth (Builder $ builder ): Builder
10179 {
@@ -107,9 +85,6 @@ public function scopePopularThisMonth(Builder $builder): Builder
10785
10886 /**
10987 * Get the popular visits last month
110- *
111- * @param Builder $builder
112- * @return \Illuminate\Database\Eloquent\Builder
11388 */
11489 public function scopePopularLastMonth (Builder $ builder ): Builder
11590 {
@@ -121,9 +96,6 @@ public function scopePopularLastMonth(Builder $builder): Builder
12196
12297 /**
12398 * Get the popular visits this year
124- *
125- * @param Builder $builder
126- * @return \Illuminate\Database\Eloquent\Builder
12799 */
128100 public function scopePopularThisYear (Builder $ builder ): Builder
129101 {
@@ -135,9 +107,6 @@ public function scopePopularThisYear(Builder $builder): Builder
135107
136108 /**
137109 * Get the popular visits last year
138- *
139- * @param Builder $builder
140- * @return \Illuminate\Database\Eloquent\Builder
141110 */
142111 public function scopePopularLastYear (Builder $ builder ): Builder
143112 {
@@ -149,26 +118,17 @@ public function scopePopularLastYear(Builder $builder): Builder
149118
150119 /**
151120 * Get the popular visits between two dates
152- *
153- * @param Builder $builder
154- * @param Carbon $from
155- * @param Carbon $to
156- * @return \Illuminate\Database\Eloquent\Builder
157121 */
158122 public function scopePopularBetween (Builder $ builder , Carbon $ from , Carbon $ to ): Builder
159123 {
160124 return $ builder ->whereHas ('visits ' , $ this ->betweenScope ($ from , $ to ))
161- ->withCount ([
162- 'visits as visit_count_total ' => $ this ->betweenScope ($ from , $ to ),
163- ]);
125+ ->withCount ([
126+ 'visits as visit_count_total ' => $ this ->betweenScope ($ from , $ to ),
127+ ]);
164128 }
165129
166130 /**
167131 * Get the popular visits between two dates
168- *
169- * @param Carbon $from
170- * @param Carbon $to
171- * @return Closure
172132 */
173133 protected function betweenScope (Carbon $ from , Carbon $ to ): Closure
174134 {
0 commit comments