@@ -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; |
@@ -47,7 +47,7 @@ |
||
47 | 47 | protected $paginationManager; |
48 | 48 | |
49 | 49 | /** |
50 | - * @param DataGridManager $dataGridManager |
|
50 | + * @param DatagridManager $dataGridManager |
|
51 | 51 | * @param DoctrineHelper $doctrineHelper |
52 | 52 | * @param AclHelper $aclHelper |
53 | 53 | * @param Pager $pager |
@@ -3,16 +3,13 @@ |
||
3 | 3 | namespace Oro\Bundle\EntityPaginationBundle\Storage; |
4 | 4 | |
5 | 5 | use Symfony\Component\HttpFoundation\Request; |
6 | - |
|
7 | 6 | use Oro\Bundle\DataGridBundle\Datasource\ResultRecord; |
8 | 7 | use Oro\Bundle\EntityPaginationBundle\Manager\EntityPaginationManager; |
9 | 8 | use Oro\Bundle\DataGridBundle\Datagrid\DatagridInterface; |
10 | 9 | use Oro\Bundle\DataGridBundle\Datasource\Orm\OrmDatasource; |
11 | 10 | use Oro\Bundle\DataGridBundle\Extension\Pager\Orm\Pager; |
12 | -use Oro\Bundle\EntityPaginationBundle\Datagrid\EntityPaginationExtension; |
|
13 | 11 | use Oro\Bundle\SecurityBundle\ORM\Walker\AclHelper; |
14 | 12 | use Oro\Bundle\EntityBundle\ORM\DoctrineHelper; |
15 | -use Oro\Bundle\DataGridBundle\Datagrid\Manager as DatagridManager; |
|
16 | 13 | |
17 | 14 | class StorageDataCollector |
18 | 15 | { |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | * Null - pager data is not accessible |
64 | 64 | * Array('total' => <int>, 'current' => <int>) - used to generate string "<current> of <total>" |
65 | 65 | * |
66 | - * @param object $entity |
|
66 | + * @param \stdClass $entity |
|
67 | 67 | * @param string $scope |
68 | 68 | * @return null|array |
69 | 69 | */ |
@@ -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 | */ |
98 | 98 | public function showInfoMessage($entity, $scope) |
@@ -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; |
@@ -32,6 +32,9 @@ discard block |
||
32 | 32 | /** @var mixed */ |
33 | 33 | private $value; |
34 | 34 | |
35 | + /** |
|
36 | + * @param string $timezone |
|
37 | + */ |
|
35 | 38 | public function __construct($value, $timezone = null) |
36 | 39 | { |
37 | 40 | $timezone = $timezone ? : 'UTC'; |
@@ -114,7 +117,7 @@ discard block |
||
114 | 117 | } |
115 | 118 | |
116 | 119 | /** |
117 | - * @return null|string |
|
120 | + * @return string |
|
118 | 121 | */ |
119 | 122 | public function getVariableLabel() |
120 | 123 | { |
@@ -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; |
@@ -106,8 +106,8 @@ |
||
106 | 106 | * Apply expression using one condition (less or more) |
107 | 107 | * |
108 | 108 | * @param FilterDatasourceAdapterInterface $ds |
109 | - * @param $dateValue |
|
110 | - * @param $dateParameterName |
|
109 | + * @param string $dateValue |
|
110 | + * @param string $dateParameterName |
|
111 | 111 | * @param string $fieldName |
112 | 112 | * @param bool $isLess less/more mode, true if 'less than', false if 'more than' |
113 | 113 | */ |
@@ -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; |