@@ -55,24 +55,12 @@ public function __construct(ContainerInterface $container)
55
55
$ this ->container = $ container ;
56
56
}
57
57
58
- /**
59
- * Gets the Doctrine ManagerRegistry.
60
- *
61
- * @return ManagerRegistry
62
- */
63
- public function getRegistry ()
58
+ public function getRegistry (): ManagerRegistry
64
59
{
65
60
return $ this ->container ->get ('doctrine ' );
66
61
}
67
62
68
- /**
69
- * Gets the Doctrine ObjectManager.
70
- *
71
- * @param null $managerName
72
- *
73
- * @return ObjectManager
74
- */
75
- public function getOm ($ managerName = null )
63
+ public function getOm ($ managerName = null ): ObjectManager
76
64
{
77
65
if (!$ this ->om ) {
78
66
$ this ->om = $ this ->getRegistry ()->getManager ($ managerName );
@@ -84,19 +72,17 @@ public function getOm($managerName = null)
84
72
/**
85
73
* Purge the database.
86
74
*/
87
- public function purgeDatabase ()
75
+ public function purgeDatabase (): void
88
76
{
89
77
$ referenceRepository = new ProxyReferenceRepository ($ this ->getOm ());
90
78
$ this ->getExecutor ()->setReferenceRepository ($ referenceRepository );
91
79
$ this ->getExecutor ()->purge ();
92
80
}
93
81
94
82
/**
95
- * Loads fixture classes.
96
- *
97
83
* @param string[] $classNames
98
84
*/
99
- public function loadFixtures (array $ classNames )
85
+ public function loadFixtures (array $ classNames ): void
100
86
{
101
87
$ this ->purgeDatabase ();
102
88
$ loader = new ContainerAwareLoader ($ this ->container );
@@ -108,13 +94,7 @@ public function loadFixtures(array $classNames)
108
94
$ this ->getExecutor ()->execute ($ loader ->getFixtures (), true );
109
95
}
110
96
111
- /**
112
- * Loads a single fixture.
113
- *
114
- * @param Loader $loader
115
- * @param string $className
116
- */
117
- protected function loadFixtureClass (Loader $ loader , $ className )
97
+ protected function loadFixtureClass (Loader $ loader , string $ className ): void
118
98
{
119
99
if (!class_exists ($ className )) {
120
100
throw new \InvalidArgumentException (sprintf (
@@ -140,12 +120,7 @@ protected function loadFixtureClass(Loader $loader, $className)
140
120
}
141
121
}
142
122
143
- /**
144
- * Return the ORM Executor class.
145
- *
146
- * @return ORMExecutor
147
- */
148
- private function getExecutor ()
123
+ private function getExecutor (): ORMExecutor
149
124
{
150
125
if ($ this ->executor ) {
151
126
return $ this ->executor ;
0 commit comments