Skip to content

Commit 63c7050

Browse files
committed
Merge branch '6.1' into 6.2
* 6.1: [Uid] Use constructor property promotion for UuidFactory and UlidFactory examples
2 parents 2ba5d7d + d423b51 commit 63c7050

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

components/uid.rst

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -161,11 +161,8 @@ on the configuration you defined::
161161

162162
class FooService
163163
{
164-
private UuidFactory $uuidFactory;
165-
166-
public function __construct(UuidFactory $uuidFactory)
164+
public function __construct(private UuidFactory $uuidFactory)
167165
{
168-
$this->uuidFactory = $uuidFactory;
169166
}
170167

171168
public function generate(): void
@@ -365,11 +362,8 @@ Like UUIDs, ULIDs have their own factory, ``UlidFactory``, that can be used to g
365362

366363
class FooService
367364
{
368-
private UlidFactory $ulidFactory;
369-
370-
public function __construct(UlidFactory $ulidFactory)
365+
public function __construct(private UlidFactory $ulidFactory)
371366
{
372-
$this->ulidFactory = $ulidFactory;
373367
}
374368

375369
public function generate(): void

0 commit comments

Comments
 (0)