mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 08:44:01 +00:00
PluginDescription: drop unenforceable type constraint on array keys
the data that comes through here isn't validated, and there's also no guarantee that all the keys will be strings in spite of our best efforts even if it was validated, because PHP is fucking stupid and casts int-like string keys to int keys.
This commit is contained in:
parent
93e5c80962
commit
15d81154e6
@ -89,7 +89,6 @@ class PluginDescription{
|
||||
|
||||
/**
|
||||
* @param string|mixed[] $yamlString
|
||||
* @phpstan-param string|array<string, mixed> $yamlString
|
||||
*/
|
||||
public function __construct($yamlString){
|
||||
$this->loadMap(!is_array($yamlString) ? yaml_parse($yamlString) : $yamlString);
|
||||
@ -97,7 +96,6 @@ class PluginDescription{
|
||||
|
||||
/**
|
||||
* @param mixed[] $plugin
|
||||
* @phpstan-param array<string, mixed> $plugin
|
||||
* @throws PluginException
|
||||
*/
|
||||
private function loadMap(array $plugin) : void{
|
||||
|
Loading…
x
Reference in New Issue
Block a user