mirror of
https://github.com/SkillDisplay/PHPToolKit.git
synced 2024-11-23 08:16:09 +01:00
[BUGFIX] Create SkillSet entity from array
This commit is contained in:
parent
ceabcd7482
commit
b53dde14e2
2 changed files with 6 additions and 1 deletions
|
@ -130,7 +130,7 @@ class SkillSet
|
|||
$skillSetsJson = json_decode($body, true);
|
||||
$skillSets = [];
|
||||
foreach ($skillSetsJson as $skillSet) {
|
||||
$skillSets[] = Entity::createFromJson($skillSet, $this->settings);
|
||||
$skillSets[] = Entity::createFromArray($skillSet, $this->settings);
|
||||
}
|
||||
|
||||
return $skillSets;
|
||||
|
|
|
@ -113,4 +113,9 @@ class SkillSet
|
|||
{
|
||||
return new SkillSet(json_decode($json, true), $settings);
|
||||
}
|
||||
|
||||
public static function createFromArray(array $data, Settings $settings): SkillSet
|
||||
{
|
||||
return new SkillSet($data, $settings);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue