55
66class TestWPVersionResolverTest extends TestCase {
77
8- private $ temp_file ;
8+ /**
9+ * @var string
10+ */
11+ private $ temp_file = '' ;
912
1013 protected function set_up () {
1114 parent ::set_up ();
@@ -25,7 +28,10 @@ protected function tear_down() {
2528 parent ::tear_down ();
2629 }
2730
28- private function wp_versions_data () {
31+ /**
32+ * @return array<string, string>
33+ */
34+ private function wp_versions_data (): array {
2935 return array (
3036 '5.4 ' => 'insecure ' ,
3137 '5.9 ' => 'insecure ' ,
@@ -45,7 +51,10 @@ private function wp_versions_data() {
4551 );
4652 }
4753
48- public static function data_wp_version_resolver () {
54+ /**
55+ * @return array<int, array{0: string, 1: string}>
56+ */
57+ public static function data_wp_version_resolver (): array {
4958 return array (
5059 array ( '5.0 ' , '5.0 ' ), // Does not match any version. So return as it is.
5160 array ( '5 ' , '5.9.2 ' ), // Return the latest major version.
@@ -68,8 +77,11 @@ public static function data_wp_version_resolver() {
6877
6978 /**
7079 * @dataProvider data_wp_version_resolver
80+ *
81+ * @param string $env
82+ * @param string $expected
7183 */
72- public function test_wp_version_resolver ( $ env , $ expected ) {
84+ public function test_wp_version_resolver ( $ env , $ expected ): void {
7385 if ( $ env ) {
7486 putenv ( "WP_VERSION= $ env " );
7587 }
0 commit comments