@@ -267,7 +267,7 @@ |
||
267 | 267 | } |
268 | 268 | |
269 | 269 | /** |
270 | - * @return \PHPUnit_Framework_MockObject_MockObject|ConstraintValidatorFactoryInterface |
|
270 | + * @return ConstraintValidatorFactoryInterface |
|
271 | 271 | */ |
272 | 272 | protected function getConstraintValidatorFactory() |
273 | 273 | { |
@@ -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; |
@@ -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)); |
@@ -65,7 +65,7 @@ |
||
65 | 65 | * @param string $className |
66 | 66 | * @param string $fieldName |
67 | 67 | * |
68 | - * @return Config|null |
|
68 | + * @return \Oro\Bundle\EntityConfigBundle\Config\ConfigInterface|null |
|
69 | 69 | */ |
70 | 70 | public function findExtendFieldConfig($className, $fieldName) |
71 | 71 | { |
@@ -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; |
@@ -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); |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | } |
83 | 83 | |
84 | 84 | /** |
85 | - * @param $entity |
|
85 | + * @param \stdClass $entity |
|
86 | 86 | * @param string $scope |
87 | 87 | * @return NavigationResult |
88 | 88 | */ |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | } |
93 | 93 | |
94 | 94 | /** |
95 | - * @param object $entity |
|
95 | + * @param \stdClass $entity |
|
96 | 96 | * @param string $scope |
97 | 97 | * @return NavigationResult |
98 | 98 | */ |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | } |
103 | 103 | |
104 | 104 | /** |
105 | - * @param object $entity |
|
105 | + * @param \stdClass $entity |
|
106 | 106 | * @param string $scope |
107 | 107 | * @return NavigationResult |
108 | 108 | */ |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | } |
113 | 113 | |
114 | 114 | /** |
115 | - * @param object $entity |
|
115 | + * @param \stdClass $entity |
|
116 | 116 | * @param string $scope |
117 | 117 | * @return NavigationResult |
118 | 118 | */ |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | |
160 | 160 | /** |
161 | 161 | * @param object $entity |
162 | - * @param $resultType |
|
162 | + * @param string $resultType |
|
163 | 163 | * @param string $scope |
164 | 164 | * @return bool |
165 | 165 | */ |
@@ -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; |