@@ -3,7 +3,6 @@ |
||
3 | 3 | namespace Oro\Bundle\SegmentBundle\Query; |
4 | 4 | |
5 | 5 | use Doctrine\ORM\EntityManager; |
6 | - |
|
7 | 6 | use Oro\Bundle\SegmentBundle\Entity\Segment; |
8 | 7 | |
9 | 8 | class StaticSegmentQueryBuilder implements QueryBuilderInterface |
@@ -4,7 +4,6 @@ |
||
4 | 4 | |
5 | 5 | use Doctrine\ORM\EntityManager; |
6 | 6 | use Doctrine\ORM\EntityRepository; |
7 | - |
|
8 | 7 | use Oro\Bundle\SegmentBundle\Entity\Manager\SegmentManager; |
9 | 8 | use Oro\Bundle\SegmentBundle\Entity\Segment; |
10 | 9 | use Oro\Bundle\SegmentBundle\Entity\SegmentType; |
@@ -4,7 +4,6 @@ |
||
4 | 4 | |
5 | 5 | use Doctrine\ORM\EntityManager; |
6 | 6 | use Doctrine\ORM\Mapping\ClassMetadata; |
7 | - |
|
8 | 7 | use Oro\Bundle\SegmentBundle\Entity\Repository\SegmentSnapshotRepository; |
9 | 8 | use Oro\Bundle\SegmentBundle\Tests\Unit\Fixtures\StubEntity; |
10 | 9 | use Oro\Bundle\SegmentBundle\Tests\Unit\SegmentDefinitionTestCase; |
@@ -127,6 +127,9 @@ discard block |
||
127 | 127 | return $entities; |
128 | 128 | } |
129 | 129 | |
130 | + /** |
|
131 | + * @param integer $callCount |
|
132 | + */ |
|
130 | 133 | protected function mockMetadata($callCount) |
131 | 134 | { |
132 | 135 | $metadata = $this->getMockBuilder('Doctrine\ORM\Mapping\ClassMetadata') |
@@ -136,6 +139,10 @@ discard block |
||
136 | 139 | $metadata->expects($this->exactly($callCount)) |
137 | 140 | ->method('getIdentifierValues') |
138 | 141 | ->will($this->returnCallback( |
142 | + |
|
143 | + /** |
|
144 | + * @param integer $currentEntity |
|
145 | + */ |
|
139 | 146 | function (StubEntity $currentEntity) { |
140 | 147 | return array($currentEntity->getId()); |
141 | 148 | } |
@@ -5,7 +5,6 @@ |
||
5 | 5 | use Doctrine\ORM\EntityManager; |
6 | 6 | use Doctrine\ORM\Event\LifecycleEventArgs; |
7 | 7 | use Doctrine\ORM\Event\PostFlushEventArgs; |
8 | - |
|
9 | 8 | use Oro\Bundle\EntityConfigBundle\Config\ConfigManager; |
10 | 9 | use Oro\Bundle\SegmentBundle\EventListener\DoctrinePreRemoveListener; |
11 | 10 | use Oro\Bundle\SegmentBundle\Tests\Unit\Fixtures\StubEntity; |
@@ -8,14 +8,12 @@ |
||
8 | 8 | use Doctrine\ORM\QueryBuilder; |
9 | 9 | use Doctrine\Common\Annotations\AnnotationReader; |
10 | 10 | use Doctrine\ORM\Mapping\Driver\AnnotationDriver; |
11 | - |
|
12 | 11 | use Symfony\Component\DependencyInjection\Container; |
13 | 12 | use Symfony\Component\Form\Forms; |
14 | 13 | use Symfony\Component\Form\PreloadedExtension; |
15 | 14 | use Symfony\Bridge\Doctrine\Form\Type\EntityType; |
16 | 15 | use Symfony\Component\Form\Extension\Csrf\CsrfExtension; |
17 | 16 | use Symfony\Component\Form\FormFactoryInterface; |
18 | - |
|
19 | 17 | use Oro\Bundle\EntityConfigBundle\Config\Config; |
20 | 18 | use Oro\Bundle\EntityConfigBundle\Config\Id\EntityConfigId; |
21 | 19 | use Oro\Bundle\EntityConfigBundle\Provider\ConfigProvider; |
@@ -5,12 +5,10 @@ |
||
5 | 5 | use Doctrine\ORM\Query; |
6 | 6 | use Doctrine\ORM\Query\Expr; |
7 | 7 | use Doctrine\ORM\QueryBuilder; |
8 | - |
|
9 | 8 | use Symfony\Component\Form\Forms; |
10 | 9 | use Symfony\Component\Form\PreloadedExtension; |
11 | 10 | use Symfony\Component\Form\FormFactoryInterface; |
12 | 11 | use Symfony\Component\Form\Extension\Csrf\CsrfExtension; |
13 | - |
|
14 | 12 | use Oro\Bundle\EntityBundle\Provider\ConfigVirtualFieldProvider; |
15 | 13 | use Oro\Bundle\FilterBundle\Filter\FilterInterface; |
16 | 14 | use Oro\Bundle\FilterBundle\Filter\FilterUtility; |
@@ -7,11 +7,9 @@ |
||
7 | 7 | use FOS\RestBundle\Controller\FOSRestController; |
8 | 8 | use FOS\RestBundle\Util\Codes; |
9 | 9 | use Nelmio\ApiDocBundle\Annotation\ApiDoc; |
10 | - |
|
11 | 10 | use Symfony\Component\HttpFoundation\Request; |
12 | 11 | use Symfony\Component\HttpFoundation\Response; |
13 | 12 | use Symfony\Component\Security\Core\User\UserInterface; |
14 | - |
|
15 | 13 | use Oro\Bundle\SidebarBundle\Entity\AbstractSidebarState; |
16 | 14 | use Oro\Bundle\SidebarBundle\Entity\Repository\SidebarStateRepository; |
17 | 15 |
@@ -7,11 +7,9 @@ |
||
7 | 7 | use FOS\RestBundle\Controller\FOSRestController; |
8 | 8 | use FOS\RestBundle\Util\Codes; |
9 | 9 | use Nelmio\ApiDocBundle\Annotation\ApiDoc; |
10 | - |
|
11 | 10 | use Symfony\Component\HttpFoundation\Request; |
12 | 11 | use Symfony\Component\HttpFoundation\Response; |
13 | 12 | use Symfony\Component\Security\Core\User\UserInterface; |
14 | - |
|
15 | 13 | use Oro\Bundle\SecurityBundle\Authentication\Token\OrganizationContextTokenInterface; |
16 | 14 | use Oro\Bundle\SidebarBundle\Entity\AbstractWidget; |
17 | 15 | use Oro\Bundle\SidebarBundle\Entity\Repository\WidgetRepository; |
@@ -3,9 +3,7 @@ |
||
3 | 3 | namespace Oro\Bundle\SidebarBundle\Tests\Unit\Twig; |
4 | 4 | |
5 | 5 | use Doctrine\Common\Collections\ArrayCollection; |
6 | - |
|
7 | 6 | use Symfony\Component\Translation\TranslatorInterface; |
8 | - |
|
9 | 7 | use Oro\Bundle\SidebarBundle\Model\WidgetDefinitionRegistry; |
10 | 8 | use Oro\Bundle\SidebarBundle\Twig\SidebarExtension; |
11 | 9 |