mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-03 00:25:04 +00:00
Modernize property declarations in src/utils
This commit is contained in:
@ -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[][]
|
||||
|
Reference in New Issue
Block a user