@@ -188,6 +188,9 @@ discard block |
||
188 | 188 | return $this->snapshot; |
189 | 189 | } |
190 | 190 | |
191 | + /** |
|
192 | + * @param boolean $state |
|
193 | + */ |
|
191 | 194 | public function setInitialized($state) |
192 | 195 | { |
193 | 196 | $this->initialized = (bool)$state; |
@@ -452,7 +455,7 @@ discard block |
||
452 | 455 | * Internal note: Tried to implement Serializable first but that did not work well |
453 | 456 | * with circular references. This solution seems simpler and works well. |
454 | 457 | * |
455 | - * @return array |
|
458 | + * @return string[] |
|
456 | 459 | */ |
457 | 460 | public function __sleep() |
458 | 461 | { |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | } |
173 | 173 | |
174 | 174 | /** |
175 | - * @param $className |
|
175 | + * @param string $className |
|
176 | 176 | * @param \stdClass $data |
177 | 177 | * |
178 | 178 | * @return ObjectManagerAware|object |
@@ -230,7 +230,7 @@ discard block |
||
230 | 230 | * INTERNAL: |
231 | 231 | * Registers an entity as managed. |
232 | 232 | * |
233 | - * @param object $entity The entity. |
|
233 | + * @param Proxy $entity The entity. |
|
234 | 234 | * @param array $id The identifier values. |
235 | 235 | * @param \stdClass|null $data The original entity data. |
236 | 236 | * |
@@ -50,7 +50,7 @@ |
||
50 | 50 | } |
51 | 51 | |
52 | 52 | /** |
53 | - * @param $className |
|
53 | + * @param string $className |
|
54 | 54 | * |
55 | 55 | * @return \ReflectionProperty[] indexed by property internal name |
56 | 56 | */ |
@@ -6,11 +6,17 @@ discard block |
||
6 | 6 | |
7 | 7 | class MappingException extends BaseMappingException implements DoctrineApiException |
8 | 8 | { |
9 | + /** |
|
10 | + * @param string $alias |
|
11 | + */ |
|
9 | 12 | public static function unknownAlias($alias) |
10 | 13 | { |
11 | 14 | return new self(sprintf('Unknown namespace alias "%s"', $alias)); |
12 | 15 | } |
13 | 16 | |
17 | + /** |
|
18 | + * @param string $class |
|
19 | + */ |
|
14 | 20 | public static function noSuchProperty($property, $class) |
15 | 21 | { |
16 | 22 | return new self( |
@@ -20,6 +26,9 @@ discard block |
||
20 | 26 | ); |
21 | 27 | } |
22 | 28 | |
29 | + /** |
|
30 | + * @param string $class |
|
31 | + */ |
|
23 | 32 | public static function noClientSpecified($class) |
24 | 33 | { |
25 | 34 | return new self(sprintf('Client not specified for %s or any parent', $class)); |
@@ -30,6 +39,9 @@ discard block |
||
30 | 39 | return new self(sprintf('Could not resolve client "%s": %s', $name, $message)); |
31 | 40 | } |
32 | 41 | |
42 | + /** |
|
43 | + * @param string $class |
|
44 | + */ |
|
33 | 45 | public static function noApiSpecified($class) |
34 | 46 | { |
35 | 47 | return new self(sprintf('API factory not specified for %s or any parent', $class)); |
@@ -40,11 +52,18 @@ discard block |
||
40 | 52 | return new self(sprintf('Could not resolve API factory "%s": %s', $name, $message)); |
41 | 53 | } |
42 | 54 | |
55 | + /** |
|
56 | + * @param string $class |
|
57 | + */ |
|
43 | 58 | public static function unknownField($field, $class) |
44 | 59 | { |
45 | 60 | return new self(sprintf('No mapping for field "%s" in %s', $field, $class)); |
46 | 61 | } |
47 | 62 | |
63 | + /** |
|
64 | + * @param string $field |
|
65 | + * @param string $class |
|
66 | + */ |
|
48 | 67 | public static function unknownAssociation($field, $class) |
49 | 68 | { |
50 | 69 | return new self(sprintf('No mapping for association "%s" in %s', $field, $class)); |
@@ -65,31 +84,51 @@ discard block |
||
65 | 84 | return new static(sprintf('Unknown factory to create API: %s', $alias)); |
66 | 85 | } |
67 | 86 | |
87 | + /** |
|
88 | + * @param string $alias |
|
89 | + */ |
|
68 | 90 | public static function nameIsMandatoryForDiscriminatorColumns($alias) |
69 | 91 | { |
70 | 92 | return new static(sprintf('Name is mandatory for discriminator column: %s', $alias)); |
71 | 93 | } |
72 | 94 | |
95 | + /** |
|
96 | + * @param string $alias |
|
97 | + */ |
|
73 | 98 | public static function duplicateColumnName($alias, $column) |
74 | 99 | { |
75 | 100 | return new static(sprintf('Duplicate column name "%s": %s', $column, $alias)); |
76 | 101 | } |
77 | 102 | |
103 | + /** |
|
104 | + * @param string $alias |
|
105 | + * @param string $type |
|
106 | + */ |
|
78 | 107 | public static function invalidDiscriminatorColumnType($alias, $type) |
79 | 108 | { |
80 | 109 | return new static(sprintf('Invalud discriminator column type "%s": %s', $type, $alias)); |
81 | 110 | } |
82 | 111 | |
112 | + /** |
|
113 | + * @param string $name |
|
114 | + * @param string $rootEntityName |
|
115 | + */ |
|
83 | 116 | public static function mappedClassNotPartOfDiscriminatorMap($name, $rootEntityName) |
84 | 117 | { |
85 | 118 | return new static(sprintf('Mapped class "%s" is not a part of discriminator map: %s', $name, $rootEntityName)); |
86 | 119 | } |
87 | 120 | |
121 | + /** |
|
122 | + * @param string $alias |
|
123 | + */ |
|
88 | 124 | public static function unknownDiscriminatorValue($value, $alias) |
89 | 125 | { |
90 | 126 | return new static(sprintf('Unknown discriminator value "%s": %s', $value, $alias)); |
91 | 127 | } |
92 | 128 | |
129 | + /** |
|
130 | + * @param string $name |
|
131 | + */ |
|
93 | 132 | public static function duplicateDiscriminatorEntry($name, array $duplicates, array $map) |
94 | 133 | { |
95 | 134 | return new static( |
@@ -97,6 +136,10 @@ discard block |
||
97 | 136 | ); |
98 | 137 | } |
99 | 138 | |
139 | + /** |
|
140 | + * @param string $className |
|
141 | + * @param string $name |
|
142 | + */ |
|
100 | 143 | public static function invalidClassInDiscriminatorMap($className, $name) |
101 | 144 | { |
102 | 145 | return new static( |
@@ -38,7 +38,7 @@ |
||
38 | 38 | private $factoryRegistry; |
39 | 39 | |
40 | 40 | /** |
41 | - * @return mixed |
|
41 | + * @return ClientRegistryInterface |
|
42 | 42 | */ |
43 | 43 | public function getClientRegistry() |
44 | 44 | { |