@@ -247,7 +247,7 @@ public function testParse(array $fixtureData): void
247247 $ this ->assertEquals ($ fixtureData , $ uaInfo , $ errorMessage );
248248 }
249249
250- public function getFixtures (): array
250+ public static function getFixtures (): array
251251 {
252252 $ fixtures = [];
253253 $ fixtureFiles = \glob (\realpath (__DIR__ ) . '/fixtures/*.yml ' );
@@ -301,7 +301,7 @@ public function testParseClient(array $fixtureData): void
301301 $ this ->assertEquals ($ fixtureData ['client ' ], $ uaInfo ['client ' ], $ messageError );
302302 }
303303
304- public function getFixturesClient (): array
304+ public static function getFixturesClient (): array
305305 {
306306 $ fixtures = [];
307307 $ fixtureFiles = \glob (\realpath (__DIR__ ) . '/Parser/Client/fixtures/*.yml ' );
@@ -341,7 +341,7 @@ public function testParseDevice(array $fixtureData): void
341341 $ this ->assertEquals ($ fixtureData ['device ' ], $ uaInfo ['device ' ]);
342342 }
343343
344- public function getFixturesDevice (): array
344+ public static function getFixturesDevice (): array
345345 {
346346 $ fixtures = [];
347347 $ fixtureFiles = \glob (\realpath (__DIR__ ) . '/Parser/Device/fixtures/*.yml ' );
@@ -403,7 +403,7 @@ public function testVersionTruncation(string $useragent, int $truncationType, st
403403 AbstractParser::setVersionTruncation (AbstractParser::VERSION_TRUNCATION_NONE );
404404 }
405405
406- public function getVersionTruncationFixtures (): array
406+ public static function getVersionTruncationFixtures (): array
407407 {
408408 return [
409409 ['Mozilla/5.0 (Linux; Android 4.2.2; ARCHOS 101 PLATINUM Build/JDQ39) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.114 Safari/537.36 ' , AbstractParser::VERSION_TRUNCATION_NONE , '4.2.2 ' , '34.0.1847.114 ' ],
@@ -528,7 +528,7 @@ public function testParseBots(array $fixtureData): void
528528 );
529529 }
530530
531- public function getBotFixtures (): array
531+ public static function getBotFixtures (): array
532532 {
533533 $ fixturesPath = \realpath (__DIR__ . '/fixtures/bots.yml ' );
534534 $ fixtures = \Spyc::YAMLLoad ($ fixturesPath );
@@ -628,11 +628,15 @@ public function testGetClient(): void
628628 $ this ->assertEquals ($ expected , $ dd ->getClient ());
629629 }
630630
631- public function getTypeMethodFixtures (): array
631+ public static function getTypeMethodFixtures (): array
632632 {
633- $ fixturePath = \realpath (__DIR__ . '/Parser/fixtures/type-methods.yml ' );
633+ $ fixtureData = \Spyc:: YAMLLoad ( \ realpath (__DIR__ . '/Parser/fixtures/type-methods.yml ' ) );
634634
635- return \Spyc::YAMLLoad ($ fixturePath );
635+ $ fixtureData = \array_map (static function (array $ item ): array {
636+ return ['ua ' => $ item ['user_agent ' ], 'checkTypes ' => $ item ['check ' ]];
637+ }, $ fixtureData );
638+
639+ return $ fixtureData ;
636640 }
637641
638642 /**
0 commit comments