mattiabasone commented on code in PR #3634:
URL: https://github.com/apache/avro/pull/3634#discussion_r2729447869
##########
lang/php/lib/DataFile/AvroDataIOReader.php:
##########
@@ -72,71 +72,58 @@ public function __construct(
}
$this->codec = $codec;
- $this->block_count = 0;
+ $this->blockCount = 0;
// FIXME: Seems unsanitary to set writers_schema here.
// Can't constructor take it as an argument?
- $this->datum_reader->setWritersSchema(
+ $this->datumReader->setWritersSchema(
AvroSchema::parse($this->metadata[AvroDataIO::METADATA_SCHEMA_ATTR])
);
}
/**
* @throws AvroException
* @throws AvroIOException
- * @return array of data from object container.
+ * @return list<mixed> of data from object container.
* @internal Would be nice to implement data() as an iterator, I think
*/
public function data(): array
{
$data = [];
$decoder = $this->decoder;
while (true) {
- if (0 == $this->block_count) {
+ if (0 == $this->blockCount) {
if ($this->isEof()) {
break;
}
if ($this->skipSync()) {
+ /** @phpstan-ignore if.alwaysFalse */
Review Comment:
Because it suggest to remove this check since `$this->isEof()` has already
been checked some lines above, but the skipSync method reads data from the
AvroIO implementation
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]