Skip to content

Commit 65b0889

Browse files
committed
Restore compact() for matching view vars
1 parent 42eb8af commit 65b0889

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

src/Controller/Admin/QueueProcessesController.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public function initialize(): void {
4848
public function index() {
4949
$queueProcesses = $this->paginate();
5050

51-
$this->set(['queueProcesses' => $queueProcesses]);
51+
$this->set(compact('queueProcesses'));
5252
}
5353

5454
/**
@@ -61,7 +61,7 @@ public function index() {
6161
public function view(?int $id = null) {
6262
$queueProcess = $this->QueueProcesses->get($id);
6363

64-
$this->set(['queueProcess' => $queueProcess]);
64+
$this->set(compact('queueProcess'));
6565
}
6666

6767
/**
@@ -84,7 +84,7 @@ public function edit(?int $id = null) {
8484
$this->Flash->error(__d('queue', 'The queue process could not be saved. Please, try again.'));
8585
}
8686

87-
$this->set(['queueProcess' => $queueProcess]);
87+
$this->set(compact('queueProcess'));
8888
}
8989

9090
/**

src/Controller/Admin/QueuedJobsController.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,15 +75,15 @@ public function index() {
7575
}
7676
$queuedJobs = $this->paginate($query);
7777

78-
$this->set(['queuedJobs' => $queuedJobs]);
78+
$this->set(compact('queuedJobs'));
7979

8080
if (Configure::read('Queue.isSearchEnabled') !== false && Plugin::isLoaded('Search')) {
8181
$jobTypes = $this->QueuedJobs->find()->where()->find(
8282
'list',
8383
keyField: 'job_task',
8484
valueField: 'job_task',
8585
)->distinct('job_task')->toArray();
86-
$this->set(['jobTypes' => $jobTypes]);
86+
$this->set(compact('jobTypes'));
8787
}
8888
}
8989

@@ -173,7 +173,7 @@ public function view(?int $id = null) {
173173
$this->response = $this->response->withDownload('queued-job-' . $id . '.json');
174174
}
175175

176-
$this->set(['queuedJob' => $queuedJob]);
176+
$this->set(compact('queuedJob'));
177177
$this->viewBuilder()->setOption('serialize', ['queuedJob']);
178178
}
179179

@@ -286,7 +286,7 @@ public function edit(?int $id = null) {
286286
$this->Flash->error(__d('queue', 'The queued job could not be saved. Please try again.'));
287287
}
288288

289-
$this->set(['queuedJob' => $queuedJob]);
289+
$this->set(compact('queuedJob'));
290290
}
291291

292292
/**
@@ -322,7 +322,7 @@ public function data(?int $id = null) {
322322
}
323323
}
324324

325-
$this->set(['queuedJob' => $queuedJob]);
325+
$this->set(compact('queuedJob'));
326326
}
327327

328328
/**
@@ -488,7 +488,7 @@ public function migrate() {
488488
return $this->redirect(['action' => 'migrate']);
489489
}
490490

491-
$this->set(['tasks' => $tasks]);
491+
$this->set(compact('tasks'));
492492
}
493493

494494
}

0 commit comments

Comments
 (0)