| 1 |
<?php |
| 2 |
|
| 3 |
if (!defined('ABSPATH')) { |
| 4 |
exit; |
| 5 |
} |
| 6 |
|
| 7 |
/** |
| 8 |
* Immutable parameter object bundling the parsed pieces of an incoming user |
| 9 |
* request, passed to {@see ABJ_404_Solution_UserRequest::__construct()}. |
| 10 |
* |
| 11 |
* Replaces a 5-positional-parameter constructor (criterion 220 Interface |
| 12 |
* Size). Fields are read directly by the consumer; this is a plain data |
| 13 |
* carrier with no behavior. |
| 14 |
*/ |
| 15 |
// allow-no-test-found: pure parameter-object DTO (typed public fields, constructor-only assignment, no behavior); fields consumed by ABJ_404_Solution_UserRequest, exercised in UserRequestTest. |
| 16 |
class ABJ_404_Solution_UserRequestParts { |
| 17 |
|
| 18 |
/** @var string */ |
| 19 |
public $requestURI; |
| 20 |
|
| 21 |
/** @var array<string, int|string> */ |
| 22 |
public $urlParts; |
| 23 |
|
| 24 |
/** @var string */ |
| 25 |
public $urlWithoutCommentPage; |
| 26 |
|
| 27 |
/** @var string */ |
| 28 |
public $commentPagePart; |
| 29 |
|
| 30 |
/** @var string */ |
| 31 |
public $queryString; |
| 32 |
|
| 33 |
/** |
| 34 |
* @param string $requestURI |
| 35 |
* @param array<string, int|string> $urlParts |
| 36 |
* @param string $urlWithoutCommentPage |
| 37 |
* @param string $commentPagePart |
| 38 |
* @param string $queryString |
| 39 |
*/ |
| 40 |
public function __construct(string $requestURI, array $urlParts, string $urlWithoutCommentPage, |
| 41 |
string $commentPagePart, string $queryString) { |
| 42 |
$this->requestURI = $requestURI; |
| 43 |
$this->urlParts = $urlParts; |
| 44 |
$this->urlWithoutCommentPage = $urlWithoutCommentPage; |
| 45 |
$this->commentPagePart = $commentPagePart; |
| 46 |
$this->queryString = $queryString; |
| 47 |
} |
| 48 |
} |
| 49 |
|