Skip to content

Commit 2fab66f

Browse files
committed
minor #8809 Fix diff syntax (michaelperrin)
This PR was merged into the 4.0 branch. Discussion ---------- Fix diff syntax Here is a PR similar to #8802 . I made a find & replace in all files and I think this is the only one left that needed to be fixed :) There are some trailing whitespaces that got removed by my editor as well, but I think it's better not to have them. Commits ------- 4a2c192 Fix diff syntax
2 parents fd6e762 + 4a2c192 commit 2fab66f

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

doctrine/associations.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ it *is* possible, by writing clever methods. First, instead of a ``setProducts()
445445
method, create a ``addProduct()`` method::
446446

447447
// src/Entity/Category.php
448-
448+
449449
// ...
450450
class Category
451451
{
@@ -470,7 +470,7 @@ What about *removing* a ``Product`` from a ``Category``? Add a ``removeProduct()
470470
method::
471471

472472
// src/Entity/Category.php
473-
473+
474474
// ...
475475
class Category
476476
{
@@ -495,12 +495,12 @@ To make this work, you *now* need to allow ``null`` to be passed to ``Product::s
495495
{
496496
// ...
497497
498-
- public function getCategory(): Category
499-
+ public function getCategory(): ?Category
498+
- public function getCategory(): Category
499+
+ public function getCategory(): ?Category
500500
// ...
501501
502-
- public function setCategory(Category $category)
503-
+ public function setCategory(Category $category = null)
502+
- public function setCategory(Category $category)
503+
+ public function setCategory(Category $category = null)
504504
{
505505
$this->category = $category;
506506
}
@@ -514,7 +514,7 @@ to be *deleted* if it becomes "orphaned" (i.e. without a ``Category``)? To choos
514514
that behavior, use the `orphanRemoval`_ option inside ``Category``::
515515

516516
// src/Entity/Category.php
517-
517+
518518
// ...
519519

520520
/**

0 commit comments

Comments
 (0)