Skip to content

Commit

Permalink
Merge pull request #428 from greg0ire/valid-doc
Browse files Browse the repository at this point in the history
Add blank line after code block start
  • Loading branch information
greg0ire authored Feb 17, 2023
2 parents 85f1c1d + 0bc3f4c commit 4892c74
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/en/how-to/fixture-ordering.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Option 1: Controlling the order manually
----------------------------------------

.. code-block:: php
<?php
namespace MyDataFixtures;
Expand Down
8 changes: 8 additions & 0 deletions docs/en/how-to/loading-fixtures.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Fixture classes have two requirements:
without arguments.

.. code-block:: php
<?php
namespace MyDataFixtures;
Expand Down Expand Up @@ -50,6 +51,7 @@ Loading fixtures
To load a fixture, you can call ``Loader::addFixture()``:

.. code-block:: php
<?php
use Doctrine\Common\DataFixtures\Loader;
Expand All @@ -61,6 +63,7 @@ To load a fixture, you can call ``Loader::addFixture()``:
It is also possible to load a fixture by providing its path:

.. code-block:: php
<?php
$loader->loadFromFile('/path/to/MyDataFixtures/MyFixture1.php');
Expand All @@ -69,12 +72,14 @@ want to load a whole directory of fixtures instead of making one call
per fixture.

.. code-block:: php
<?php
$loader->loadFromDirectory('/path/to/MyDataFixtures');
You can get the added fixtures using the ``getFixtures()`` method:

.. code-block:: php
<?php
$fixtures = $loader->getFixtures();
Expand All @@ -87,6 +92,7 @@ store you are using. For example, if you are using ORM, you should
do the following:

.. code-block:: php
<?php
use Doctrine\Common\DataFixtures\Executor\ORMExecutor;
use Doctrine\Common\DataFixtures\Purger\ORMPurger;
Expand All @@ -104,6 +110,7 @@ If you want to append the fixtures instead of purging before loading
then pass ``append: true`` to the ``execute()`` method:

.. code-block:: php
<?php
$executor->execute($loader->getFixtures(), append: true);
Expand All @@ -114,5 +121,6 @@ want to wrap the purge and the load of every fixture in its own transaction.
To do so, you can use ``MultipleTransactionORMExecutor``.

.. code-block:: php
<?php
$executor = new MultipleTransactionORMExecutor($entityManager, new ORMPurger());
2 changes: 2 additions & 0 deletions docs/en/how-to/sharing-objects-between-fixtures.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ showing how to use the ``AbstractFixture`` class to do that.
<loading-fixtures>` is satisfied if you extend ``AbstractFixture``.

.. code-block:: php
<?php
namespace MyDataFixtures;
Expand Down Expand Up @@ -43,6 +44,7 @@ showing how to use the ``AbstractFixture`` class to do that.
And the ``User`` data loading fixture:

.. code-block:: php
<?php
namespace MyDataFixtures;
Expand Down

0 comments on commit 4892c74

Please sign in to comment.