Compare commits

...

3 Commits

4 changed files with 11 additions and 6 deletions

View File

@ -15,6 +15,11 @@
}
],
"bin": [ "bin/dataset-info" ],
"require": {
"php": "^7.4|^8.0",
"ext-simplexml": "*",
"ext-json": "*"
},
"require-dev": {
"phpunit/phpunit": "^9.5",
"phpstan/phpstan": "^1.8"

View File

@ -84,7 +84,7 @@ class DatasetManager
if (file_exists($fn)) {
$versions = include $fn;
foreach ($versions['versions'] as $name=>$version) {
self::$packageVersions[$name] = $version['version'];
self::$packageVersions[$name] = array_key_exists('version',$version) ? $version['version'] : null;
}
}

View File

@ -70,13 +70,13 @@ class CsvReader implements ReaderInterface
$this->checkLoadedSlice();
}
public function key(): mixed
public function key()
{
//$this->checkLoadedSlice();
return $this->counter;
}
public function current(): mixed
public function current()
{
//$this->checkLoadedSlice();
return $this->data[$this->currentIndex];
@ -102,4 +102,4 @@ class CsvReader implements ReaderInterface
return ($this->currentFile < count($this->files) && ($this->currentIndex < count($this->data)));
}
}
}

View File

@ -61,13 +61,13 @@ class JsonReader implements ReaderInterface
$this->checkLoadedSlice();
}
public function key(): mixed
public function key()
{
//$this->checkLoadedSlice();
return $this->counter;
}
public function current(): mixed
public function current()
{
//$this->checkLoadedSlice();
return $this->data[$this->currentIndex];