add type hints to PHP methods

This commit is contained in:
2024-03-24 11:16:44 +01:00
parent ad245ebf43
commit 5f1e1a7879
8 changed files with 39 additions and 38 deletions

View File

@ -28,7 +28,7 @@ require_once "{$_tests_dir}/includes/functions.php";
/**
* Manually load the plugin being tested.
*/
function _manually_load_plugin() {
function _manually_load_plugin(): void {
require dirname( dirname( __FILE__ ) ) . '/stklcode-liveticker.php';
}

View File

@ -24,7 +24,7 @@ class Test_API extends WP_UnitTestCase {
*
* @return void
*/
public function set_up() {
public function set_up(): void {
parent::set_up();
global $wp_rest_server;
$wp_rest_server = new WP_REST_Server();
@ -36,7 +36,7 @@ class Test_API extends WP_UnitTestCase {
*
* @return void
*/
public function test_register_route() {
public function test_register_route(): void {
global $wp_rest_server;
$routes = $wp_rest_server->get_routes();
@ -52,7 +52,7 @@ class Test_API extends WP_UnitTestCase {
*
* @return void
*/
public function test_get_ticks() {
public function test_get_ticks(): void {
global $wp_rest_server;
$request = new WP_REST_Request( 'GET', '/wp/v2/scliveticker_tick' );