This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

use only one single line if there is only one doctrine annotation

  • Loading branch information...
janpieper committed Nov 3, 2011
1 parent fc40bd0 commit c6296ae9c31baa06a526df71d5cbc6b51b233569
Showing with 10 additions and 30 deletions.
  1. +8 −24 en/reference/association-mapping.rst
  2. +2 −6 en/reference/working-with-objects.rst
@@ -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;
}
@@ -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;
}
@@ -135,9 +129,7 @@ a reference to their id:
.. code-block:: php
<?php
- /**
- * @Document
- */
+ /** @Document */
class User
{
/** @Id */
@@ -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;
}
@@ -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;
}
@@ -400,9 +400,7 @@ in the $addresses collection.
class User
{
//...
- /**
- * @ReferenceMany(targetDocument="Address", cascade={"persist", "remove"})
- */
+ /** @ReferenceMany(targetDocument="Address", cascade={"persist", "remove"}) */
private $addresses;
//...
}
@@ -521,9 +519,7 @@ in a central location.
use Doctrine\ODM\CouchDB\DocumentRepository;
- /**
- * @Document(repositoryClass="UserRepository")
- */
+ /** @Document(repositoryClass="UserRepository") */
class User
{

0 comments on commit c6296ae

Please sign in to comment.