* @return string
* @throws Exception
*/
- public function readDescription() : ?string {
+ public function readDescription() : string {
if (!$this->rewind()) {
throw Exception::fromLastError();
}
&& (false !== fgets($this->fd))) {
return fgets($this->fd);
}
- return null;
+ return "";
}
/**
* @return string
* @throws Exception
*/
- public function readFullDescription() : ?string {
+ public function readFullDescription() : string {
$desc = $this->readDescription();
while (false !== ($line = fgets($this->fd))) {
- if ($line{0} === "#") {
+ if ($line[0] === "#") {
break;
} else {
$desc .= $line;