Fix SonarQube code quality issues to improve rating from B to A

This commit is contained in:
2025-04-20 04:54:13 +01:00
parent cdd9b050c7
commit 04cdd49a3f
4 changed files with 33 additions and 176 deletions

View File

@@ -13,10 +13,20 @@ namespace WPALLSTARS\PluginStarterTemplate;
class Core {
/**
* Constructor
* Plugin version
*
* @var string
*/
public function __construct() {
private $version;
/**
* Constructor
*
* @param string $version Plugin version.
*/
public function __construct( $version = '' ) {
// Initialize hooks.
$this->version = $version;
}
/**
@@ -28,4 +38,13 @@ class Core {
public function filter_content( $content ) {
return $content;
}
/**
* Get the plugin version
*
* @return string The plugin version.
*/
public function get_plugin_version() {
return $this->version;
}
}