description = $json['description'] ?? ''; $this->homepage = $json['homepage'] ?? Constants::HOMEPAGE . '/store/'; $this->name = $json['extra']['kimai']['name']; $this->kimaiVersion = $json['extra']['kimai']['require']; // the version field is required if we use composer to install a plugin via var/packages/ $this->version = $json['extra']['kimai']['version'] ?? ($json['version'] ?? 'unknown'); } public function getDescription(): ?string { return $this->description; } public function getVersion(): ?string { return $this->version; } public function getKimaiVersion(): ?int { return $this->kimaiVersion; } public function getHomepage(): ?string { return $this->homepage; } public function getName(): ?string { return $this->name; } }