diff --git a/src/O.php b/src/O.php index ddd6410..3b84536 100644 --- a/src/O.php +++ b/src/O.php @@ -45,7 +45,8 @@ function ($result, $key) use ($data) { } // O::assoc('foo', 'bar', {}) -> {foo: 'bar'} - public static function assoc(string $key, $value, $data): object { + public static function assoc(string $key, $value, $data) + { if (self::isObject($data)) { $data->{$key} = $value; } @@ -58,7 +59,8 @@ public static function assoc(string $key, $value, $data): object { } // O::dissoc('foo', {foo: 'bar', fizz: 'buzz'}) -> {fizz: 'buzz'} - public static function dissoc(string $key, $data): object { + public static function dissoc(string $key, $data) + { if (self::isObject($data)) { unset($data->{$key}); }