Skip to content

Commit

Permalink
Define data type hints for base plugin methods
Browse files Browse the repository at this point in the history
  • Loading branch information
nmolham-godaddy committed Oct 10, 2024
1 parent aedb000 commit 429387a
Show file tree
Hide file tree
Showing 4 changed files with 192 additions and 202 deletions.
16 changes: 8 additions & 8 deletions tests/_support/plugins/gateway-test-plugin/includes/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,26 +46,26 @@ public function __construct() {
}


public function get_documentation_url() {

public function get_documentation_url() : ?string
{
return 'https://example.com';
}


public function get_settings_url( $plugin_id = null ) {

public function get_settings_url( string $plugin_id = null ) : string
{
return admin_url( 'admin.php?page=wc-settings' );
}


public function get_plugin_name() {

public function get_plugin_name() : string
{
return 'Framework Gateway Test Plugin';
}


protected function get_file() {

protected function get_file() : string
{
return __DIR__;
}

Expand Down
16 changes: 8 additions & 8 deletions tests/_support/plugins/test-plugin/includes/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,26 +45,26 @@ public function __construct() {
}


public function get_documentation_url() {

public function get_documentation_url() : ?string
{
return 'https://example.com';
}


public function get_settings_url( $plugin_id = null ) {

public function get_settings_url( string $plugin_id = null ) : string
{
return admin_url( 'admin.php?page=wc-settings' );
}


public function get_plugin_name() {

public function get_plugin_name() : string
{
return 'Plugin Framework Test';
}


protected function get_file() {

protected function get_file() : string
{
return __DIR__;
}

Expand Down
Loading

0 comments on commit 429387a

Please sign in to comment.