Files
FOSSBilling/tests-legacy/includes/Plugin/Example/Example.php
T
Adam Daley a9b903c222 Codebase modernisation, configuration cleanup, and improved type safety (#2957)
* Refactor tests to replace depreciated functions

* Update Rector config and dependencies

* Rector: Add explicit string casting for stricter type safety

* Rector: Add return type hints to methods across codebase

* Rector: Increase dead code level and refactor invoice item logic

* Remove unnecessary `willReturn` from test mocks

Eliminate redundant `willReturn(null)` and similar calls from PHPUnit mock setups in legacy module tests, leaving only method expectations. Also update some test values to use floats for consistency.

* Refactor API controller and email adapter return values

* Update formatting and guidelines in `AGENTS.md`
2025-10-11 23:39:44 +01:00

58 lines
1.1 KiB
PHP

<?php
class Example
{
public function __construct(private readonly ?array $config = null)
{
}
public function activate($service, $order, $params = [])
{
}
public function renew($service, $order, $params = [])
{
}
public function suspend($service, $order, $params = [])
{
}
public function unsuspend($service, $order, $params = [])
{
}
public function cancel($service, $order, $params = [])
{
return $this->suspend($service, $order, $params);
}
public function uncancel($service, $order, $params = [])
{
return $this->unsuspend($service, $order, $params);
}
public function delete($service, $order, $params = [])
{
}
public function get_config(): ?array
{
return $this->config;
}
/**
* Custom function to return passed params.
*
* @param type $service
* @param type $order
* @param type $params
*
* @return type
*/
public function return_params($service, $order, $params = [])
{
return $params;
}
}