File tree Expand file tree Collapse file tree 5 files changed +14
-6
lines changed Expand file tree Collapse file tree 5 files changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -11,4 +11,4 @@ parameters:
1111 checkOctaneCompatibility: true
1212 checkModelProperties: true
1313 checkMissingIterableValueType: false
14-
14+
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ interface CanVisit
77 /**
88 * keep track of your pages
99 *
10- * @return PendingVisit
10+ * @return \Coderflex\Laravisit\ PendingVisit
1111 */
1212 public function visit ();
1313
Original file line number Diff line number Diff line change 77use Coderflex \Laravisit \Presenters \VisitPresenter ;
88use Illuminate \Database \Eloquent \Model ;
99
10+ /**
11+ * Coderflex\Laravisit\Models\Visit
12+ * @property int $id
13+ * @property array $data
14+ * @property \Illuminate\Support\Carbon|null $created_at
15+ * @property \Illuminate\Support\Carbon|null $updated_at
16+ */
1017class Visit extends Model implements CanPresent
1118{
1219 use UsesPresenters;
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ public function __construct(protected Model $model)
3131 $ this ->isCrawler = $ crawlerDetect ->isCrawler ();
3232
3333 // set daily intervals by default
34- $ this ->dailyIntervals ();
34+ $ this ->dailyIntervals (); // @phpstan-ignore-line
3535 }
3636
3737 /**
@@ -127,9 +127,10 @@ public function __destruct()
127127 // we don't need to log the visit
128128 // because it's not a real visitor
129129 if ($ this ->isCrawler ) {
130- return null ;
130+ return ;
131131 }
132132
133+ // @phpstan-ignore-next-line
133134 $ visit = $ this ->model
134135 ->visits ()
135136 ->latest ()
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ class VisitPresenter extends Presenter
1414 */
1515 public function ip (): string
1616 {
17- return $ this ->model ->data ['ip ' ];
17+ return $ this ->model ->data ['ip ' ]; // @phpstan-ignore-line
1818 }
1919
2020 /**
@@ -24,7 +24,7 @@ public function ip(): string
2424 */
2525 public function user (): Model
2626 {
27- $ userId = $ this ->model ->data ['user_id ' ];
27+ $ userId = $ this ->model ->data ['user_id ' ]; // @phpstan-ignore-line
2828 $ userNamespace = config ('laravisit.user_namespace ' );
2929
3030 $ user = is_null ($ userNamespace ) || empty ($ userNamespace )
You can’t perform that action at this time.
0 commit comments