@@ -35,9 +35,9 @@ the ``Application::bootstrap()`` function::
3535Configuration
3636=============
3737
38- The following configuration should be present in your **config/app.php **::
38+ The following configuration should be present in the config array of your **config/app.php **::
3939
40- $config = [
40+ // ...
4141 'Queue' => [
4242 'default' => [
4343 // A DSN for your configured backend. default: null
@@ -53,8 +53,8 @@ The following configuration should be present in your **config/app.php**::
5353 // The name of an event listener class to associate with the worker
5454 'listener' => \App\Listener\WorkerListener::class,
5555 ]
56- ]
57- ];
56+ ],
57+ // ...
5858
5959The ``Queue `` config key can contain one or more queue configurations. Each of
6060these is used for interacting with a different queuing backend.
@@ -69,6 +69,8 @@ Create a Job class::
6969
7070 <?php
7171 // src/Job/ExampleJob.php
72+ declare(strict_types=1);
73+
7274 namespace App\Job;
7375
7476 use Cake\Log\LogTrait;
@@ -182,6 +184,8 @@ mailer class. The following example shows how to setup the trait within a mailer
182184class::
183185
184186 <?php
187+ declare(strict_types=1);
188+
185189 namespace App\Mailer;
186190
187191 use Cake\Mailer\Mailer;
@@ -191,7 +195,7 @@ class::
191195 {
192196 use QueueTrait;
193197
194- public function welcome($emailAddress, $username)
198+ public function welcome(string $emailAddress, string $username): void
195199 {
196200 $this
197201 ->setTo($emailAddress)
@@ -218,14 +222,7 @@ a ``Processor:ACK``.
218222The exposed ``QueueTrait::push() `` method has a similar signature to
219223``Mailer::send() ``, and also supports an ``$options `` array argument. The
220224options this array holds are the same options as those available for
221- ``QueueManager::push() ``, and additionally supports the following:
222-
223- - ``emailClass ``:
224-
225- - default: ``Cake\Mailer\Email::class ``
226- - description: The name of an email class to instantiate for use with the mailer
227- - type: string
228-
225+ ``QueueManager::push() ``.
229226
230227Run the worker
231228==============
0 commit comments