Skip to content

Commit

Permalink
Fix PHPStan issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ilestis committed Feb 21, 2024
1 parent c0af6ca commit 028b1ca
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
1 change: 0 additions & 1 deletion app/Http/Controllers/CrudController.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ class CrudController extends Controller

/**
* A sorter object for subviews
* @var null|DatagridSorter
*/
protected DatagridSorter $datagridSorter;

Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/Search/GameSystemSearchController.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function index(): JsonResponse
}

return response()->json(
$formatted ?? []
$formatted
);
}
}
2 changes: 1 addition & 1 deletion app/Jobs/Emails/Subscriptions/EmailValidationJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class EmailValidationJob implements ShouldQueue
use SerializesModels;

protected int $user;
protected string $token;
protected int $token;

/**
*/
Expand Down
1 change: 0 additions & 1 deletion app/Models/Tag.php
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,6 @@ public function allChildren(bool $withTags = false)
foreach ($this->entities->pluck('id')->toArray() as $entity) {
$children[] = $entity;
}
// @phpstan-ignore-next-line
foreach ($this->descendants as $desc) {
foreach ($desc->entities()->pluck('entities.id')->toArray() as $entity) {
$children[] = $entity;
Expand Down
6 changes: 4 additions & 2 deletions app/Services/Entity/EntityRelationService.php
Original file line number Diff line number Diff line change
Expand Up @@ -649,10 +649,12 @@ protected function addLocation(): self
return $this;
}

$this->addEntity($this->entity->child->location->entity);
/** @var Character|mixed $child */
$child = $this->entity->child;
$this->addEntity($child->location->entity);
$this->relations[] = [
'source' => $this->entity->id,
'target' => $this->entity->child->location->entity->id,
'target' => $child->location->entity->id,
'text' => Module::singular(config('entities.ids.location'), __('entities.location')),
'colour' => '#ccc',
'attitude' => null,
Expand Down

0 comments on commit 028b1ca

Please sign in to comment.