| 1 |
<?php |
| 2 |
|
| 3 |
if (!defined('ABSPATH')) { |
| 4 |
exit; |
| 5 |
} |
| 6 |
|
| 7 |
/** |
| 8 |
* Parameter object for the add/edit redirect form renderer, |
| 9 |
* {@see ABJ_404_Solution_View_RedirectForms::echoEditRedirect()}. |
| 10 |
* |
| 11 |
* Replaces a 9-positional-parameter method signature (criterion 220 |
| 12 |
* Interface Size). Plain data carrier read directly by the consumer. |
| 13 |
*/ |
| 14 |
// allow-no-test-found: pure parameter-object DTO (typed public fields, constructor-only assignment, no behavior); fields consumed by View_RedirectForms::echoEditRedirect(), exercised in ViewFormRenderingTest and EditRedirectNativeFormShapeTest. |
| 15 |
class ABJ_404_Solution_EditRedirectFormContext { |
| 16 |
|
| 17 |
/** @var string */ |
| 18 |
public string $destination; |
| 19 |
|
| 20 |
/** @var string */ |
| 21 |
public string $codeSelected; |
| 22 |
|
| 23 |
/** @var string */ |
| 24 |
public string $label; |
| 25 |
|
| 26 |
/** @var string|null */ |
| 27 |
public ?string $sourcePage; |
| 28 |
|
| 29 |
/** @var string|null */ |
| 30 |
public ?string $filter; |
| 31 |
|
| 32 |
/** @var string|null */ |
| 33 |
public ?string $orderby; |
| 34 |
|
| 35 |
/** @var string|null */ |
| 36 |
public ?string $order; |
| 37 |
|
| 38 |
/** @var string */ |
| 39 |
public string $startDate; |
| 40 |
|
| 41 |
/** @var string */ |
| 42 |
public string $endDate; |
| 43 |
|
| 44 |
/** |
| 45 |
* @param string $destination |
| 46 |
* @param string $codeSelected |
| 47 |
* @param string $label |
| 48 |
* @param string|null $sourcePage |
| 49 |
* @param string|null $filter |
| 50 |
* @param string|null $orderby |
| 51 |
* @param string|null $order |
| 52 |
* @param string $startDate |
| 53 |
* @param string $endDate |
| 54 |
*/ |
| 55 |
public function __construct(string $destination, string $codeSelected, string $label, |
| 56 |
?string $sourcePage = null, ?string $filter = null, ?string $orderby = null, |
| 57 |
?string $order = null, string $startDate = '', string $endDate = '') { |
| 58 |
$this->destination = $destination; |
| 59 |
$this->codeSelected = $codeSelected; |
| 60 |
$this->label = $label; |
| 61 |
$this->sourcePage = $sourcePage; |
| 62 |
$this->filter = $filter; |
| 63 |
$this->orderby = $orderby; |
| 64 |
$this->order = $order; |
| 65 |
$this->startDate = $startDate; |
| 66 |
$this->endDate = $endDate; |
| 67 |
} |
| 68 |
} |
| 69 |
|