Skip to content

Commit ff4935a

Browse files
committed
feat: add index file service interface
1 parent ce68887 commit ff4935a

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace NuonicPluginInstaller\Service;
6+
7+
use NuonicPluginInstaller\Struct\PackageIndexEntry;
8+
9+
interface IndexFileServiceInterface
10+
{
11+
public function getPackageInformation(string $packageName): PackageIndexEntry;
12+
13+
/**
14+
* @return PackageIndexEntry[]
15+
*/
16+
public function listPackages(): array;
17+
}

src/Struct/PackageIndexEntry.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace NuonicPluginInstaller\Struct;
6+
7+
use Shopware\Core\Framework\Struct\Struct;
8+
9+
class PackageIndexEntry extends Struct
10+
{
11+
public function __construct(
12+
public string $repositoryUrl,
13+
public string $ref,
14+
) {
15+
}
16+
}

0 commit comments

Comments
 (0)