Skip to content

Commit ae6bfb0

Browse files
committed
update Visit Model and VisitPresenter
1 parent ab330bb commit ae6bfb0

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

src/Models/Visit.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@
77
use Coderflex\Laravisit\Presenters\VisitPresenter;
88
use 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+
*/
1017
class Visit extends Model implements CanPresent
1118
{
1219
use UsesPresenters;

src/Presenters/VisitPresenter.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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)

0 commit comments

Comments
 (0)