@@ -1072,12 +1072,31 @@ public function testGetEscaperFetchesFromObjectManagerWhenNull(): void
10721072 $ rp = new \ReflectionProperty (\Magento \Framework \App \ObjectManager::class, '_instance ' );
10731073 $ rp ->setAccessible (true );
10741074 $ originalOm = $ rp ->getValue ();
1075- $ stubOm = new class ($ zendEscaper ) implements \Magento \Framework \ObjectManagerInterface {
1075+ $ stubOm = new class ($ zendEscaper ) implements \Magento \Framework \ObjectManagerInterface
1076+ {
1077+ /**
1078+ * @var \Magento\Framework\ZendEscaper
1079+ */
10761080 private $ escaper ;
1077- public function __construct ($ escaper ) { $ this ->escaper = $ escaper ; }
1078- public function get ($ type ) { return $ this ->escaper ; }
1079- public function create ($ type , array $ arguments = []) { return $ this ->get ($ type ); }
1080- public function configure (array $ configuration ) {}
1081+
1082+ public function __construct ($ escaper )
1083+ {
1084+ $ this ->escaper = $ escaper ;
1085+ }
1086+
1087+ public function get ($ type )
1088+ {
1089+ return $ this ->escaper ;
1090+ }
1091+
1092+ public function create ($ type , array $ arguments = [])
1093+ {
1094+ return $ this ->get ($ type );
1095+ }
1096+
1097+ public function configure (array $ configuration )
1098+ {
1099+ }
10811100 };
10821101 \Magento \Framework \App \ObjectManager::setInstance ($ stubOm );
10831102
@@ -1120,12 +1139,31 @@ public function testGetTranslateInlineFetchesFromObjectManagerWhenNull(): void
11201139 $ rp = new \ReflectionProperty (\Magento \Framework \App \ObjectManager::class, '_instance ' );
11211140 $ rp ->setAccessible (true );
11221141 $ originalOm = $ rp ->getValue ();
1123- $ stubOm = new class ($ inlineMock ) implements \Magento \Framework \ObjectManagerInterface {
1142+ $ stubOm = new class ($ inlineMock ) implements \Magento \Framework \ObjectManagerInterface
1143+ {
1144+ /**
1145+ * @var \Magento\Framework\Translate\InlineInterface
1146+ */
11241147 private $ inline ;
1125- public function __construct ($ inline ) { $ this ->inline = $ inline ; }
1126- public function get ($ type ) { return $ this ->inline ; }
1127- public function create ($ type , array $ arguments = []) { return $ this ->get ($ type ); }
1128- public function configure (array $ configuration ) {}
1148+
1149+ public function __construct ($ inline )
1150+ {
1151+ $ this ->inline = $ inline ;
1152+ }
1153+
1154+ public function get ($ type )
1155+ {
1156+ return $ this ->inline ;
1157+ }
1158+
1159+ public function create ($ type , array $ arguments = [])
1160+ {
1161+ return $ this ->get ($ type );
1162+ }
1163+
1164+ public function configure (array $ configuration )
1165+ {
1166+ }
11291167 };
11301168 \Magento \Framework \App \ObjectManager::setInstance ($ stubOm );
11311169
@@ -1154,12 +1192,31 @@ public function testGetLoggerFetchesFromObjectManagerWhenNull(): void
11541192 $ rp = new \ReflectionProperty (\Magento \Framework \App \ObjectManager::class, '_instance ' );
11551193 $ rp ->setAccessible (true );
11561194 $ originalOm = $ rp ->getValue ();
1157- $ stubOm = new class ($ loggerMock ) implements \Magento \Framework \ObjectManagerInterface {
1195+ $ stubOm = new class ($ loggerMock ) implements \Magento \Framework \ObjectManagerInterface
1196+ {
1197+ /**
1198+ * @var \Psr\Log\LoggerInterface
1199+ */
11581200 private $ logger ;
1159- public function __construct ($ logger ) { $ this ->logger = $ logger ; }
1160- public function get ($ type ) { return $ this ->logger ; }
1161- public function create ($ type , array $ arguments = []) { return $ this ->get ($ type ); }
1162- public function configure (array $ configuration ) {}
1201+
1202+ public function __construct ($ logger )
1203+ {
1204+ $ this ->logger = $ logger ;
1205+ }
1206+
1207+ public function get ($ type )
1208+ {
1209+ return $ this ->logger ;
1210+ }
1211+
1212+ public function create ($ type , array $ arguments = [])
1213+ {
1214+ return $ this ->get ($ type );
1215+ }
1216+
1217+ public function configure (array $ configuration )
1218+ {
1219+ }
11631220 };
11641221 \Magento \Framework \App \ObjectManager::setInstance ($ stubOm );
11651222
@@ -1189,5 +1246,4 @@ public function testGetLoggerReturnsExistingInstance(): void
11891246
11901247 $ this ->assertSame ($ this ->loggerMock , $ logger );
11911248 }
1192-
11931249}
0 commit comments