Modernize property declarations in src/utils

This commit is contained in:
Dylan K. Taylor
2022-04-28 13:12:12 +01:00
parent de12b701ac
commit 0e7e776862
7 changed files with 34 additions and 71 deletions

View File

@ -24,26 +24,15 @@ declare(strict_types=1);
namespace pocketmine\utils;
final class InternetRequestResult{
/**
* @var string[][]
* @phpstan-var list<array<string, string>>
*/
private $headers;
/** @var string */
private $body;
/** @var int */
private $code;
/**
* @param string[][] $headers
* @phpstan-param list<array<string, string>> $headers
*/
public function __construct(array $headers, string $body, int $code){
$this->headers = $headers;
$this->body = $body;
$this->code = $code;
}
public function __construct(
private array $headers,
private string $body,
private int $code
){}
/**
* @return string[][]