Improve code quality to move from B to A grade
Release - Build and publish plugin releases / Build and Release (push) Canceled after 0s
Release - Build and publish plugin releases / Build and Release (push) Canceled after 0s
- Added proper type declarations to all properties and methods - Fixed inconsistent variable naming (camelCase to snake_case) - Improved path handling in admin class - Added textdomain loading functionality - Removed unused phpcs:ignore comment - Implemented proper return type declarations
This commit is contained in:
1 parent
af11f827c4
commit
40ebbce1cc
3 files changed
+31
-16
No files matched your search
@@ -17,14 +17,14 @@ class Core {
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $version;
|
||||
private string $version;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param string $version Plugin version.
|
||||
*/
|
||||
public function __construct( $version = '' ) {
|
||||
public function __construct( string $version = '' ) {
|
||||
// Initialize hooks.
|
||||
$this->version = $version;
|
||||
}
|
||||
@@ -35,7 +35,7 @@ class Core {
|
||||
* @param string $content The content to filter.
|
||||
* @return string The filtered content.
|
||||
*/
|
||||
public function filter_content( $content ) {
|
||||
public function filter_content( string $content ): string {
|
||||
return $content;
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ class Core {
|
||||
*
|
||||
* @return string The plugin version.
|
||||
*/
|
||||
public function get_plugin_version() {
|
||||
public function get_plugin_version(): string {
|
||||
return $this->version;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user