@@ -166,7 +166,7 @@ |
||
| 166 | 166 | * is still not loaded. |
| 167 | 167 | * |
| 168 | 168 | * @param string $className The name of the class for which the metadata should get loaded. |
| 169 | - * @return array |
|
| 169 | + * @return string[] |
|
| 170 | 170 | * @throws MappingException |
| 171 | 171 | */ |
| 172 | 172 | protected function loadMetadata($className) |
@@ -2,11 +2,11 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Doctrine\ODM\CouchDB\Mapping; |
| 4 | 4 | |
| 5 | -use Doctrine\ODM\CouchDB\DocumentManager, |
|
| 6 | - Doctrine\Common\Persistence\Mapping\Driver\MappingDriver, |
|
| 7 | - Doctrine\Common\Persistence\Mapping\ClassMetadata as ClassMetadataInterface, |
|
| 8 | - Doctrine\Common\Persistence\Mapping\ReflectionService, |
|
| 9 | - Doctrine\Common\Persistence\Mapping\AbstractClassMetadataFactory; |
|
| 5 | +use Doctrine\ODM\CouchDB\DocumentManager; |
|
| 6 | +use Doctrine\Common\Persistence\Mapping\Driver\MappingDriver; |
|
| 7 | +use Doctrine\Common\Persistence\Mapping\ClassMetadata as ClassMetadataInterface; |
|
| 8 | +use Doctrine\Common\Persistence\Mapping\ReflectionService; |
|
| 9 | +use Doctrine\Common\Persistence\Mapping\AbstractClassMetadataFactory; |
|
| 10 | 10 | |
| 11 | 11 | /** |
| 12 | 12 | * The ClassMetadataFactory is used to create ClassMetadata objects that contain all the |
@@ -2,13 +2,10 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Doctrine\ODM\CouchDB\Mapping\Driver; |
| 4 | 4 | |
| 5 | -use Doctrine\Common\Annotations\AnnotationReader, |
|
| 6 | - Doctrine\Common\Annotations\AnnotationRegistry, |
|
| 7 | - Doctrine\Common\Annotations\Reader, |
|
| 8 | - Doctrine\Common\Persistence\Mapping\ClassMetadata, |
|
| 9 | - Doctrine\Common\Persistence\Mapping\Driver\AnnotationDriver as AbstractAnnotationDriver, |
|
| 10 | - Doctrine\ODM\CouchDB\Mapping\Annotations as ODM, |
|
| 11 | - Doctrine\ODM\CouchDB\Mapping\MappingException; |
|
| 5 | +use Doctrine\Common\Persistence\Mapping\ClassMetadata; |
|
| 6 | +use Doctrine\Common\Persistence\Mapping\Driver\AnnotationDriver as AbstractAnnotationDriver; |
|
| 7 | +use Doctrine\ODM\CouchDB\Mapping\Annotations as ODM; |
|
| 8 | +use Doctrine\ODM\CouchDB\Mapping\MappingException; |
|
| 12 | 9 | |
| 13 | 10 | /** |
| 14 | 11 | * The AnnotationDriver reads the mapping metadata from docblock annotations. |
@@ -24,6 +24,7 @@ |
||
| 24 | 24 | |
| 25 | 25 | /** |
| 26 | 26 | * {@inheritDoc}
|
| 27 | + * @param string[] $locator |
|
| 27 | 28 | */ |
| 28 | 29 | public function __construct($locator, $fileExtension = self::DEFAULT_FILE_EXTENSION) |
| 29 | 30 | {
|
@@ -2,11 +2,10 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Doctrine\ODM\CouchDB\Mapping\Driver; |
| 4 | 4 | |
| 5 | -use Doctrine\Common\Persistence\Mapping\Driver\FileDriver, |
|
| 6 | - Doctrine\Common\Persistence\Mapping\ClassMetadata, |
|
| 7 | - Doctrine\ODM\CouchDB\Mapping\MappingException, |
|
| 8 | - Doctrine\Common\Persistence\Mapping\MappingException as DoctrineMappingException, |
|
| 9 | - SimpleXmlElement; |
|
| 5 | +use Doctrine\Common\Persistence\Mapping\Driver\FileDriver; |
|
| 6 | +use Doctrine\Common\Persistence\Mapping\ClassMetadata; |
|
| 7 | +use Doctrine\ODM\CouchDB\Mapping\MappingException; |
|
| 8 | +use Doctrine\Common\Persistence\Mapping\MappingException as DoctrineMappingException; |
|
| 10 | 9 | |
| 11 | 10 | /** |
| 12 | 11 | * XmlDriver is a metadata driver that enables mapping through XML files. |
@@ -2,11 +2,11 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Doctrine\ODM\CouchDB\Mapping\Driver; |
| 4 | 4 | |
| 5 | -use Doctrine\Common\Persistence\Mapping\Driver\FileDriver, |
|
| 6 | - Doctrine\Common\Persistence\Mapping\ClassMetadata, |
|
| 7 | - Doctrine\ODM\CouchDB\Mapping\MappingException, |
|
| 8 | - Doctrine\Common\Persistence\Mapping\MappingException as DoctrineMappingException, |
|
| 9 | - Symfony\Component\Yaml\Yaml; |
|
| 5 | +use Doctrine\Common\Persistence\Mapping\Driver\FileDriver; |
|
| 6 | +use Doctrine\Common\Persistence\Mapping\ClassMetadata; |
|
| 7 | +use Doctrine\ODM\CouchDB\Mapping\MappingException; |
|
| 8 | +use Doctrine\Common\Persistence\Mapping\MappingException as DoctrineMappingException; |
|
| 9 | +use Symfony\Component\Yaml\Yaml; |
|
| 10 | 10 | |
| 11 | 11 | /** |
| 12 | 12 | * The YamlDriver reads the mapping metadata from yaml schema files. |
@@ -24,6 +24,7 @@ |
||
| 24 | 24 | |
| 25 | 25 | /** |
| 26 | 26 | * {@inheritDoc}
|
| 27 | + * @param string[] $locator |
|
| 27 | 28 | */ |
| 28 | 29 | public function __construct($locator, $fileExtension = self::DEFAULT_FILE_EXTENSION) |
| 29 | 30 | {
|
@@ -21,6 +21,9 @@ |
||
| 21 | 21 | |
| 22 | 22 | private $metadataResolver; |
| 23 | 23 | |
| 24 | + /** |
|
| 25 | + * @param ClassMetadataFactory $metadataFactory |
|
| 26 | + */ |
|
| 24 | 27 | public function __construct($metadataFactory, $metadataResolver) |
| 25 | 28 | {
|
| 26 | 29 | $this->metadataFactory = $metadataFactory; |
@@ -2,9 +2,8 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Doctrine\ODM\CouchDB\Mapping; |
| 4 | 4 | |
| 5 | -use Doctrine\Common\Collections\ArrayCollection; |
|
| 6 | -use Doctrine\ODM\CouchDB\Mapping\ClassMetadata; |
|
| 7 | -use Doctrine\ODM\CouchDB\Types\Type; |
|
| 5 | +use Doctrine\Common\Collections\ArrayCollection; |
|
| 6 | +use Doctrine\ODM\CouchDB\Types\Type; |
|
| 8 | 7 | use Doctrine\Common\Util\ClassUtils; |
| 9 | 8 | |
| 10 | 9 | /** |
@@ -3,9 +3,9 @@ |
||
| 3 | 3 | |
| 4 | 4 | namespace Doctrine\ODM\CouchDB\Mapping\MetadataResolver; |
| 5 | 5 | |
| 6 | -use Doctrine\ODM\CouchDB\Mapping\ClassMetadata; |
|
| 7 | -use Doctrine\ODM\CouchDB\DocumentManager; |
|
| 8 | -use Doctrine\ODM\CouchDB\PersistentIdsCollection; |
|
| 6 | +use Doctrine\ODM\CouchDB\Mapping\ClassMetadata; |
|
| 7 | +use Doctrine\ODM\CouchDB\DocumentManager; |
|
| 8 | +use Doctrine\ODM\CouchDB\PersistentIdsCollection; |
|
| 9 | 9 | use Doctrine\Common\Collections\ArrayCollection; |
| 10 | 10 | |
| 11 | 11 | class DoctrineResolver implements MetadataResolver |
@@ -2,10 +2,10 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Doctrine\ODM\CouchDB\Tools\Console\Command; |
| 4 | 4 | |
| 5 | -use Symfony\Component\Console\Input\InputArgument, |
|
| 6 | - Symfony\Component\Console\Input\InputOption, |
|
| 7 | - Symfony\Component\Console, |
|
| 8 | - Doctrine\ODM\CouchDB\Tools\Console\MetadataFilter; |
|
| 5 | +use Symfony\Component\Console\Input\InputArgument; |
|
| 6 | +use Symfony\Component\Console\Input\InputOption; |
|
| 7 | +use Symfony\Component\Console; |
|
| 8 | +use Doctrine\ODM\CouchDB\Tools\Console\MetadataFilter; |
|
| 9 | 9 | |
| 10 | 10 | /** |
| 11 | 11 | * Command to (re)generate the proxy classes used by doctrine. |
@@ -2,11 +2,10 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Doctrine\ODM\CouchDB\Tools\Console\Command; |
| 4 | 4 | |
| 5 | -use Symfony\Component\Console\Input\InputArgument, |
|
| 6 | - Symfony\Component\Console\Input\InputOption, |
|
| 7 | - Symfony\Component\Console\Input\InputInterface, |
|
| 8 | - Symfony\Component\Console\Output\OutputInterface, |
|
| 9 | - Symfony\Component\Console\Command\Command; |
|
| 5 | +use Symfony\Component\Console\Input\InputArgument; |
|
| 6 | +use Symfony\Component\Console\Input\InputInterface; |
|
| 7 | +use Symfony\Component\Console\Output\OutputInterface; |
|
| 8 | +use Symfony\Component\Console\Command\Command; |
|
| 10 | 9 | |
| 11 | 10 | class UpdateDesignDocCommand extends Command |
| 12 | 11 | {
|
@@ -128,6 +128,9 @@ |
||
| 128 | 128 | $this->metadataResolver); |
| 129 | 129 | } |
| 130 | 130 | |
| 131 | + /** |
|
| 132 | + * @param string $documentName |
|
| 133 | + */ |
|
| 131 | 134 | private function assertValidDocumentType($documentName, $document, $type) |
| 132 | 135 | {
|
| 133 | 136 | if ($documentName && !($document instanceof $documentName)) {
|
@@ -2,12 +2,12 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Doctrine\ODM\CouchDB; |
| 4 | 4 | |
| 5 | -use Doctrine\CouchDB\Attachment; |
|
| 6 | -use Doctrine\ODM\CouchDB\Mapping\ClassMetadata; |
|
| 7 | -use Doctrine\ODM\CouchDB\Types\Type; |
|
| 8 | -use Doctrine\Common\Collections\Collection; |
|
| 9 | -use Doctrine\Common\Collections\ArrayCollection; |
|
| 10 | -use Doctrine\CouchDB\HTTP\HTTPException; |
|
| 5 | +use Doctrine\CouchDB\Attachment; |
|
| 6 | +use Doctrine\ODM\CouchDB\Mapping\ClassMetadata; |
|
| 7 | +use Doctrine\ODM\CouchDB\Types\Type; |
|
| 8 | +use Doctrine\Common\Collections\Collection; |
|
| 9 | +use Doctrine\Common\Collections\ArrayCollection; |
|
| 10 | +use Doctrine\CouchDB\HTTP\HTTPException; |
|
| 11 | 11 | use ProxyManager\Proxy\GhostObjectInterface; |
| 12 | 12 | |
| 13 | 13 | /** |