Skip to content
This repository has been archived by the owner on Apr 2, 2018. It is now read-only.

Commit

Permalink
use only one single line if there is only one doctrine annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
janpieper committed Nov 3, 2011
1 parent fc40bd0 commit c6296ae
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 30 deletions.
32 changes: 8 additions & 24 deletions en/reference/association-mapping.rst
Expand Up @@ -30,17 +30,13 @@ You can have a reference between two documents by a reference one relationship i
.. code-block:: php
<?php
/**
* @Document
*/
/** @Document */
class Article
{
/** @Id */
private $id;
/**
* @ReferenceOne(targetDocument="User")
*/
/** @ReferenceOne(targetDocument="User") */
private $author;
}
Expand Down Expand Up @@ -86,9 +82,7 @@ You can have a reference between a document and a set of related documents in th
/** @Id */
private $id;
/**
* @ReferenceMany(targetDocument="Comment")
*/
/** @ReferenceMany(targetDocument="Comment") */
private $comments;
}
Expand Down Expand Up @@ -135,9 +129,7 @@ a reference to their id:
.. code-block:: php
<?php
/**
* @Document
*/
/** @Document */
class User
{
/** @Id */
Expand Down Expand Up @@ -174,17 +166,13 @@ You can embed a class into a document. Both will be saved in the same CouchDB do
.. code-block:: php
<?php
/**
* @Document
*/
/** @Document */
class User
{
/** @Id */
private $id;
/**
* @EmbedOne
*/
/** @EmbedOne */
private $address;
}
Expand Down Expand Up @@ -212,17 +200,13 @@ You can embed an array of classes into a document.
.. code-block:: php
<?php
/**
* @Document
*/
/** @Document */
class User
{
/** @Id */
private $id;
/**
* @EmbedMany
*/
/** @EmbedMany */
private $phonenumbers;
}
Expand Down
8 changes: 2 additions & 6 deletions en/reference/working-with-objects.rst
Expand Up @@ -400,9 +400,7 @@ in the $addresses collection.
class User
{
//...
/**
* @ReferenceMany(targetDocument="Address", cascade={"persist", "remove"})
*/
/** @ReferenceMany(targetDocument="Address", cascade={"persist", "remove"}) */
private $addresses;
//...
}
Expand Down Expand Up @@ -521,9 +519,7 @@ in a central location.
use Doctrine\ODM\CouchDB\DocumentRepository;
/**
* @Document(repositoryClass="UserRepository")
*/
/** @Document(repositoryClass="UserRepository") */
class User
{
Expand Down

0 comments on commit c6296ae

Please sign in to comment.