ran pint over the whole application

This commit is contained in:
2026-03-19 12:39:58 +01:00
parent dbafa6c99c
commit 1cb157da42
7 changed files with 10 additions and 13 deletions

View File

@@ -12,16 +12,17 @@
final class DownloadExcel extends BaseDownloadExcel
{
protected $onlyIndexFields = false;
/**
* @param Model|mixed $row
*/
public function map($row): array
{
$only = array_map('strval', $this->getOnly());
$only = array_map('strval', $this->getOnly());
$except = $this->getExcept();
if ($row instanceof Model) {
if (!$this->onlyIndexFields && $except === null && (!is_array($only) || count($only) === 0)) {
if (! $this->onlyIndexFields && $except === null && (! is_array($only) || count($only) === 0)) {
$except = $row->getHidden();
}
@@ -43,11 +44,11 @@ public function map($row): array
protected function replaceFieldValuesWhenOnResource(Model $model, array $only = []): array
{
$resource = $this->resolveResource($model);
$fields = $this->resourceFields($resource);
$fields = $this->resourceFields($resource);
$row = [];
foreach ($fields as $field) {
if (!$this->isExportableField($field)) {
if (! $this->isExportableField($field)) {
continue;
}