Skip to content

Commit 4c0010c

Browse files
committed
Merge remote-tracking branch 'origin/develop' into develop
2 parents a4761d3 + dcbceab commit 4c0010c

7 files changed

Lines changed: 203 additions & 199 deletions

File tree

src/Exports/Exporters/BaseImportUsedDataExporter.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,8 @@ protected function processRecordForImportUsed(Model $record, $fs, ?string $dir,
127127
}
128128

129129
/**
130-
* @param \Illuminate\Database\Eloquent\Builder $query
131-
* @param string $type
130+
* @param \Illuminate\Database\Eloquent\Builder $query
131+
* @param string $type
132132
* @return \Illuminate\Database\Eloquent\Builder
133133
*/
134134
protected function buildExportingQueryForImportUsed($query, $type)

src/Exports/Exporters/ImportUsedExporter.php

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@ public function export()
3636
if (blank($currentExportingFolder)) {
3737
return ExportResult::failed('No export folder selected. Please select at least one export type.');
3838
}
39-
39+
4040
[$folderName, $fs, $fullPath, $subFolders] = $this->ensureTempFolderForExport('import_used', $targetFolders);
4141

4242
$errors = [];
4343

4444
foreach ($records->items() as $record) {
45-
45+
4646
$this->processRecordForImportUsed(
4747
$record,
4848
$fs,
@@ -61,7 +61,7 @@ public function export()
6161
if ($isLastFolder && $isCurrentStepFinished) {
6262
return $this->handleExportCompletion($folderName, $processingErrors);
6363
}
64-
64+
6565
$processingData['folderName'] = $folderName;
6666
$processingData['errors'] = $processingErrors;
6767
$processingData['__steps'][$currentExportingFolder]['nextPage'] = $page + 1;
@@ -71,7 +71,7 @@ public function export()
7171
// Get next step
7272
$currentIndex = array_search($currentExportingFolder, $targetFolders);
7373
$nextIndex = $currentIndex !== false ? $currentIndex + 1 : 0;
74-
74+
7575
if ($nextIndex < count($targetFolders)) {
7676
$processingData['nextStep'] = $targetFolders[$nextIndex];
7777
} else {
@@ -164,16 +164,15 @@ protected static function getFilterRecordsFor(string $type)
164164
{
165165
$query = static::getBaseQueryForModel($type);
166166

167-
if (!$query) {
167+
if (! $query) {
168168
return collect();
169169
}
170170

171171
return $query->get();
172172
}
173173

174174
/**
175-
* @param string $type
176-
* @param Collection<Model> $records
175+
* @param Collection<Model> $records
177176
* @return array
178177
*/
179178
private static function buildOptionsFor(string $type, $records)
@@ -196,17 +195,17 @@ private static function buildOptionsFor(string $type, $records)
196195
$label = $record->title;
197196
} elseif ($record instanceof ModelContracts\Navigation) {
198197
$label = "{$record->title} ({$record->type})";
199-
}
200-
198+
}
199+
201200
$results[$key] = $label ?? $key;
202201

203202
}
204203

205204
return $results;
206205
}
206+
207207
/**
208-
* @param string $type
209-
* @param Collection<Model> $records
208+
* @param Collection<Model> $records
210209
* @return array
211210
*/
212211
private static function buildOptionDescriptionsFor(string $type, $records)
@@ -229,8 +228,8 @@ private static function buildOptionDescriptionsFor(string $type, $records)
229228
$label = $record->slug;
230229
} elseif ($record instanceof ModelContracts\Navigation) {
231230
$label = "{$record->category}";
232-
}
233-
231+
}
232+
234233
$results[$key] = $label ?? $key;
235234

236235
}

0 commit comments

Comments
 (0)