Skip to content

Commit

Permalink
Fix lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
murrant committed Apr 25, 2023
1 parent ac7c11b commit 97610f8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion app/Http/Controllers/Select/InventoryController.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,14 @@ protected function baseQuery($request)
->distinct();
}

private function fieldToColumn($field)
private function fieldToColumn(string $field): string
{
return match ($field) {
'name' => 'entPhysicalName',
'model' => 'entPhysicalModelName',
'descr' => 'entPhysicalDescr',
'class' => 'entPhysicalClass',
default => 'entPhysicalName',
};
}
}
2 changes: 1 addition & 1 deletion app/Http/Controllers/Table/InventoryController.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ protected function baseQuery($request)
public function formatItem($entPhysical)
{
return [
'device' => Url::deviceLink($entPhysical?->device),
'device' => Url::deviceLink($entPhysical->device),
'descr' => htmlspecialchars($entPhysical->entPhysicalDescr),
'name' => htmlspecialchars($entPhysical->entPhysicalName),
'model' => htmlspecialchars($entPhysical->entPhysicalModelName),
Expand Down

0 comments on commit 97610f8

Please sign in to comment.