Skip to content

Commit

Permalink
Merge branch 'master' into dependabot/github_actions/dot-github/workf…
Browse files Browse the repository at this point in the history
…lows/actions/download-artifact-4.1.7
  • Loading branch information
tPl0ch authored Dec 19, 2024
2 parents 5d4ab8d + 4dbdc3c commit cf1abd6
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/Common.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ function inflectRecord($record): Maybe
*
* @return mixed|null
*/
function memoize(callable $callback = null, array $arguments = [], $key = null)
function memoize(?callable $callback = null, array $arguments = [], $key = null)
{
static $storage = [];

Expand Down
4 changes: 2 additions & 2 deletions src/Objects/Exceptions/Exceptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ final class Exceptions
/**
* @param mixed $record
*/
public static function forEncode($record, \AvroSchema $schema, \Exception $previous = null): AvroEncodingException
public static function forEncode($record, \AvroSchema $schema, ?\Exception $previous = null): AvroEncodingException
{
$exportedRecord = \var_export($record, true);

Expand All @@ -29,7 +29,7 @@ public static function forEncode($record, \AvroSchema $schema, \Exception $previ
return new AvroEncodingException($message, self::ERROR_ENCODING, $previous);
}

public static function forDecode(string $binaryMessage, \Exception $previous = null): AvroDecodingException
public static function forDecode(string $binaryMessage, ?\Exception $previous = null): AvroDecodingException
{
$convertedMessage = \bin2hex($binaryMessage);
$message = <<<MESSAGE
Expand Down
2 changes: 1 addition & 1 deletion src/Objects/RecordSerializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public function encodeRecord(string $subject, AvroSchema $schema, $record): stri
* @throws \Exception
* @throws \FlixTech\SchemaRegistryApi\Exception\SchemaRegistryException
*/
public function decodeMessage(string $binaryMessage, AvroSchema $readersSchema = null)
public function decodeMessage(string $binaryMessage, ?AvroSchema $readersSchema = null)
{
$decoded = decode($binaryMessage);
$schemaId = valueOf($decoded->bind($this->schemaIdGetter));
Expand Down
2 changes: 1 addition & 1 deletion src/Objects/Schema/Generation/Type.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class Type
*/
private $attributes;

public function __construct(string $typeName, SchemaAttributes $attributes = null)
public function __construct(string $typeName, ?SchemaAttributes $attributes = null)
{
$this->typeName = $typeName;
$this->attributes = $attributes ?? new SchemaAttributes();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public function it_should_fail_for_records_not_implementing_the_interface_for_ke
$definitionInterfaceResolver->keySchemaFor([]);
}

private function createAnonymousDefinitionInterface(string $valueSchema, string $keySchema = null): HasSchemaDefinitionInterface
private function createAnonymousDefinitionInterface(string $valueSchema, ?string $keySchema = null): HasSchemaDefinitionInterface
{
$class = new class() implements HasSchemaDefinitionInterface {
/**
Expand Down

0 comments on commit cf1abd6

Please sign in to comment.