88use Codeception \Lib \Framework ;
99use Codeception \Lib \Interfaces \DoctrineProvider ;
1010use Codeception \TestInterface ;
11+ use Doctrine \ORM \EntityManagerInterface ;
1112use Interop \Container \ContainerInterface ;
1213use Mezzio \Application ;
1314use PHPUnit \Framework \AssertionFailedError ;
3940class Mezzio extends Framework implements DoctrineProvider
4041{
4142 /**
42- * @var array
43+ * @var array<string, mixed>
4344 */
44- protected $ config = [
45+ protected array $ config = [
4546 'container ' => 'config/container.php ' ,
4647 'recreateApplicationBetweenTests ' => true ,
4748 'recreateApplicationBetweenRequests ' => false ,
@@ -62,7 +63,7 @@ class Mezzio extends Framework implements DoctrineProvider
6263 */
6364 public Application $ application ;
6465
65- public function _initialize ()
66+ public function _initialize (): void
6667 {
6768 $ this ->client = new MezzioConnector ();
6869 $ this ->client ->setConfig ($ this ->config );
@@ -73,7 +74,7 @@ public function _initialize()
7374 }
7475 }
7576
76- public function _before (TestInterface $ test )
77+ public function _before (TestInterface $ test ): void
7778 {
7879 $ this ->client = new MezzioConnector ();
7980 $ this ->client ->setConfig ($ this ->config );
@@ -86,7 +87,7 @@ public function _before(TestInterface $test)
8687 }
8788 }
8889
89- public function _after (TestInterface $ test )
90+ public function _after (TestInterface $ test ): void
9091 {
9192 //Close the session, if any are open
9293 if (session_status () == PHP_SESSION_ACTIVE ) {
@@ -99,7 +100,7 @@ public function _after(TestInterface $test)
99100 parent ::_after ($ test );
100101 }
101102
102- public function _getEntityManager ()
103+ public function _getEntityManager (): EntityManagerInterface
103104 {
104105 $ service = 'Doctrine\ORM\EntityManager ' ;
105106 if (!$ this ->container ->has ($ service )) {
0 commit comments