Fix: Address PHPCS errors and PHPUnit 7.0 Mockery failure

This commit is contained in:
2025-04-18 18:32:13 +01:00
parent b18f1c46b4
commit 6d3aeb889a
2 changed files with 19 additions and 23 deletions

View File

@@ -0,0 +1,50 @@
<?php
/**
* Admin area functionality for the plugin.
*
* @package WPALLSTARS\PluginStarterTemplate\Admin
*/
namespace WPALLSTARS\PluginStarterTemplate\Admin;
use WPALLSTARS\PluginStarterTemplate\Core;
/**
* Admin class responsible for admin-specific hooks and functionality.
*/
class Admin {
/**
* Core plugin class instance.
*
* @var Core
*/
private $core;
/**
* Constructor.
*
* @param Core $core Core instance.
*/
public function __construct( Core $core ) {
$this->core = $core;
$this->initialize_hooks();
}
/**
* Initializes WordPress hooks.
*/
private function initialize_hooks() {
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_assets' ) );
}
/**
* Enqueues admin-specific assets.
*
* @param string $hook_suffix The current admin page.
*/
public function enqueue_admin_assets( $hook_suffix ) {
// Admin assets enqueue logic will go here.
// The test mocks wp_enqueue_style, wp_enqueue_script, etc.
}
}