Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/JSONSchemaGenerator/Generator.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ abstract class Generator
* @return string
* @throws \JSONSchemaGenerator\Parsers\Exceptions\UnmappableException
*/
public static function from($object, array $config = null): string
public static function from($object, ?array $config = null): string
{
return (new BaseParser($config))->parse($object)->json();
}
Expand All @@ -38,7 +38,7 @@ public static function from($object, array $config = null): string
* @return string
* @throws \JSONSchemaGenerator\Parsers\Exceptions\UnmappableException
*/
public static function fromJson(string $jsonString, array $config = null): string
public static function fromJson(string $jsonString, ?array $config = null): string
{
return (new BaseParser($config))->parse(json_decode($jsonString))->json();
}
Expand Down
2 changes: 1 addition & 1 deletion src/JSONSchemaGenerator/Parsers/BaseParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class BaseParser
/**
* @param array|null $config
*/
public function __construct(array $config = null)
public function __construct(?array $config = null)
{
$this->config = array_merge([
'schema_id' => null,
Expand Down