Skip to content

Commit b5f1963

Browse files
committed
Add types to example codes.
1 parent 40bdee9 commit b5f1963

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

docs/en/index.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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
182184
class::
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)

0 commit comments

Comments
 (0)