This repository has been archived on 2023-10-21. You can view files and clone it, but cannot push or open issues or pull requests.
patchouli/src/Dummy/DummyPackage.php

46 lines
1.1 KiB
PHP
Raw Normal View History

2020-12-23 01:44:45 +00:00
<?php
namespace Patchouli\Dummy;
use Patchouli\IPackage;
use Patchouli\Version;
class DummyPackage implements IPackage {
2020-12-23 01:44:45 +00:00
public function getId(): string {
return 'package-id';
}
public function getName(): string {
return 'Human Readable Name';
}
public function getVersion(): Version {
2020-12-29 22:44:39 +00:00
return new Version('1.2.3-beta1');
2020-12-23 01:44:45 +00:00
}
2020-12-29 02:40:16 +00:00
public function getFiles(): array {
return [
new DummyPackageFile('filename.bin'),
new DummyPackageFile('boobs.png'),
];
}
public function getTargets(): array {
return [new DummyPackageTarget];
}
2020-12-23 01:44:45 +00:00
public function getDependencies(): array {
return [];
}
public function fwifSerialize(): array {
2020-12-29 22:44:39 +00:00
return [
'id' => $this->getId(),
'name' => $this->getName(),
2020-12-29 22:44:39 +00:00
'version' => $this->getVersion(),
2020-12-29 02:40:16 +00:00
'files' => $this->getFiles(),
2020-12-29 22:44:39 +00:00
'targets' => $this->getTargets(),
'deps' => $this->getDependencies(),
2020-12-23 01:44:45 +00:00
];
}
}