@@ -69,6 +69,10 @@ discard block |
||
69 | 69 | ); |
70 | 70 | } |
71 | 71 | |
72 | + /** |
|
73 | + * @param string $entityClassName |
|
74 | + * @param string|null $relationType |
|
75 | + */ |
|
72 | 76 | protected function getEntityChoiceList($entityClassName, $relationType) |
73 | 77 | { |
74 | 78 | $choices = []; |
@@ -82,6 +86,10 @@ discard block |
||
82 | 86 | if (in_array($relationType, [RelationTypeBase::ONE_TO_MANY, RelationTypeBase::MANY_TO_MANY], true)) { |
83 | 87 | $entityIds = array_filter( |
84 | 88 | $entityIds, |
89 | + |
|
90 | + /** |
|
91 | + * @param string $configId |
|
92 | + */ |
|
85 | 93 | function (EntityConfigId $configId) { |
86 | 94 | $config = $this->configManager->getConfig($configId); |
87 | 95 | |
@@ -92,6 +100,10 @@ discard block |
||
92 | 100 | |
93 | 101 | $entityIds = array_filter( |
94 | 102 | $entityIds, |
103 | + |
|
104 | + /** |
|
105 | + * @param string $configId |
|
106 | + */ |
|
95 | 107 | function (EntityConfigId $configId) { |
96 | 108 | $config = $this->configManager->getConfig($configId); |
97 | 109 |
@@ -3,7 +3,6 @@ |
||
3 | 3 | namespace Oro\Component\PropertyAccess\Tests\Unit; |
4 | 4 | |
5 | 5 | use Symfony\Component\PropertyAccess\Exception\NoSuchPropertyException; |
6 | - |
|
7 | 6 | use Oro\Component\PropertyAccess\PropertyAccessor; |
8 | 7 | use Oro\Component\PropertyAccess\Tests\Unit\Fixtures\TestClass; |
9 | 8 | use Oro\Component\PropertyAccess\Tests\Unit\Fixtures\TestClassMagicCall; |
@@ -234,7 +234,7 @@ |
||
234 | 234 | * |
235 | 235 | * @param array $options |
236 | 236 | * @param string $name |
237 | - * @return mixed |
|
237 | + * @return string|null |
|
238 | 238 | */ |
239 | 239 | protected function getAndRemoveOption(array &$options, $name) |
240 | 240 | { |
@@ -226,6 +226,9 @@ discard block |
||
226 | 226 | } |
227 | 227 | } |
228 | 228 | |
229 | + /** |
|
230 | + * @param string $associationName |
|
231 | + */ |
|
229 | 232 | protected function renameManyToOneExtendField( |
230 | 233 | Schema $schema, |
231 | 234 | QueryBag $queries, |
@@ -247,6 +250,9 @@ discard block |
||
247 | 250 | } |
248 | 251 | } |
249 | 252 | |
253 | + /** |
|
254 | + * @param string $associationName |
|
255 | + */ |
|
250 | 256 | protected function renameOneToManyExtendField( |
251 | 257 | Schema $schema, |
252 | 258 | QueryBag $queries, |
@@ -4,17 +4,13 @@ |
||
4 | 4 | |
5 | 5 | use Symfony\Component\HttpFoundation\JsonResponse; |
6 | 6 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; |
7 | - |
|
8 | 7 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; |
9 | 8 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; |
10 | - |
|
11 | 9 | use Oro\Bundle\SecurityBundle\Annotation\AclAncestor; |
12 | 10 | use Oro\Bundle\SecurityBundle\Annotation\Acl; |
13 | 11 | use Oro\Bundle\SecurityBundle\Authentication\Token\UsernamePasswordOrganizationToken; |
14 | - |
|
15 | 12 | use Oro\Bundle\UserBundle\Entity\User; |
16 | 13 | use Oro\Bundle\UserBundle\Entity\UserApi; |
17 | - |
|
18 | 14 | use Oro\Bundle\OrganizationBundle\Entity\Manager\BusinessUnitManager; |
19 | 15 | use Oro\Bundle\OrganizationBundle\Entity\Organization; |
20 | 16 |
@@ -490,6 +490,11 @@ |
||
490 | 490 | ); |
491 | 491 | } |
492 | 492 | |
493 | + /** |
|
494 | + * @param string $className |
|
495 | + * @param string $fieldName |
|
496 | + * @param string $fieldType |
|
497 | + */ |
|
493 | 498 | protected function setExpectationForGetFields($className, $fieldName, $fieldType, array $extendFieldConfig = []) |
494 | 499 | { |
495 | 500 | $extendConfig = new Config(new FieldConfigId('extend', $className, $fieldName, $fieldType)); |
@@ -3,15 +3,11 @@ |
||
3 | 3 | namespace Oro\Bundle\EntityMergeBundle\Controller; |
4 | 4 | |
5 | 5 | use Doctrine\ORM\EntityManager; |
6 | - |
|
7 | 6 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; |
8 | 7 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; |
9 | - |
|
10 | 8 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; |
11 | -use Symfony\Component\Validator\Constraint; |
|
12 | 9 | use Symfony\Component\Validator\ConstraintViolation; |
13 | 10 | use Symfony\Component\Validator\ValidatorInterface; |
14 | - |
|
15 | 11 | use Oro\Bundle\EntityMergeBundle\Exception\ValidationException; |
16 | 12 | use Oro\Bundle\DataGridBundle\Extension\MassAction\MassActionDispatcher; |
17 | 13 | use Oro\Bundle\EntityMergeBundle\Data\EntityData; |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | protected $propertyAccessor; |
16 | 16 | |
17 | 17 | /** |
18 | - * @return PropertyAccessor |
|
18 | + * @return string |
|
19 | 19 | */ |
20 | 20 | public function getName() |
21 | 21 | { |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | * |
28 | 28 | * @param string $entity |
29 | 29 | * @param FieldMetadata $metadata |
30 | - * @return string |
|
30 | + * @return boolean |
|
31 | 31 | */ |
32 | 32 | public function supports($entity, FieldMetadata $metadata) |
33 | 33 | { |
@@ -3,7 +3,6 @@ |
||
3 | 3 | namespace Oro\Component\PropertyAccess\Tests\Unit; |
4 | 4 | |
5 | 5 | use Symfony\Component\PropertyAccess\Exception\NoSuchPropertyException; |
6 | - |
|
7 | 6 | use Oro\Component\PropertyAccess\PropertyAccessor; |
8 | 7 | use Oro\Component\PropertyAccess\Tests\Unit\Fixtures\TestClass; |
9 | 8 | use Oro\Component\PropertyAccess\Tests\Unit\Fixtures\TestClassMagicCall; |
@@ -37,7 +37,7 @@ |
||
37 | 37 | * |
38 | 38 | * @param string $entity |
39 | 39 | * @param FieldMetadata $metadata |
40 | - * @return string |
|
40 | + * @return boolean |
|
41 | 41 | */ |
42 | 42 | public function supports($entity, FieldMetadata $metadata) |
43 | 43 | { |
@@ -4,9 +4,7 @@ |
||
4 | 4 | |
5 | 5 | use Doctrine\Common\EventManager; |
6 | 6 | use Doctrine\DBAL\Driver\Connection; |
7 | - |
|
8 | 7 | use Symfony\Component\Filesystem\Filesystem; |
9 | - |
|
10 | 8 | use Oro\Component\TestUtils\ORM\Mocks\DriverMock; |
11 | 9 | use Oro\Component\TestUtils\ORM\Mocks\EntityManagerMock; |
12 | 10 |
@@ -178,6 +178,9 @@ discard block |
||
178 | 178 | $this->accessor->setValue($entity, $metadata, $value); |
179 | 179 | } |
180 | 180 | |
181 | + /** |
|
182 | + * @param string $name |
|
183 | + */ |
|
181 | 184 | protected function createAccessor($name) |
182 | 185 | { |
183 | 186 | $result = $this->getMock('Oro\Bundle\EntityMergeBundle\Model\Accessor\AccessorInterface'); |
@@ -195,6 +198,9 @@ discard block |
||
195 | 198 | ->getMock(); |
196 | 199 | } |
197 | 200 | |
201 | + /** |
|
202 | + * @param integer $id |
|
203 | + */ |
|
198 | 204 | protected function createTestEntity($id) |
199 | 205 | { |
200 | 206 | $result = new \stdClass(); |
@@ -160,6 +160,9 @@ discard block |
||
160 | 160 | ]; |
161 | 161 | } |
162 | 162 | |
163 | + /** |
|
164 | + * @param string $fieldName |
|
165 | + */ |
|
163 | 166 | protected function getFieldMetadata($fieldName = null, array $options = []) |
164 | 167 | { |
165 | 168 | $result = $this->createFieldMetadata(); |
@@ -179,6 +182,10 @@ discard block |
||
179 | 182 | ->method('get') |
180 | 183 | ->will( |
181 | 184 | $this->returnCallback( |
185 | + |
|
186 | + /** |
|
187 | + * @param string $code |
|
188 | + */ |
|
182 | 189 | function ($code) use ($options) { |
183 | 190 | $this->assertArrayHasKey($code, $options); |
184 | 191 | return $options[$code]; |
@@ -190,6 +197,10 @@ discard block |
||
190 | 197 | ->method('has') |
191 | 198 | ->will( |
192 | 199 | $this->returnCallback( |
200 | + |
|
201 | + /** |
|
202 | + * @param string $code |
|
203 | + */ |
|
193 | 204 | function ($code) use ($options) { |
194 | 205 | return isset($options[$code]); |
195 | 206 | } |
@@ -211,11 +222,18 @@ discard block |
||
211 | 222 | ->disableOriginalConstructor()->getMock(); |
212 | 223 | } |
213 | 224 | |
225 | + /** |
|
226 | + * @param string $id |
|
227 | + * @param EntityStub $parent |
|
228 | + */ |
|
214 | 229 | protected function createEntity($id = null, $parent = null) |
215 | 230 | { |
216 | 231 | return new EntityStub($id, $parent); |
217 | 232 | } |
218 | 233 | |
234 | + /** |
|
235 | + * @param string $id |
|
236 | + */ |
|
219 | 237 | protected function createRelatedEntity($id = null) |
220 | 238 | { |
221 | 239 | return new CollectionItemStub($id); |