fix: phpstan level=6
This commit is contained in:
parent
acbf2c847d
commit
48269bd424
41 changed files with 324 additions and 347 deletions
17
src/Url.php
17
src/Url.php
|
|
@ -3,26 +3,23 @@
|
|||
namespace ctiso;
|
||||
|
||||
class Url {
|
||||
public $parts = [];
|
||||
/** @var Url */
|
||||
public $parent;
|
||||
/** @var array<string, string> */
|
||||
public array $parts = [];
|
||||
public ?Url $parent;
|
||||
|
||||
function __construct() {
|
||||
}
|
||||
|
||||
function setParent($parent) {
|
||||
function setParent($parent): void {
|
||||
$this->parent = $parent;
|
||||
}
|
||||
|
||||
function setQuery($parts) {
|
||||
function setQuery($parts): void {
|
||||
$this->parts = $parts;
|
||||
}
|
||||
|
||||
function addQueryParam($key, $value) {
|
||||
function addQueryParam(string $key, string $value): void {
|
||||
$this->parts[$key] = $value;
|
||||
}
|
||||
|
||||
function toString() {
|
||||
function toString(): string {
|
||||
return '?' . http_build_query(array_merge($this->parts, $this->parent ? $this->parent->parts : []));
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue