@@ -21,11 +21,6 @@ |
||
| 21 | 21 | |
| 22 | 22 | use Doctrine\Common\Cache\Cache; |
| 23 | 23 | use Doctrine\Common\Persistence\Mapping\Driver\MappingDriver; |
| 24 | - |
|
| 25 | -use Doctrine\CouchDB\HTTP\Client; |
|
| 26 | -use Doctrine\CouchDB\HTTP\SocketClient; |
|
| 27 | -use Doctrine\CouchDB\HTTP\LoggingClient; |
|
| 28 | - |
|
| 29 | 24 | use Doctrine\ODM\CouchDB\Mapping\MetadataResolver\MetadataResolver; |
| 30 | 25 | use Doctrine\ODM\CouchDB\Mapping\MetadataResolver\DoctrineResolver; |
| 31 | 26 | use Doctrine\ODM\CouchDB\Migrations\DocumentMigration; |
@@ -250,7 +250,7 @@ |
||
| 250 | 250 | /** |
| 251 | 251 | * @param string $name |
| 252 | 252 | * @param string $className |
| 253 | - * @param array $options |
|
| 253 | + * @param string $options |
|
| 254 | 254 | */ |
| 255 | 255 | public function addDesignDocument($name, $className, $options) |
| 256 | 256 | { |
@@ -26,6 +26,9 @@ |
||
| 26 | 26 | |
| 27 | 27 | private $documentManager; |
| 28 | 28 | |
| 29 | + /** |
|
| 30 | + * @param \Doctrine\ODM\CouchDB\DocumentManager $documentManager |
|
| 31 | + */ |
|
| 29 | 32 | function __construct($document, $documentManager) |
| 30 | 33 | { |
| 31 | 34 | $this->document = $document; |
@@ -2,10 +2,10 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Doctrine\ODM\CouchDB\Mapping; |
| 4 | 4 | |
| 5 | -use Doctrine\Common\Persistence\Mapping\ClassMetadata AS IClassMetadata, |
|
| 6 | - Doctrine\Instantiator\Instantiator, |
|
| 7 | - ReflectionClass, |
|
| 8 | - ReflectionProperty; |
|
| 5 | +use Doctrine\Common\Persistence\Mapping\ClassMetadata as IClassMetadata; |
|
| 6 | +use Doctrine\Instantiator\Instantiator; |
|
| 7 | +use ReflectionClass; |
|
| 8 | +use ReflectionProperty; |
|
| 9 | 9 | |
| 10 | 10 | /** |
| 11 | 11 | * Metadata class |
@@ -270,7 +270,7 @@ discard block |
||
| 270 | 270 | * - reflClass (ReflectionClass) |
| 271 | 271 | * - reflFields (ReflectionProperty array) |
| 272 | 272 | * |
| 273 | - * @return array The names of all the fields that should be serialized. |
|
| 273 | + * @return string[] The names of all the fields that should be serialized. |
|
| 274 | 274 | */ |
| 275 | 275 | public function __sleep() |
| 276 | 276 | { |
@@ -330,6 +330,7 @@ discard block |
||
| 330 | 330 | |
| 331 | 331 | /** |
| 332 | 332 | * Restores some state that can not be serialized/unserialized. |
| 333 | + * @param \Doctrine\Common\Persistence\Mapping\RuntimeReflectionService $reflService |
|
| 333 | 334 | */ |
| 334 | 335 | public function wakeupReflection($reflService) |
| 335 | 336 | { |
@@ -518,7 +519,7 @@ discard block |
||
| 518 | 519 | * Since CouchDB only allows exactly one identifier field this is a proxy |
| 519 | 520 | * to {@see getIdentifier()} and returns an array. |
| 520 | 521 | * |
| 521 | - * @return array |
|
| 522 | + * @return string[] |
|
| 522 | 523 | */ |
| 523 | 524 | public function getIdentifierFieldNames() |
| 524 | 525 | { |
@@ -19,13 +19,10 @@ |
||
| 19 | 19 | |
| 20 | 20 | namespace Doctrine\ODM\CouchDB\Mapping\Driver; |
| 21 | 21 | |
| 22 | -use Doctrine\Common\Annotations\AnnotationReader, |
|
| 23 | - Doctrine\Common\Annotations\AnnotationRegistry, |
|
| 24 | - Doctrine\Common\Annotations\Reader, |
|
| 25 | - Doctrine\Common\Persistence\Mapping\ClassMetadata, |
|
| 26 | - Doctrine\Common\Persistence\Mapping\Driver\AnnotationDriver as AbstractAnnotationDriver, |
|
| 27 | - Doctrine\ODM\CouchDB\Mapping\Annotations as ODM, |
|
| 28 | - Doctrine\ODM\CouchDB\Mapping\MappingException; |
|
| 22 | +use Doctrine\Common\Persistence\Mapping\ClassMetadata; |
|
| 23 | +use Doctrine\Common\Persistence\Mapping\Driver\AnnotationDriver as AbstractAnnotationDriver; |
|
| 24 | +use Doctrine\ODM\CouchDB\Mapping\Annotations as ODM; |
|
| 25 | +use Doctrine\ODM\CouchDB\Mapping\MappingException; |
|
| 29 | 26 | |
| 30 | 27 | /** |
| 31 | 28 | * The AnnotationDriver reads the mapping metadata from docblock annotations. |
@@ -41,6 +41,7 @@ |
||
| 41 | 41 | |
| 42 | 42 | /** |
| 43 | 43 | * {@inheritDoc} |
| 44 | + * @param string[] $locator |
|
| 44 | 45 | */ |
| 45 | 46 | public function __construct($locator, $fileExtension = self::DEFAULT_FILE_EXTENSION) |
| 46 | 47 | { |
@@ -19,11 +19,10 @@ |
||
| 19 | 19 | |
| 20 | 20 | namespace Doctrine\ODM\CouchDB\Mapping\Driver; |
| 21 | 21 | |
| 22 | -use Doctrine\Common\Persistence\Mapping\Driver\FileDriver, |
|
| 23 | - Doctrine\Common\Persistence\Mapping\ClassMetadata, |
|
| 24 | - Doctrine\ODM\CouchDB\Mapping\MappingException, |
|
| 25 | - Doctrine\Common\Persistence\Mapping\MappingException as DoctrineMappingException, |
|
| 26 | - SimpleXmlElement; |
|
| 22 | +use Doctrine\Common\Persistence\Mapping\Driver\FileDriver; |
|
| 23 | +use Doctrine\Common\Persistence\Mapping\ClassMetadata; |
|
| 24 | +use Doctrine\ODM\CouchDB\Mapping\MappingException; |
|
| 25 | +use Doctrine\Common\Persistence\Mapping\MappingException as DoctrineMappingException; |
|
| 27 | 26 | |
| 28 | 27 | /** |
| 29 | 28 | * XmlDriver is a metadata driver that enables mapping through XML files. |
@@ -19,11 +19,11 @@ |
||
| 19 | 19 | |
| 20 | 20 | namespace Doctrine\ODM\CouchDB\Mapping\Driver; |
| 21 | 21 | |
| 22 | -use Doctrine\Common\Persistence\Mapping\Driver\FileDriver, |
|
| 23 | - Doctrine\Common\Persistence\Mapping\ClassMetadata, |
|
| 24 | - Doctrine\ODM\CouchDB\Mapping\MappingException, |
|
| 25 | - Doctrine\Common\Persistence\Mapping\MappingException as DoctrineMappingException, |
|
| 26 | - Symfony\Component\Yaml\Yaml; |
|
| 22 | +use Doctrine\Common\Persistence\Mapping\Driver\FileDriver; |
|
| 23 | +use Doctrine\Common\Persistence\Mapping\ClassMetadata; |
|
| 24 | +use Doctrine\ODM\CouchDB\Mapping\MappingException; |
|
| 25 | +use Doctrine\Common\Persistence\Mapping\MappingException as DoctrineMappingException; |
|
| 26 | +use Symfony\Component\Yaml\Yaml; |
|
| 27 | 27 | |
| 28 | 28 | /** |
| 29 | 29 | * The YamlDriver reads the mapping metadata from yaml schema files. |
@@ -41,6 +41,7 @@ |
||
| 41 | 41 | |
| 42 | 42 | /** |
| 43 | 43 | * {@inheritDoc} |
| 44 | + * @param string[] $locator |
|
| 44 | 45 | */ |
| 45 | 46 | public function __construct($locator, $fileExtension = self::DEFAULT_FILE_EXTENSION) |
| 46 | 47 | { |
@@ -38,6 +38,9 @@ |
||
| 38 | 38 | |
| 39 | 39 | private $metadataResolver; |
| 40 | 40 | |
| 41 | + /** |
|
| 42 | + * @param ClassMetadataFactory $metadataFactory |
|
| 43 | + */ |
|
| 41 | 44 | public function __construct($metadataFactory, $metadataResolver) |
| 42 | 45 | { |
| 43 | 46 | $this->metadataFactory = $metadataFactory; |
@@ -20,7 +20,6 @@ |
||
| 20 | 20 | namespace Doctrine\ODM\CouchDB\Mapping; |
| 21 | 21 | |
| 22 | 22 | use Doctrine\Common\Collections\ArrayCollection; |
| 23 | -use Doctrine\ODM\CouchDB\Mapping\ClassMetadata; |
|
| 24 | 23 | use Doctrine\ODM\CouchDB\Types\Type; |
| 25 | 24 | use Doctrine\Common\Util\ClassUtils; |
| 26 | 25 | |
@@ -145,6 +145,9 @@ |
||
| 145 | 145 | $this->metadataResolver); |
| 146 | 146 | } |
| 147 | 147 | |
| 148 | + /** |
|
| 149 | + * @param string $documentName |
|
| 150 | + */ |
|
| 148 | 151 | private function assertValidDocumentType($documentName, $document, $type) |
| 149 | 152 | { |
| 150 | 153 | if ($documentName && !($document instanceof $documentName)) { |
@@ -46,6 +46,9 @@ |
||
| 46 | 46 | return $this->logger; |
| 47 | 47 | } |
| 48 | 48 | |
| 49 | + /** |
|
| 50 | + * @return string |
|
| 51 | + */ |
|
| 49 | 52 | public function getTestDatabase() |
| 50 | 53 | { |
| 51 | 54 | return TestUtil::getTestDatabase(); |
@@ -8,7 +8,6 @@ |
||
| 8 | 8 | use Doctrine\ODM\CouchDB\Configuration; |
| 9 | 9 | use Doctrine\ODM\CouchDB\Mapping\Driver\AnnotationDriver; |
| 10 | 10 | use Doctrine\Common\Cache\ArrayCache; |
| 11 | -use Doctrine\Common\Annotations\AnnotationReader; |
|
| 12 | 11 | |
| 13 | 12 | abstract class CouchDBFunctionalTestCase extends \PHPUnit_Framework_TestCase |
| 14 | 13 | { |