From 6cb975d2d3c151c54e16ae49ff8d800c54944f96 Mon Sep 17 00:00:00 2001 From: ErickSkrauch Date: Sun, 7 Apr 2019 01:36:44 +0200 Subject: [PATCH] Change static to self in properties factory (scrutinizer-ci issue) --- CHANGELOG.md | 3 +++ src/Response/Properties/Factory.php | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 07589a2..5ad024e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - The constructor no longer has arguments. +### Fixed +- Change `static` to `self` in `\Ely\Mojang\Response\Properties\Factory` to allow its extending. + ### Removed - `\Ely\Mojang\Api::create()` static method. Use constructor instead. diff --git a/src/Response/Properties/Factory.php b/src/Response/Properties/Factory.php index ca82f5d..4adc571 100644 --- a/src/Response/Properties/Factory.php +++ b/src/Response/Properties/Factory.php @@ -11,7 +11,7 @@ class Factory { public static function createFromProp(array $prop): Property { $name = $prop['name']; - if (isset(static::$MAP[$name])) { + if (isset(self::$MAP[$name])) { $className = static::$MAP[$name]; return new $className($prop); }