33namespace Spy \TimelineBundle \Driver \Doctrine ;
44
55use Doctrine \Common \Persistence \ObjectManager ;
6- use Spy \Timeline \Model \ActionInterface ;
7- use Spy \Timeline \ResultBuilder \ResultBuilderInterface ;
6+ use Doctrine \ORM \EntityManager ;
87use Spy \Timeline \Driver \AbstractActionManager as BaseActionManager ;
8+ use Spy \Timeline \Model \ActionInterface ;
99use Spy \Timeline \Model \ComponentInterface ;
1010use Spy \Timeline \ResolveComponent \ValueObject \ResolvedComponentData ;
11+ use Spy \Timeline \ResultBuilder \ResultBuilderInterface ;
1112
1213abstract class AbstractActionManager extends BaseActionManager
1314{
@@ -28,17 +29,14 @@ abstract class AbstractActionManager extends BaseActionManager
2829 * @param string $componentClass componentClass
2930 * @param string $actionComponentClass actionComponentClass
3031 */
31- public function __construct (ObjectManager $ objectManager , ResultBuilderInterface $ resultBuilder , $ actionClass , $ componentClass , $ actionComponentClass )
32+ public function __construct (EntityManager $ objectManager , ResultBuilderInterface $ resultBuilder , $ actionClass , $ componentClass , $ actionComponentClass )
3233 {
33- $ this ->objectManager = $ objectManager ;
34- $ this ->resultBuilder = $ resultBuilder ;
34+ $ this ->objectManager = $ objectManager ;
35+ $ this ->resultBuilder = $ resultBuilder ;
3536
3637 parent ::__construct ($ actionClass , $ componentClass , $ actionComponentClass );
3738 }
3839
39- /**
40- * {@inheritdoc}
41- */
4240 public function updateAction (ActionInterface $ action )
4341 {
4442 $ this ->objectManager ->persist ($ action );
@@ -47,19 +45,13 @@ public function updateAction(ActionInterface $action)
4745 $ this ->deployActionDependOnDelivery ($ action );
4846 }
4947
50- /**
51- * {@inheritdoc}
52- */
5348 public function createComponent ($ model , $ identifier = null , $ flush = true )
5449 {
5550 $ resolvedComponentData = $ this ->resolveModelAndIdentifier ($ model , $ identifier );
5651
5752 return $ this ->createComponentFromResolvedComponentData ($ resolvedComponentData , $ flush );
5853 }
5954
60- /**
61- * {@inheritdoc}
62- */
6355 public function flushComponents ()
6456 {
6557 $ this ->objectManager ->flush ();
@@ -69,7 +61,7 @@ public function flushComponents()
6961 * Creates a component from a resolved model and identifier and optionally stores it to the storage engine.
7062 *
7163 * @param ResolvedComponentData $resolved The resolved component data
72- * @param boolean $flush Whether to flush or not, defaults to true
64+ * @param bool $flush Whether to flush or not, defaults to true
7365 *
7466 * @return ComponentInterface The newly created and populated component
7567 */
0 commit comments