Files
virtfusion-whmcs-module/modules/servers/VirtFusionDirect/lib/Log.php
Prophet731 d253bd44e6
All checks were successful
Publish Release / release (push) Successful in 10s
feat: auto-create custom fields, add try/catch coverage, PHPDoc, and Pint formatting
- Auto-create 'Initial Operating System' and 'Initial SSH Key' custom fields
  via Database::ensureCustomFields() on module load, eliminating the manual
  modify.sql step
- Delete modify.sql (no longer needed)
- Add try/catch blocks around every DB operation and API call across all PHP
  files per CLAUDE.md error handling rules
- Add comprehensive PHPDoc to all classes, methods, and properties
- Set up Laravel Pint (laravel/pint) with Laravel-style preset for consistent
  code formatting across the codebase
- Add git pre-commit hook (hooks/pre-commit) that runs Pint on staged PHP
  files, auto-installed via Composer post-install/post-update scripts
- Simplify README installation to a single copy-paste command

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 15:03:17 -05:00

24 lines
684 B
PHP

<?php
namespace WHMCS\Module\Server\VirtFusionDirect;
/**
* Thin wrapper around the WHMCS logModuleCall() function for module-level logging.
*/
class Log
{
const LOG_MODULE = 'VirtFusionDirect';
/**
* Write an entry to the WHMCS module log.
*
* @param string $action Name of the action being logged (e.g. 'CreateAccount')
* @param string|array $requestString Request data sent to the API
* @param string|array $responseData Response data received from the API
*/
public static function insert($action, $requestString, $responseData)
{
logModuleCall(self::LOG_MODULE, $action, $requestString, $responseData);
}
}