diff --git a/src/Objects/Schema/Generation/AnnotationReader.php b/src/Objects/Schema/Generation/AnnotationReader.php index 17bbdf3..dbdbc46 100644 --- a/src/Objects/Schema/Generation/AnnotationReader.php +++ b/src/Objects/Schema/Generation/AnnotationReader.php @@ -25,6 +25,7 @@ public function __construct(DoctrineAnnotationReader $reader) */ public function readClassAttributes(ReflectionClass $class): SchemaAttributes { + /** @var SchemaAttribute[] $annotations */ $annotations = $this->reader->getClassAnnotations($class); $attributes = \array_filter($annotations, [$this, 'onlySchemaAttributes']); @@ -33,6 +34,7 @@ public function readClassAttributes(ReflectionClass $class): SchemaAttributes public function readPropertyAttributes(ReflectionProperty $property): SchemaAttributes { + /** @var SchemaAttribute[] $annotations */ $annotations = $this->reader->getPropertyAnnotations($property); $attributes = \array_filter($annotations, [$this, 'onlySchemaAttributes']); diff --git a/src/Protocol.php b/src/Protocol.php index 17ce63e..0ceb18a 100644 --- a/src/Protocol.php +++ b/src/Protocol.php @@ -30,7 +30,7 @@ function version(): int function encode(int $protocolVersion, int $schemaId, string $avroEncodedBinaryString): Either { /** @var bool|string $packed */ - $packed = @\pack('CNA*', $protocolVersion, $schemaId, $avroEncodedBinaryString); + $packed = @\pack('CNa*', $protocolVersion, $schemaId, $avroEncodedBinaryString); return false !== $packed ? Right::of($packed) @@ -38,7 +38,7 @@ function encode(int $protocolVersion, int $schemaId, string $avroEncodedBinarySt : Left::of( new AvroEncodingException( \sprintf( - 'Could not pack message with format "CNA*", protocol version "%d" and schema id "%d"', + 'Could not pack message with format "CNa*", protocol version "%d" and schema id "%d"', $protocolVersion, $schemaId )